Skip to content

Commit b695984

Browse files
[GTK] Replacing usages of Display#getDPI from gtk
This is a preparatory commit to remove all **possible** usages of getDPI from gtk. Since getDPI is set to be deprecated.
1 parent 1bc596e commit b695984

File tree

1 file changed

+2
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics

1 file changed

+2
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,8 @@ protected void init () {
723723
}
724724
}
725725
defaultFont = OS.pango_font_description_copy (defaultFont);
726-
Point dpi = getDPI(), screenDPI = getScreenDPI();
727-
if (dpi.y != screenDPI.y) {
726+
Point screenDPI = getScreenDPI();
727+
if (this.dpi.y != screenDPI.y) {
728728
int size = OS.pango_font_description_get_size(defaultFont);
729729
OS.pango_font_description_set_size(defaultFont, size * dpi.y / screenDPI.y);
730730
}

0 commit comments

Comments
 (0)