RFR: 7056: Fix dark mode [v2]

Alex Macdonald aptmac at openjdk.org
Thu Jan 18 09:14:46 UTC 2024


On Thu, 18 Jan 2024 09:11:47 GMT, Brice Dutheil <bdutheil at openjdk.org> wrote:

>> This change allows a user of the JMC RCP application to switch the appearance with the default Eclipse themes.
>> 
>> Those are shipped via the `org.eclipse.ui.themes` and `org.eclipse.e4.ui.css.swt.theme` plugin.
>> In order to activate them all that is is required is to add the above in the application feature file, and to declare them in the application manifest file.
>> 
>> 
>> 
>> **After**
>> ![Screenshot 2022-01-16 at 16 23 46](https://user-images.githubusercontent.com/803621/149666554-3016effc-b527-4dd7-aa6b-baa07a9569ad.png)
>> ![Screenshot 2022-01-16 at 16 26 21](https://user-images.githubusercontent.com/803621/149666560-cab76fc9-dd9a-4977-9fe7-0a7dc99335c5.png)
>> 
>> 
>> 
>> **Before**
>> ![Screenshot 2022-01-16 at 16 24 45](https://user-images.githubusercontent.com/803621/149666542-b8e22717-a797-44b6-9805-30b9c14fb9fa.png)
>> There's no theme, as such the combo box doesn't open either.
>
> Brice Dutheil has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
> 
>  - Merge branch 'master' into rcp-appearance-theme
>  - Allow dark appearance for the RCP distribution

The more I think about this, the more I think this should probably go in and have component-specific touchups if/as needed afterwards. This PR was brought up at one of the bi-weekly meetings a while ago ([comment](https://bugs.openjdk.org/browse/JMC-7056?focusedId=14621118&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14621118)), and the thought was this issue/PR could be renamed to something like "Enable dark mode" instead of "Fix [..]".

The original hesitation was that not all components will respect the dark theme, especially the ones that use HTML or AWT behind the hood. But maybe they don't have to .. I've been trying out the Auto Dark Mode for Chrome and my docs/spreadsheets look similar to how the charts/components stick out in a dark mode JMC, and it's good enough for my use..:

![Screenshot_from_2023-11-28_09-24-22_50](https://github.com/openjdk/jmc/assets/10425301/5c077d12-0ec2-45ea-a3e4-c1d7b6418f7c)

-------------

Marked as reviewed by aptmac (Reviewer).

PR Review: https://git.openjdk.org/jmc/pull/362#pullrequestreview-1753064374


More information about the jmc-dev mailing list