Skip to content

Commit

Permalink
Scale up magic number for Radiobutton with Image
Browse files Browse the repository at this point in the history
Use DPIUtil
Contributes to vi-eclipse/Eclipse-Platform#72
  • Loading branch information
jakub-suliga committed Jul 3, 2024
1 parent 44f3ae5 commit 5171181
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ else if ((style & SWT.RIGHT) != 0) {
width += getSystemMetrics (OS.SM_CXVSCROLL);
height += getSystemMetrics (OS.SM_CYVSCROLL);
} else {
width += getSystemMetrics (OS.SM_CXHSCROLL);
width += getSystemMetrics (OS.SM_CXHSCROLL) ;
height += getSystemMetrics (OS.SM_CYHSCROLL);
}
} else {
Expand Down Expand Up @@ -348,10 +348,10 @@ else if ((style & SWT.RIGHT) != 0) {
Rectangle rect = DPIUtil.autoScaleBounds(image.getBounds(), this.getZoom(), 100);
width = rect.width;
if (hasText && text.length () != 0) {
width += MARGIN * 2;
width += DPIUtil.autoScaleUp(MARGIN * 2, getZoom());
}
height = rect.height;
extra = MARGIN * 2;
extra = DPIUtil.autoScaleUp(MARGIN * 2, getZoom());
}
}
if (hasText) {
Expand Down

0 comments on commit 5171181

Please sign in to comment.