Community
Participate
Working Groups
On Mac OS X the window title bar is not affected by switching Eclipse to the dark theme - it remains light. Bug 459789 provides a method to set the OS theme which makes the title bar dark in dark theme. Platform UI should call the method whenever there is a theme change.
New Gerrit change created: https://git.eclipse.org/r/135856
Can't we simply use setColor? Theme are not either light or dark, they can use any color.
(In reply to Lars Vogel from comment #2) > Can't we simply use setColor? Theme are not either light or dark, they can > use any color. No UI toolkit provides API to set color for window decorations because this is drawn by the desktop environment. If one wants to have full control over window decorations colors and etc. it has to be custom drawing which opens dozens of other projects and looks alien to the user. Furthermore this is what we do on Gtk too - see https://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.e4.ui.swt.gtk/src/org/eclipse/e4/ui/swt/internal/gtk/DarkThemeProcessor.java which works only when the theme used has dark variant (which is not true for Ubuntu's one) .
The patch changes the window title bar to dark in Dark Theme. It also affects other controls in Dark Theme: 1. Menu has dark background with white foreground 2. Caret is white in Text box 3. Caret, text, search and cancel icons are white in Search box 4. Text box in Combo is gray 5. Table/Tree inactive selected background color is gray and foreground is white 6. Text selection color in Text box/Combo is now darker, making the selected text visible. The changes look fine so far in my testing. Till/Matthias, I'll be great if you can test the patch on Mac. Please use the latest build as it has the required SWT changes.
(In reply to Lakshmi Shanmugam from comment #4) > Till/Matthias, I'll be great if you can test the patch on Mac. Please use > the latest build as it has the required SWT changes. The latest i-build?
(In reply to Matthias Becker from comment #5) > (In reply to Lakshmi Shanmugam from comment #4) > > Till/Matthias, I'll be great if you can test the patch on Mac. Please use > > the latest build as it has the required SWT changes. > > The latest i-build? Yes, please test using latest I-build (I20190131-1800) + gerrit change in this bug.
I'm already using it for a few days now and it is great. The only minor issue I noted so far is that the text color in Combo widgets isn't optimal - it is black when the menu is not shown and some gray when the menu is shown (which looks a bit like the items are disabled), but should be white in both cases (at least that is how it is in native applications) Example: Theme combo in Preferences > General > Appearance. This shouldn't stop us from releasing this, though :-) BTW, I wonder if we could just disable styling the widgets in dark mode and just use the native dark look of buttons etc.
Thanks for trying it out, Till! I initially thought only the window title bar would be affected but all the widgets are affected. (In reply to Till Brychcy from comment #7) > I'm already using it for a few days now and it is great. > > The only minor issue I noted so far is that the text color in Combo widgets > isn't optimal - it is black when the menu is not shown and some gray when > the menu is shown (which looks a bit like the items are disabled), but > should be white in both cases (at least that is how it is in native > applications) > Example: Theme combo in Preferences > General > Appearance. I agree that the items look like they are disabled. Will open a bug for this. > BTW, I wonder if we could just disable styling the widgets in dark mode and > just use the native dark look of buttons etc. May we could try this, at least for widgets like Button, Table/Tree (to get the alternating dark background lines). Will open a bug for this.
Gerrit change https://git.eclipse.org/r/135856 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d9cbf6812bd7c17517ae96f6d834539c211fd8c2
I also did a quick test. Looks so much better. Good job!!! One think I noticed: I have to enable dark mode in macOS *and* in eclipse to make this work. Wouldn't it be a good idea to automatically switch to the dark theme when we notice that macOS is running in dark mode?
Thanks for testing, Matthias! (In reply to Matthias Becker from comment #10) > I also did a quick test. Looks so much better. > Good job!!! > > One think I noticed: > I have to enable dark mode in macOS *and* in eclipse to make this work. > Wouldn't it be a good idea to automatically switch to the dark theme when we > notice that macOS is running in dark mode? We started in that direction in Bug 540357 but there were other issues to be fixed. We plan to continue working on that.
(In reply to Lakshmi Shanmugam from comment #8) > > The only minor issue I noted so far is that the text color in Combo widgets > > isn't optimal - it is black when the menu is not shown and some gray when > > the menu is shown (which looks a bit like the items are disabled), but > > should be white in both cases (at least that is how it is in native > > applications) > > Example: Theme combo in Preferences > General > Appearance. > I agree that the items look like they are disabled. Will open a bug for this. Opened Bug 544041 > > BTW, I wonder if we could just disable styling the widgets in dark mode and > > just use the native dark look of buttons etc. > May we could try this, at least for widgets like Button, Table/Tree (to get > the alternating dark background lines). Will open a bug for this. Opened Bug 543889
(In reply to Lakshmi Shanmugam from comment #12) > > > BTW, I wonder if we could just disable styling the widgets in dark mode and > > > just use the native dark look of buttons etc. > > May we could try this, at least for widgets like Button, Table/Tree (to get > > the alternating dark background lines). Will open a bug for this. > Opened Bug 543889 Sorry, it's Bug 544039.
Verified in I20190218-1800. Thanks Alex for the initial pointers on how to get this working.
(In reply to Lakshmi Shanmugam from comment #14) > Verified in I20190218-1800. > > Thanks Alex for the initial pointers on how to get this working. You're welcome.
How to use this approach simply from SWT (without other Eclipse dependencies)?
(In reply to Thomas Singer from comment #16) > How to use this approach simply from SWT (without other Eclipse > dependencies)? In 4.12, SWT applications on Mac will automatically launch in dark or light theme based on the System appearance when the system property org.eclipse.swt.display.useSytemTheme is set to true. (Bug 540357)