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 dd82167608 fix some background colors on macOS, fixes #6341 (#6342)
dd82167608 is described below

commit dd82167608a44482ccf313ccdc22fc6521ba9d90
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Mon Jan 12 10:33:34 2026 +0100

    fix some background colors on macOS, fixes #6341 (#6342)
---
 ui/src/main/java/org/apache/hop/ui/core/PropsUi.java         | 8 +++++++-
 ui/src/main/java/org/apache/hop/ui/core/gui/GuiResource.java | 6 +++++-
 ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java        | 2 +-
 3 files changed, 13 insertions(+), 3 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 3574a875bd..b55789ecd1 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
@@ -663,9 +663,15 @@ public class PropsUi extends Props {
       return;
     }
 
-    // Handle Shell windows with system background, but let macOS handle text 
color
+    // Handle Shell windows with appropriate background color
     if (widget instanceof Shell shell) {
       shell.setBackgroundMode(SWT.INHERIT_FORCE);
+      // Use gray background in light mode, system background in dark mode
+      if (PropsUi.getInstance().isDarkMode()) {
+        
shell.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+      } else {
+        shell.setBackground(gui.getColorDemoGray());
+      }
       return;
     }
 
diff --git a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiResource.java 
b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiResource.java
index b900417717..219c31c70c 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiResource.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiResource.java
@@ -1610,7 +1610,11 @@ public class GuiResource {
 
   public Color getWidgetBackGroundColor() {
     if (OsHelper.isMac()) {
-      return display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
+      if (PropsUi.getInstance().isDarkMode()) {
+        return display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
+      } else {
+        return colorDemoGray;
+      }
     } else {
       return colorWhite;
     }
diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java 
b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
index 2dd23eb19f..7f1f8deb52 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
@@ -1548,7 +1548,7 @@ public class HopGui
     boolean isSelected = false;
 
     Color selectionBg = GuiResource.getInstance().getColorLightBlue();
-    Color hoverBg = GuiResource.getInstance().getColorLightGray();
+    Color hoverBg = GuiResource.getInstance().getColorGray();
     Color normalBg = GuiResource.getInstance().getWidgetBackGroundColor();
 
     public SidebarButton(

Reply via email to