From 136eae8d2b941b38b7552b43ddd0cbdbe10b214c Mon Sep 17 00:00:00 2001 From: mcebular Date: Thu, 9 Nov 2023 23:24:16 +0100 Subject: [PATCH] Fix for handling DPI factor on Windows --- Build.xml | 10 +++++++--- src/Main.hx | 1 + src/SettingsFrame.hx | 4 +--- src/manifest.xml | 31 +++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 src/manifest.xml diff --git a/Build.xml b/Build.xml index b606996..4142c40 100644 --- a/Build.xml +++ b/Build.xml @@ -1,5 +1,9 @@ - - - +
+ +
+ +
+
+
\ No newline at end of file diff --git a/src/Main.hx b/src/Main.hx index d65ff29..2ef60c0 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -6,6 +6,7 @@ import hx.widgets.StandardPaths.FileLayout; import hx.widgets.styles.MessageDialogStyle; +@:buildXml('') class Main { public static final APP_NAME = "SyncthingStatus"; diff --git a/src/SettingsFrame.hx b/src/SettingsFrame.hx index a43b396..73ad39e 100644 --- a/src/SettingsFrame.hx +++ b/src/SettingsFrame.hx @@ -1,8 +1,5 @@ package ; -import hx.widgets.styles.BackgroundStyle; -import hx.widgets.styles.FrameStyle; -import hx.widgets.styles.WindowStyle; import Util.getAboutString; import hx.widgets.*; import hx.widgets.styles.HyperlinkCtrlStyle; @@ -19,6 +16,7 @@ class SettingsFrame extends Frame { public function init() { initUi(); + trace("DPIScaleFactor=" + this.DPIScaleFactor); // When clicking X to close window, don't actually close it, just hide it. this.bind(EventType.CLOSE_WINDOW, (event: Event) -> { diff --git a/src/manifest.xml b/src/manifest.xml new file mode 100644 index 0000000..d3a6476 --- /dev/null +++ b/src/manifest.xml @@ -0,0 +1,31 @@ + + + + + PerMonitorV2 + + + true + + + + +SyncthingStatus + + + + + + \ No newline at end of file