Skip to content

Commit

Permalink
Fixing incorrect scaling for TreeItem font
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahzaibIbrahim authored and fedejeanne committed Jun 24, 2024
1 parent 23f5c83 commit f40502d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1388,9 +1388,10 @@ public void setFont (Font font){
error (SWT.ERROR_INVALID_ARGUMENT);
}
Font oldFont = this.font;
if (oldFont == font) return;
Shell shell = parent.getShell();
this.font = (font == null ? font : Font.win32_new(font, shell.nativeZoom));
Font newFont = (font == null ? font : Font.win32_new(font, shell.nativeZoom));
if (oldFont == newFont) return;
this.font = newFont;
if (oldFont != null && oldFont.equals (font)) return;
if (font != null) parent.customDraw = true;
if ((parent.style & SWT.VIRTUAL) != 0) cached = true;
Expand Down

0 comments on commit f40502d

Please sign in to comment.