This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/master by this push:
     new 942f97e4dd Using contrast color for text in StyledTextComp
     new 5abcd72216 Merge pull request #1459 from shlxue/PR-TAP
942f97e4dd is described below

commit 942f97e4dd5fe855dc5ca6159cdfcb9768823858
Author: Shl Xue <[email protected]>
AuthorDate: Wed Apr 13 00:31:21 2022 +0800

    Using contrast color for text in StyledTextComp
---
 ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java 
b/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java
index 012726f1ef..a5fcb2525b 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java
@@ -245,8 +245,11 @@ public class StyledTextComp extends Composite {
       Color background =
           Display.getDefault()
               .getSystemColor(enabled ? SWT.COLOR_WHITE : 
SWT.COLOR_WIDGET_BACKGROUND);
-      textWidget.setForeground(foreground);
-      textWidget.setBackground(background);
+      GuiResource guiResource = GuiResource.getInstance();
+      textWidget.setForeground(
+          guiResource.getColor(foreground.getRed(), foreground.getGreen(), 
foreground.getBlue()));
+      textWidget.setBackground(
+          guiResource.getColor(background.getRed(), background.getGreen(), 
background.getBlue()));
     }
   }
 

Reply via email to