eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Selected icons in toolbar look white in the dark theme

Open vogella opened this issue 1 year ago • 10 comments

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

image

@mvm-sap can you have a look?

vogella avatar Dec 03 '24 12:12 vogella

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

mvm-sap avatar Dec 05 '24 10:12 mvm-sap

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

vogella avatar Dec 05 '24 15:12 vogella

On Linux it looks good:

image

vogella avatar Dec 06 '24 11:12 vogella

@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

mikevwdriver avatar Dec 30 '24 20:12 mikevwdriver

See first entry. The second one is from Linux

vogella avatar Dec 30 '24 20:12 vogella

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 avatar Dec 31 '24 21:12 MikeMCrank

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 avatar Jan 02 '25 02:01 MikeMCrank

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 avatar Jan 02 '25 16:01 MikeMCrank

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 avatar Jan 02 '25 18:01 MikeMCrank

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

MikeMCrank avatar Jan 02 '25 19:01 MikeMCrank