This is an automated email from the ASF dual-hosted git repository. skygo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new 60b1d34 [NETBEANS-5864] Sightly better support of GTK with a dark theme new d470209 Merge pull request #3063 from lkishalmi/NETBEANS-5864 60b1d34 is described below commit 60b1d3423601b6f1fe6ce36476788067ffd67fb7 Author: Laszlo Kishalmi <laszlo.kisha...@gmail.com> AuthorDate: Sun Jul 18 10:43:46 2021 -0700 [NETBEANS-5864] Sightly better support of GTK with a dark theme --- .../src/org/netbeans/swing/plaf/gtk/GtkLFCustoms.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/gtk/GtkLFCustoms.java b/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/gtk/GtkLFCustoms.java index 3eea842..30075a9 100644 --- a/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/gtk/GtkLFCustoms.java +++ b/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/gtk/GtkLFCustoms.java @@ -145,6 +145,11 @@ public class GtkLFCustoms extends LFCustoms { @Override public Object[] createLookAndFeelCustomizationKeysAndValues() { if (ThemeValue.functioning()) { + // Better than nothing detection of GTK dark themes + ThemeValue textText = new ThemeValue (Region.PANEL, ColorType.TEXT_FOREGROUND, Color.BLACK); + ThemeValue text = new ThemeValue (Region.PANEL, ColorType.TEXT_BACKGROUND, Color.GRAY); + Boolean dark = UIUtils.isBrighter(textText.getColor(), text.getColor()); + return new Object[] { //XXX once the JDK team has integrated support for standard //UIManager keys into 1.5 (not there as of b47), these can @@ -154,12 +159,16 @@ public class GtkLFCustoms extends LFCustoms { "controlShadow", new ThemeValue (Region.PANEL, ThemeValue.DARK, Color.DARK_GRAY), //NOI18N "controlDkShadow", new ThemeValue (Region.PANEL, ThemeValue.BLACK, Color.BLACK), //NOI18N "controlLtHighlight", new ThemeValue (Region.PANEL, ThemeValue.WHITE, Color.WHITE), //NOI18N - "textText", new ThemeValue (Region.PANEL, ColorType.TEXT_FOREGROUND, Color.BLACK), //NOI18N - "text", new ThemeValue (Region.PANEL, ColorType.TEXT_BACKGROUND, Color.GRAY), //NOI18N + "textText", textText, //NOI18N + "text", text, //NOI18N + + + "nb.dark.theme", dark, //NOI18N + "nb.wizard.hideimage", dark, //NOI18N "tab_unsel_fill", control, //NOI18N - "SplitPane.dividerSize", new Integer (2), //NOI18N + "SplitPane.dividerSize", 2, //NOI18N SYSTEMFONT, controlFont, //NOI18N USERFONT, controlFont, //NOI18N --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists