Skip to content

Commit f40502d

Browse files
ShahzaibIbrahimfedejeanne
authored andcommitted
Fixing incorrect scaling for TreeItem font
1 parent 23f5c83 commit f40502d

File tree

1 file changed

+3
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+3
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,9 +1388,10 @@ public void setFont (Font font){
13881388
error (SWT.ERROR_INVALID_ARGUMENT);
13891389
}
13901390
Font oldFont = this.font;
1391-
if (oldFont == font) return;
13921391
Shell shell = parent.getShell();
1393-
this.font = (font == null ? font : Font.win32_new(font, shell.nativeZoom));
1392+
Font newFont = (font == null ? font : Font.win32_new(font, shell.nativeZoom));
1393+
if (oldFont == newFont) return;
1394+
this.font = newFont;
13941395
if (oldFont != null && oldFont.equals (font)) return;
13951396
if (font != null) parent.customDraw = true;
13961397
if ((parent.style & SWT.VIRTUAL) != 0) cached = true;

0 commit comments

Comments
 (0)