Open tmssngr opened 2 years ago
could anyone elaborate the issue ?
Well, none of the used display.getSystemColor
invocations returns the used title color (white - as you can see from the screenshot). If the API needs to be fixed, fix it. If it is not supported any more by the OS, deprecate and later remove it.
Note that you can use the ControlExample to share the color palette, that can save a few minutes in building a snippet.
COLORTITLE* do work as expected on other OS, so they probably shouldn't be deprecated. If win32 doesn't export equivalent colors any more, then SWT could try to build them heuristically: according to eg background and foreground color, mix them into something that can be fine for title.
I have tried it on below environment and see the same behavior as in the screen shot attached by Thomas Singer. Eclipse SDK Version: 2023-09 (4.29) Build id: I20230712-1800 OS: Windows 11, v.10.0, x86_64 / win32 Java vendor: Eclipse Adoptium Java runtime version: 20+36 Java version: 20
I totally understand there is no way to get the title color with SWT.COLORTITLE* constants.
But i figured out that we can set the title colors in the below manner as well, just thought if it might be of some help to anyone who is trying to set title colors (though not from SWT.COLORTITLE* constants - i agree).
Settings => Personalization => Accent color(Manual => select the color you want your title to show up with) and turn on "Show accent color on title bars and windows borders" option below Accent color. But yeah the color gets applied to both title bars and windows borders - both at once and cant be done one at a time.
Please run the attached snippet. It will show the colors reported by the different SWT.COLORTITLE* constants. As you see, they obviously differ from the title color.![screenshot](https://user-images.githubusercontent.com/6029561/160812772-8a0b8899-a15a-47a6-8163-b7a630ec8d5a.png)
TitleColor.txt