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 intoeclipse-platform:masterfrom
Conversation
Test Results 852 files ±0 852 suites ±0 55m 19s ⏱️ - 2m 18s For more details on these failures, see this check. Results for commit 9799983. ± Comparison against base commit 357b87c. ♻️ This comment has been updated with latest results. |
|
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. |
232c721 to
841a82a
Compare
Replace platform-specific dark theme processors (Win32, GTK, Cocoa) with the new cross-platform SWT API Display.setDarkThemePreferred(boolean). The ThemeEngine now calls display.setDarkThemePreferred() directly when a theme is set, signaling the dark mode preference to the OS for native components like title bars, scrollbars, and native dialogs. In IDEApplication, the manual dark styling (hardcoded colors, SWT.Show listeners, recursive style application) is replaced with a single call to display.setDarkThemePreferred(true) during early startup. Dark theme processor code removed from: - org.eclipse.e4.ui.swt.win32 (DarkThemeProcessor using OS.setTheme) - org.eclipse.e4.ui.swt.gtk (DarkThemeProcessor using OS.setDarkThemePreferred) - org.eclipse.e4.ui.workbench.renderers.swt.cocoa (CocoaDarkThemeProcessor using OS.setTheme) The bundles themselves are kept for later retirement. Fixes eclipse-platform#3857
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). |

Summary
Replace platform-specific dark theme processors (Win32, GTK, Cocoa) with the new cross-platform SWT API
Display.setDarkThemePreferred(boolean)from eclipse-platform/eclipse.platform.swt#3184.Changes
ThemeEngine (cross-platform)
display.setDarkThemePreferred(isDark)directly insetTheme(), signaling the OS dark mode preference whenever the CSS theme changes.[3.134.0,4.0.0)for the new API.IDEApplication (startup simplification)
SWT.Showlisteners, recursive style application on splash/workspace dialog) with a singledisplay.setDarkThemePreferred(true)call during early startup.applyDarkStyles(),applyStylesRecursive(), and theisDarkfield.Removed dark theme processor code from (bundles kept for later retirement):
DarkThemeProcessorusing internalOS.setTheme()DarkThemeProcessorusing internalOS.setDarkThemePreferred()CocoaDarkThemeProcessorusing internalOS.setTheme()Cleaned up
MANIFEST.MFimports,fragment.xmlextensions, and removed the now-unnecessaryRequire-Bundleonorg.eclipse.e4.ui.css.swt.themefrom the cocoa bundle.Note
Fixes #3857