RFR: 7056: Fix dark mode [v2]

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


On Tue, 28 Nov 2023 14:37:30 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

>> 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)

> @aptmac I can see the side of this argument. Would you like me to re-name this PR and the associated ticket ? And then make a census of the "broken" items ?

Yeah I think that would be the right way to go.

> Also maybe you have some insights to the SWT / Eclipse APIs to look for, in order to fix the broken components as in this [#362 (comment)](https://github.com/openjdk/jmc/pull/362#issuecomment-1013900500)

I don't have anything off the top of my head. Thinking back I recall a lot of the backgrounds and colours being set manually within components in JMC, that's where my first search would go. Maybe for charts we could have some class/toolkit that can return standardized background/foreground/component colours, and these colour values change based on whether JMC is in light or dark mode?

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

PR Comment: https://git.openjdk.org/jmc/pull/362#issuecomment-1831991434


More information about the jmc-dev mailing list