From 522fba3d4c0df693c4e63de82b14145832365f7d Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Mon, 22 Jul 2024 23:44:45 -0400 Subject: [PATCH] Fix regression caused by #1266 Closes #1282 --- src/qz/ui/component/DisplayTable.java | 2 +- src/qz/utils/GtkUtilities.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qz/ui/component/DisplayTable.java b/src/qz/ui/component/DisplayTable.java index e5ab11fa9..50b6fc611 100644 --- a/src/qz/ui/component/DisplayTable.java +++ b/src/qz/ui/component/DisplayTable.java @@ -31,7 +31,7 @@ private void initComponents() { // Fix Linux row height int origHeight = getRowHeight(); - if(SystemUtilities.getWindowScaleFactor() != 1) { + if(SystemUtilities.getWindowScaleFactor() > 1) { setRowHeight((int)(origHeight * SystemUtilities.getWindowScaleFactor())); } diff --git a/src/qz/utils/GtkUtilities.java b/src/qz/utils/GtkUtilities.java index 73fb17bd0..7257bc4fb 100644 --- a/src/qz/utils/GtkUtilities.java +++ b/src/qz/utils/GtkUtilities.java @@ -31,7 +31,7 @@ public static double getScaleFactor() { } catch(Throwable t) { log.warn("An error occurred initializing the Gtk library", t); } - return 0; + return 1; } private static GTK getGtkInstance() { @@ -88,7 +88,7 @@ private static double getGtk3ScaleFactor(GTK3 gtk3) { Pointer screen = gtk3.gdk_display_get_default_screen(display); return gtk3.gdk_screen_get_monitor_scale_factor(screen, 0); } - return 0; + return 1; } /**