From b37d694a34d55a52902c96b908551448e8877352 Mon Sep 17 00:00:00 2001 From: Ahanu Dewhirst <16126069+Orcjett@users.noreply.github.com> Date: Wed, 17 Jul 2024 01:35:47 +1000 Subject: [PATCH] [#2485] Add UI colors --- .../openrocket/swing/gui/theme/UITheme.java | 21 +++++++++++++++++++ .../main/resources/themes/FlatLaf.properties | 2 ++ 2 files changed, 23 insertions(+) diff --git a/swing/src/main/java/info/openrocket/swing/gui/theme/UITheme.java b/swing/src/main/java/info/openrocket/swing/gui/theme/UITheme.java index a7a18e7c6..be237e042 100644 --- a/swing/src/main/java/info/openrocket/swing/gui/theme/UITheme.java +++ b/swing/src/main/java/info/openrocket/swing/gui/theme/UITheme.java @@ -85,6 +85,7 @@ public class UITheme { Color getComponentTreeBackgroundColor(); Color getComponentTreeForegroundColor(); + Color getvisibilityHiddenForegroundColor(); Color getFinPointGridMajorLineColor(); Color getFinPointGridMinorLineColor(); @@ -371,6 +372,11 @@ public class UITheme { return UIManager.getColor("Tree.textForeground"); } + @Override + public Color getvisibilityHiddenForegroundColor() { + return UIManager.getColor("Tree.textForeground.hidden.light"); + } + @Override public Color getFinPointGridMajorLineColor() { return new Color( 0, 0, 255, 80); @@ -762,6 +768,11 @@ public class UITheme { return getTextColor(); } + @Override + public Color getvisibilityHiddenForegroundColor() { + return UIManager.getColor("Tree.textForeground.hidden.dark"); + } + @Override public Color getFinPointGridMajorLineColor() { return new Color(135, 135, 199, 197); @@ -1153,6 +1164,11 @@ public class UITheme { return getTextColor(); } + @Override + public Color getvisibilityHiddenForegroundColor() { + return UIManager.getColor("Tree.textForeground.hidden.dark"); + } + @Override public Color getFinPointGridMajorLineColor() { return new Color(164, 164, 224, 197); @@ -1563,6 +1579,11 @@ public class UITheme { return getCurrentTheme().getComponentTreeForegroundColor(); } + @Override + public Color getvisibilityHiddenForegroundColor() { + return getCurrentTheme().getvisibilityHiddenForegroundColor(); + } + @Override public Color getFinPointGridMajorLineColor() { return getCurrentTheme().getFinPointGridMajorLineColor(); diff --git a/swing/src/main/resources/themes/FlatLaf.properties b/swing/src/main/resources/themes/FlatLaf.properties index a9f98b247..0187ded38 100644 --- a/swing/src/main/resources/themes/FlatLaf.properties +++ b/swing/src/main/resources/themes/FlatLaf.properties @@ -9,6 +9,8 @@ Tree.paintLines = true Tree.showCellFocusIndicator = true Tree.wideSelection = true Tree.paintSelection = true +Tree.textForeground.hidden.dark = darken($Tree.textForeground, 25%) +Tree.textForeground.hidden.light = lighten($Tree.textForeground, 25%) # Margin as top,left,bottom,right Tree.rendererMargins = 2, 0, 3, 0