Use new SWT Display.setDarkThemePreferred() API for dark theme#3874
Use new SWT Display.setDarkThemePreferred() API for dark theme#3874vogella wants to merge 2 commits into
Conversation
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
9799983 to
f89bc47
Compare
|
It would seem better if you experimented locally in your workspace until it’s working well rather than in a public draft PR that generates yet more email about interim states of progress that are, in my opinion, best managed by you privately until it’s ready for prime time. I don’t think verification builds are providing value in this case, do they? Perhaps such builds only contribute to global warming and to email generation. I’m tempted to ask about all the things I see being deleted, but it’s a draft so maybe pointless it’s a pointless question. |
f7d8536 to
9799983
Compare
By using the dark API from SWT, we can delete the processors in platform.ui. The processors were doing it platform specific. Once this is in we can delete the fragment projects. |
|
So much mail. Please can this be reduced? Are the repeated builds and cascading notifications necessary? It just seems to be getting worse by the day. So many activities in parallel in public, driving endless builds and around the clock notifications. Please, please reconsider your work patterns. Complete the design and testing before feeling the urge to create yet another draft on yet another topic in parallel to several others. |
Sure, I think you said the same in #3881 (comment). |
9799983 to
1e3e990
Compare
The cross-platform SWT API Display.setDarkThemePreferred(boolean) now drives dark mode for native components, so the platform-specific dark theme processors and the manual dark styling in IDEApplication are no longer needed. The ThemeEngine already signals the OS dark mode preference whenever the CSS theme changes. Remove the dark theme processors: - org.eclipse.e4.ui.swt.gtk (DarkThemeProcessor using OS.setDarkThemePreferred) - org.eclipse.e4.ui.swt.win32 (DarkThemeProcessor using OS.setTheme) - org.eclipse.e4.ui.workbench.renderers.swt.cocoa (CocoaDarkThemeProcessor using OS.setTheme) The gtk and win32 fragments only existed to host these processors and are removed together with their entries in the org.eclipse.e4.rcp feature. The cocoa fragment is kept because it still provides other processors. In IDEApplication, the manual dark styling (hardcoded colors, SWT.Show listeners, recursive style application) is dropped in favor of the early display.setDarkThemePreferred(true) call for the workspace selection dialog. Fixes eclipse-platform#3857
1e3e990 to
16fba4f
Compare

Dark mode for native components (title bars, scrollbars, native dialogs) is now handled by the cross-platform SWT API
Display.setDarkThemePreferred(boolean), which the ThemeEngine calls whenever the CSS theme changes.This makes the platform-specific dark theme processors for GTK, Win32 and Cocoa obsolete, so they are removed.
The GTK and Win32 fragments only existed to host their processor and are deleted together with their entries in the
org.eclipse.e4.rcpfeature; the Cocoa fragment is kept because it still provides other processors.IDEApplication no longer applies manual dark styling (hardcoded colors,
SWT.Showlisteners, recursive styling) and instead relies on the earlyDisplay.setDarkThemePreferred(true)call for the workspace selection dialog.Fixes #3857