| Summary: | [10.15] Mac dark theme not listed in Eclipse | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lakshmi P Shanmugam <lshanmug> | ||||||
| Component: | UI | Assignee: | Lakshmi P Shanmugam <lshanmug> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | a.nesheret, akarjakina, alexandr, cgatesman, greg_pugh, lshanmug, ma.becker, nobody, peter, register.eclipse, sravankumarl | ||||||
| Version: | 4.13 | Flags: | sravankumarl:
review+
|
||||||
| Target Milestone: | 4.14 RC1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X | ||||||||
| See Also: |
https://git.eclipse.org/r/151138 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b8325a5581313c7b40774fcaa870905e1b18938b https://git.eclipse.org/r/153176 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1ece5e5955171db322072c4b9965874a589a8502 |
||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 550891 | ||||||||
| Attachments: |
|
||||||||
|
Description
Lakshmi P Shanmugam
Running a simple SWT snippet with org.eclipse.swt.display.useSystemTheme property set to true starts the SWT application in dark theme. May be this needs to be fixed in Platform UI. Sravan, can you please take a look? Created attachment 280234 [details]
"Dark Themed" Eclipse after upgrading to macOS 10.15
This is a screenshot of what my Eclipse 4.13 looks like now after upgrading to macOS 4.13 (Catalina). Before the upgrade, the entire window was dark themed. I don't remember what the theme setting said, before, but now, nothing is selected, and no "Dark [macOS]" exists (there is only Windows and Linux).
Created attachment 280235 [details]
Eclipse 4.13 Theme Preferences
Notice in the screenshot, there doesn't appear to be options for macOS.
I believe this happens because of the way org.eclipse.ui.themes plugin declares dark theme for macOS using the os_version restriction:
<theme
basestylesheeturi="css/e4-dark_mac1013.css"
id="org.eclipse.e4.ui.css.theme.e4_dark"
label="%theme.dark"
os="macosx"
os_version="10.11,10.12,10.13">
</theme>
<theme
basestylesheeturi="css/e4-dark_mac.css"
id="org.eclipse.e4.ui.css.theme.e4_dark"
label="%theme.dark"
os="macosx"
os_version="10.14">
</theme>
The os_version is checked for equality only in ThemeEngine of org.eclipse.e4.ui.css.swt plugin:
This means that for each new version of macOS a new declaration has to be made. I believe the should be the possibility to declare an open range, or have a different test to make sure that new versions of macOS are automatically supported.
As a workaround manually editing the os_version="10.14" line in the theme to be os_version="10.14,10.15" and restarting Eclipse with -clean appears to work. I will investigate whether I can create a generic solution for this problem New Gerrit change created: https://git.eclipse.org/r/151138 (In reply to Peter Severin from comment #5) > This means that for each new version of macOS a new declaration has to be > made. I believe the should be the possibility to declare an open range, or > have a different test to make sure that new versions of macOS are > automatically supported. Absolutely agree. It's bad that we need to adapt this for every OS release. Gerrit change https://git.eclipse.org/r/151138 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b8325a5581313c7b40774fcaa870905e1b18938b added 10.15 ro the list of versions. I will continue to investigate a solution to find a generic solution. I am thinking of the following lines instead of having only equality for the os_string(like os_version = "10.15") I am thinking of implementing <, > also (In reply to Sravan Kumar Lakkimsetti from comment #11) > added 10.15 ro the list of versions. I will continue to investigate a > solution to find a generic solution. > > I am thinking of the following lines > > instead of having only equality for the os_string(like os_version = "10.15") > I am thinking of implementing <, > also If you don't find time for that you could at least already list 10.16,10.17,10.18,10.19,10.20 so it will work at least for the next 5 years unless apples switches the major version to 11 (In reply to Sravan Kumar Lakkimsetti from comment #11) > added 10.15 ro the list of versions. I will continue to investigate a > solution to find a generic solution. > > I am thinking of the following lines > > instead of having only equality for the os_string(like os_version = "10.15") > I am thinking of implementing <, > also An alternative could be that one specify a theme without an os_version and one with speciifc os_versions and the algorithm takes the one with the specific version if version matches exactly but takes the one without an os_versions for all other versions. So that a theme contribution without os_version is the default one and may be overwritten by other contributions with more specific os_version strings. But that change is maybe an incompatible change with regards to behaviour... New Gerrit change created: https://git.eclipse.org/r/153176 (In reply to Eclipse Genie from comment #14) > New Gerrit change created: https://git.eclipse.org/r/153176 The patch removes the version info from one dark theme declaration and it applies to all versions. On 10.11 to 10.13, the theme with specific versions will be registered. On newer versions, the generic theme will be registered. Tested on 10.13 and 10.15 Gerrit change https://git.eclipse.org/r/153176 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1ece5e5955171db322072c4b9965874a589a8502 @Sravan, Thanks for the review! Verified with I20191127-1800 |