| Summary: | [CSS] [dark theme] Package Explorer text colors are black on black on Dark Theme (based on EGit preferences) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Gorkem Ercan <gorkem.ercan> | ||||||
| Component: | UI | Assignee: | Project Inbox <egit.ui-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Lars Vogel <Lars.Vogel> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | adam.gent, andrea.guarinoni, daniel.rolka, kaloyan, Lars.Vogel, matteo.mortari, matthias.sohn, piero.campa, psuzzi | ||||||
| Version: | 3.4 | ||||||||
| Target Milestone: | 3.4 | ||||||||
| Hardware: | Macintosh | ||||||||
| OS: | Mac OS X | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 433475, 435083 | ||||||||
| Attachments: |
|
||||||||
|
Description
Gorkem Ercan
Created attachment 241029 [details]
screenshot
a screenshot of the problem
Gorkem, is this something which can be configured in the "Colors and Fonts" part of the preferences? If yes, could you name the perference key? Otherwise this is currently not stylable via CSS. I am not sure... But the main problem is the text color for only some of the tree items are black and the rest are white. I could not catch a pattern. I only observe this when the dark theme is on. It should be styleable with CSS. These CSS snippets change the colors of trees at least in Java perspective for me, on WIndows:
.MPartStack .MPart Tree {
background-color: #000000 #48585e #284049 #48585e 0% 99% 100% false;
color: #ffffff;
}
.MPartStack.active .MPart Tree {
background-color: #000000 #1eade3 #f5f6f7 #1eade3 0% 1% 100% false;
color: #000000;
}
I'm currently adding something similar using Jeeeyul's Eclipse Themes plugin.
This is probably the color of the shared folder/files. Can you try if after importing this epf (https://github.com/guari/eclipse-ui-theme/blob/master/com.github.eclipseuitheme.themes.plugin/bin/color-scheme/RainbowDrops.epf?raw=true) the color changes? To import use: File > Import... then select General > Preferences. (Take a backup of your settings before trying: File > Export... then select General > Preferences) I just figured out the black foreground color is coming from Git "uncommitted change"(foreground)" preference. (In reply to Gorkem Ercan from comment #6) > I just figured out the black foreground color is coming from Git > "uncommitted change"(foreground)" preference. Can you identify the preference key? If, than EGit could fix that with an extension to the dark theme. (In reply to Lars Vogel from comment #7) > (In reply to Gorkem Ercan from comment #6) > > I just figured out the black foreground color is coming from Git > > "uncommitted change"(foreground)" preference. > > Can you identify the preference key? If, than EGit could fix that with an > extension to the dark theme. Previous .epf link, 'org.eclipse.ui.workbench/org.eclipse.egit.ui.*' values ;) org.eclipse.ui.workbench/org.eclipse.egit.ui.UncommittedChangeForegroundColor fixes it for me. I don't understand what you want us to do in order to help fixing this issue. (In reply to Gorkem Ercan from comment #9) > org.eclipse.ui.workbench/org.eclipse.egit.ui. > UncommittedChangeForegroundColor fixes it for me. Gorkem, can you create a Gerrit review with your preferred setting for EGit UI? The change would be similar to https://git.eclipse.org/r/#/c/26006/ The contribututed CSS would look similar to IEclipsePreferences#org.eclipse.ui.workbench { preferences: 'org.eclipse.egit.ui.UncommittedChangeForegroundColor=52,57,61' } with the correct color code (I just left the color code in for you as example). @Matthias, does this also answer your question? Some background: Platform is not allowed to set values for EGit but we enabled projects to contribute to the dark theme their specific setting. Note: I'm surprised EGit is using org.eclipse.ui.workbench as preference store. What is the background of that? Gerrit review: https://git.eclipse.org/r/#/c/26227/ (I was wondering if the new CSS preferences for org.eclipse.ui.workbench override the others defined in Platform stylesheet...) (In reply to Lars Vogel from comment #11) > Note: I'm surprised EGit is using org.eclipse.ui.workbench as preference > store. What is the background of that? where did you find that EGit is using org.eclipse.ui.workbench as preference store ? (In reply to Andrea Guarinoni from comment #12) > Gerrit review: https://git.eclipse.org/r/#/c/26227/ thanks for the patch, how can I test it ? > (I was wondering if the new CSS preferences for org.eclipse.ui.workbench > override the others defined in Platform stylesheet...) (In reply to Matthias Sohn from comment #13) > > where did you find that EGit is using org.eclipse.ui.workbench as preference > store ? It's in the epf file linked from comment #5 /instance/org.eclipse.ui.workbench/org.eclipse.egit.ui.UncommittedChangeBackgroundColor=32,32,32 That means it's in the org.eclipse.ui.workbench node. Can you point to where that pref is set or used in your code? PW (In reply to Matthias Sohn from comment #14) > (In reply to Andrea Guarinoni from comment #12) > > Gerrit review: https://git.eclipse.org/r/#/c/26227/ > > thanks for the patch, how can I test it ? > > > (I was wondering if the new CSS preferences for org.eclipse.ui.workbench > > override the others defined in Platform stylesheet...) Apply the patch and start a new Eclipse instance/workspace, then go to 'Preferences > Appearance' and switch the theme to 'Dark', you should see that the colors defined into 'e4-dark_egit_prefstyle.css' are automatically loaded as default in 'Preferences > Appearance > Colors and Fonts : Git node'. Check also that switching to 'Dark' with or without the patch gives the same result for colors defined in 'Preferences > Appearance > Colors and Fonts : Basic node'. (In reply to Paul Webster from comment #15) > (In reply to Matthias Sohn from comment #13) > > > > where did you find that EGit is using org.eclipse.ui.workbench as preference > > store ? > > It's in the epf file linked from comment #5 > > /instance/org.eclipse.ui.workbench/org.eclipse.egit.ui. > UncommittedChangeBackgroundColor=32,32,32 > > That means it's in the org.eclipse.ui.workbench node. Can you point to > where that pref is set or used in your code? https://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java lines 93, 402, 635 https://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java line 88 https://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.ui/plugin.xml line 548 Created attachment 242916 [details]
black text on dark background
(In reply to Andrea Guarinoni from comment #16) > (In reply to Matthias Sohn from comment #14) > > (In reply to Andrea Guarinoni from comment #12) > > > Gerrit review: https://git.eclipse.org/r/#/c/26227/ > > > > thanks for the patch, how can I test it ? > > > > > (I was wondering if the new CSS preferences for org.eclipse.ui.workbench > > > override the others defined in Platform stylesheet...) > > Apply the patch and start a new Eclipse instance/workspace, then go to > 'Preferences > Appearance' and switch the theme to 'Dark', you should see > that the colors defined into 'e4-dark_egit_prefstyle.css' are automatically > loaded as default in 'Preferences > Appearance > Colors and Fonts : Git > node'. > > Check also that switching to 'Dark' with or without the patch gives the same > result for colors defined in 'Preferences > Appearance > Colors and Fonts : > Basic node'. This works nicely with Theme: dark Color and font theme: default but when I set Color and font theme: reduced palette the git decoration on projects again uses black text on dark background, see attachment (In reply to Matthias Sohn from comment #19) > > This works nicely with > > Theme: dark > Color and font theme: default > > but when I set > > Color and font theme: reduced palette > > the git decoration on projects again uses black text on dark background, see > attachment Thanks for testing Matthias, the latest issue is not related to Egit configuration, it is the value assigned in org.eclipse.ui.workbench/DECORATIONS_COLOR for 'Reduced Palette'. At this time, only the 'Default' ColorsAndFonts theme can be extended. Can you open another bug for it in Platform UI? A possible workaround might be patching EGit by adding a dedicated preference for it by overriding the workbench value but it's a deprecable behavior. See also the more generic Bug 432750 that may address those kinds of issues. merged as bd2f78535f4a923e79f5e8db898d91f17c1c1a2a Thanks Matthias, (In reply to Matthias Sohn from comment #17) > https://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.ui/plugin.xml > line 548 It looks like color and font definitions through the 3.x themes extension point end up saved as preferences on the o.e.ui.workbench pref node. How odd. I'm going to look into it, but we won't be changing it as it's more of a curiosity than a software problem. Even if it was a real pref set on o.e.ui.workbench, it was more of a question of how than an actual problem (the only potential problem is starting a bundle early, and o.e.ui.workbench is probably started before EGit UI :-) PW I see this problem in EGit 3.5.1. Is it only me or there is a regression? Perhaps a false alarm. I launched the IDE in a new workspace and the problem has gone... Still getting black text here with EGit 3.6.2 on Luna (Linux 86_x64) with a dark theme. Any clue? Thanks. I still see this issues with Eclipse Mars and I guess Egit 4.0.0 I also see it from time to time, but I have no clear steps to reproduce. Switching to a new workspace always helps. Brand-new Eclipse Mars.1 v4.5.1 had again this problem. I changed General > Appearance > Colors and Font > Git > Uncommitted Change (Foreground) manually from black to white. There is a regression in Neon, tracked via Bug 496585 - [Dark Theme] black labels UI coloring bug on package explorer and outline |