You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2026/02/10 16:08:40 UTC
(hop) branch main updated: Fix auto darkmode on macOS, fixes #6535 (#6536)
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 273e7c80d0 Fix auto darkmode on macOS, fixes #6535 (#6536)
273e7c80d0 is described below
commit 273e7c80d080e030d43ed53a8f5d26d92efb9819
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Tue Feb 10 17:08:34 2026 +0100
Fix auto darkmode on macOS, fixes #6535 (#6536)
---
ui/src/main/java/org/apache/hop/ui/core/PropsUi.java | 4 ++--
.../perspective/configuration/tabs/ConfigGuiOptionsTab.java | 13 +++++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java b/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java
index 1288fd77b2..60f725557e 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java
@@ -144,11 +144,11 @@ public class PropsUi extends Props {
if (!EnvironmentUtils.getInstance().isWeb() && !OsHelper.isWindows()) {
if (Display.isSystemDarkTheme()) {
if (!isDarkMode()) {
- setDarkMode(false);
+ setDarkMode(true);
}
} else {
if (isDarkMode()) {
- setDarkMode(true);
+ setDarkMode(false);
}
}
}
diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/configuration/tabs/ConfigGuiOptionsTab.java b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/configuration/tabs/ConfigGuiOptionsTab.java
index 70b587183e..aff9210472 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/configuration/tabs/ConfigGuiOptionsTab.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/configuration/tabs/ConfigGuiOptionsTab.java
@@ -164,7 +164,13 @@ public class ConfigGuiOptionsTab {
wEnableInfiniteMove.setSelection(props.isInfiniteCanvasMoveEnabled());
wHideMenuBar.setSelection(props.isHidingMenuBar());
wShowTableViewToolbar.setSelection(props.isShowTableViewToolbar());
- wDarkMode.setSelection(props.isDarkMode());
+ // On macOS (and other non-Windows), dark mode follows system; sync from system so UI and
+ // props match
+ boolean darkMode = Const.isWindows() ? props.isDarkMode() : Display.isSystemDarkTheme();
+ if (!Const.isWindows()) {
+ props.setDarkMode(darkMode);
+ }
+ wDarkMode.setSelection(darkMode);
// Reload global zoom
String globalZoomFactor = Integer.toString((int) (props.getGlobalZoomFactor() * 100)) + '%';
@@ -934,7 +940,10 @@ public class ConfigGuiOptionsTab {
props.setDrawBorderAroundCanvasNames(wDrawBorderAroundCanvasNames.getSelection());
props.setInfiniteCanvasMoveEnabled(wEnableInfiniteMove.getSelection());
props.setZoomScrollingDisabled(wDisableZoomScrolling.getSelection());
- props.setDarkMode(wDarkMode.getSelection());
+ // On macOS (and other non-Windows), dark mode follows system; persist system theme, not
+ // checkbox
+ boolean darkMode = Const.isWindows() ? wDarkMode.getSelection() : Display.isSystemDarkTheme();
+ props.setDarkMode(darkMode);
props.setHidingMenuBar(wHideMenuBar.getSelection());
props.setShowTableViewToolbar(wShowTableViewToolbar.getSelection());