-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWT Dark Theme ToolItem Toggle Buttons not showing down state #467
Comments
@vogella I've identified the commit that caused this issue: Before this commit, ToolItem toggle buttons had a color that indicated their down state, starting with this commit, the down state is no longer apparent on Dark theme. edit: It does appear that regular SWT toggle buttons were broken by a different commit than the ToolItem toggle buttons. For this separate issue, I've opened eclipse-platform/eclipse.platform.swt#483 |
If I remove this one line from CSSPropertyBackgroundSWTHandler.java, the ToolItems are styled correctly. |
Okay, more information. This is a bug that affects the standard Eclipse IDE. Our product has it's own custom CSS, it was affected by this change as well, however, simply by removing all instances of ToolItem in our dark theme CSS files, we are no longer affected by this issue. I took a look at the platform CSS and although it does not directly reference ToolItem, I suspect it is inheriting a rule which causes the background to be explicitly set, which will unfortunately have an effect on the toggled/checked state. |
Is there any update on fixing this issue? I am using now eclipse At Console, JUnit, Project explorer and many more views it is not possible to determine if an icon inside a view toolbar is enabled or disabled. Using the dark mode with Linux Mint (GTK) variants, there is absolutely no way to check this. Especially when it comes to the console view this is very irritating (e.g. the "Show console log when standard out changes"). There is no menu inside where I can check the states (as a workaround): (remark: i toggled the states on/off and it always look the same...) |
Hmm... tried out oomp-installer + platform IDE - starting Eclipse 2023-03 (master) I had following: The toolbar icons are now correct rendered with Theme "dark". Enabled ToggleIcons have now a border again, so it's clear which state they have. If this looks same in JDT (and I think so) than this has been already fixed for 2023-03 |
Some of the screenshots here show many views opened in the same part stack, i.e. there are many tabs. When there are many tabs, the toolbar buttons will be painted not on the tab bar, but below it. You might want to check this case as well, just in case (since the last screenshot I see has only a few tabs and the toolbar buttons are painted on the tab bar). |
…#536 - Toolbar has in dark mode now a dedicated color instead of css inheritance. A parent container change by resizing does not change the toolbar color any longer - The color is choosen in way that the main toolbar looks as expected before. Also the toggle border is now visible again, which could address eclipse-platform#467 as well. Signed-off-by: Albert Tregnaghi <[email protected]>
…#536 - Toolbar has in dark mode now a dedicated color instead of css inheritance. A parent container change by resizing does not change the toolbar color any longer - The color is choosen in way that the main toolbar looks as expected before. Also the toggle border is now visible again, which could address eclipse-platform#467 as well. Signed-off-by: Albert Tregnaghi <[email protected]>
Still present in 2023-03. Is there a workaround? This is really annoying, e.g. with the button "Skip all breakpoints". |
Using GTK+ Inspector and comparing toolbar buttons with Breeze Dark on KDE:
In an SWT example for toolbar button toggles,
The unexpected color
The used color is defined here:
In
The code in
Seems odd that this would overwrite the other states (disabled, checked, etc.) from the theme... Maybe all of the The change was added for: https://bugs.eclipse.org/bugs/show_bug.cgi?id=579470 I don't understand why this styling doesn't apply to the main toolbar. Maybe because the |
@nnemkin can you take this over? I'm not sure what the best approach here is. For Breeze Dark, this behavior emulates what the main toolbar does:
But if the toolbar is drawn on the same line as tabs in a part stack, the color difference is not enough to see the toggled-off button. Since the part stack line has the same color as the toolbar button background. It doesn't look like the platform UI
IMO the first step here is to make the main toolbar behave the same as the view toolbar. As well as, to ensure the view toolbar buttons are visible both when drawn in the view client area and when drawn on the tab line of the view part stack. Then a color can be chosen with which using |
It has been some time when I tried to fix the problem and maybe it got lost, so I bring up my thoughts here: In my draft PR #538 I fixed this problem, but I was forced to remove c07ab53 to get it working. (done in second commit of my draft PR, you can see the new (and good looking )UI behavior inside a picture at #538 (comment)). I am not very good in SWT or in SWT CSS styling - I was/am stuck at this point. And I am running out of time. But maybe my draft PR is an idea for somebody else? @akurtakov , @vogella : Maybe the remove or an improvement of c07ab53 could be an option? The current situation is extreme annoying (at least for myself) . |
I'm sorry but I can not dedicate time to look into this one. |
With the update dark theme for 2025-03 this should be gone, now on Windows the selected state is a bit to visible see #2570 To test please use latest I-Build https://download.eclipse.org/eclipse/downloads/ |
I am using the 2022-12 RC1 on Windows 10. Toggle buttons in tool bars and even regular toggle buttons are not showing their down state as expected.
You can't tell, but the sync with editor button is currently pressed down.
The same issue can be seen in the perspective chooser:
The text was updated successfully, but these errors were encountered: