Skip to content
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

Selected icons in toolbar look white in the dark theme #2570

Open
vogella opened this issue Dec 3, 2024 · 10 comments
Open

Selected icons in toolbar look white in the dark theme #2570

vogella opened this issue Dec 3, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@vogella
Copy link
Contributor

vogella commented Dec 3, 2024

Toolbar buttons which are selected are incorrectly styled in the dark theme under Windows.

image

@mvm-sap can you have a look?

@vogella vogella added the bug Something isn't working label Dec 3, 2024
@mvm-sap
Copy link
Contributor

mvm-sap commented Dec 5, 2024

@vogella What is the expected style for the selected toolbar buttons?

@vogella
Copy link
Contributor Author

vogella commented Dec 5, 2024

Not sure what the SWT offers under windows but a dark background would be nice

@vogella
Copy link
Contributor Author

vogella commented Dec 6, 2024

On Linux it looks good:

image

@vogella vogella changed the title Selected icons in toolbar look white in the darkt theme Selected icons in toolbar look white in the dark theme Dec 9, 2024
@mikevwdriver
Copy link

mikevwdriver commented Dec 30, 2024

@vogella Can you please post screenshots from Windows? I just ran the latest I-Build on Windows and did not observe any improvement in this area.

image

@vogella
Copy link
Contributor Author

vogella commented Dec 30, 2024

See first entry. The second one is from Linux

@MikeMCrank
Copy link

MikeMCrank commented Dec 31, 2024

With some changes to Win32 SWT, it's possible to get control over the color used for the ToolBar Items.
image

Before:
image

After:
image

With Hover:
Before:
image

After:
image

Presently I'm uncertain what the best way to source/configure the colors are. Currently It's using the following two colors:
Hover - OS.COLOR_BTNSHADOW
Selected - OS.COLOR_GRAYTEXT

@MikeMCrank
Copy link

MikeMCrank commented Jan 2, 2025

I did a bit more work in this area, specifically for Drop Down items which were styled differently when hot.

Before:
image

After:
image

You'll notice that the non-hot icons have also changed as well to a lighter colored triangle (which is really helpful for darker themes)

It works by doing some custom draw handling and I've written it so that it's essentially producing pixel-perfect results in 100%,150%,200% dpi/zoom levels.

@MikeMCrank
Copy link

I've also taken some time to get toolbar buttons with text to render correctly:
Before:
image

After:
image

The original problem was mentioned in eclipse-platform/eclipse.platform.swt#1696

@MikeMCrank
Copy link

It's worth noting that we have the complete flexibility to change the presentation here.

For example, matching MacOS dark theme:
image

In Windows:
image

@MikeMCrank
Copy link

I suppose we may need to move this issue into the SWT repository:
https://github.com/eclipse-platform/eclipse.platform.swt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants