Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 563296 - [CSS] add color extension for hard coded color #515658
Summary: [CSS] add color extension for hard coded color #515658
Status: CLOSED MOVED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 563541
  Show dependency tree
 
Reported: 2020-05-18 10:58 EDT by Amit Mendapara CLA
Modified: 2020-05-28 14:51 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Mendapara CLA 2020-05-18 10:58:47 EDT
The hard coded color #515658 in dask theme css files doesn't make the default gnome dark theme (Adwaita dark). It's better to introduce some color extension so that we can provide a correct color #353535 for gtk dark theme.
Comment 1 Lars Vogel CLA 2020-05-26 03:18:23 EDT
Amit, please suggest Gerrit
Comment 2 Amit Mendapara CLA 2020-05-26 03:56:43 EDT
(In reply to Lars Vogel from comment #1)
> Amit, please suggest Gerrit

I will try soon.

BTW, the best option is to remove the "e4-dark_globalstyle.css" from the "e4-dark_linux.css" and let the "DarkThemeProcessor" call "OS.setDarkThemePreferred" some how before "Display" is created.

Right now "OS.setDarkThemePreferred" is called only after "Display" is created so the system colors are not detected properly.

This can also fix #563290.

I have tried myself but eclipse source code is too complex for me to do it in correct way.
Comment 3 Lars Vogel CLA 2020-05-26 04:26:11 EDT
i don't think we can call, "OS.setDarkThemePreferred" before the Display is created, but maybe SWT can reread the colors on this call.

Adding Alexander for comments.
Comment 4 Amit Mendapara CLA 2020-05-26 04:43:16 EDT
(In reply to Lars Vogel from comment #3)
> i don't think we can call, "OS.setDarkThemePreferred" before the Display is
> created, but maybe SWT can reread the colors on this call.
> 
> Adding Alexander for comments.

I tried calling `Display.initializeSystemColors` using reflection (as it's package private) and it was working. However, I am not sure whether calling `Display.initializeSystemColors` here require some cleanup as the method seems to be using some native code.
Comment 5 Amit Mendapara CLA 2020-05-28 14:51:45 EDT
No need if changes from Bug 563684 are accepted.