Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT 4.8 (master) vs. 4.7


On Thu, Apr 26, 2018 at 2:32 PM, Thomas Singer <ts-swt@xxxxxxxxxxx> wrote:
Hello,

After using SWT 4.7 for a long time, I've now built 4.8 (latest commit on master), but the unfocused selection color that matches the color of the sorting table header prevents me from using it - see attached screenshot (the background uses SWT 4.8 master and the foreground 4.7). I wonder whether this color is by design?

The behavior you see is by design, but the design could be improved.

Native Header control doesn't support custom background color, because native background is a bitmap. When a custom background color is set, SWT has to draw the header manually. Drawing a header background requires 5 colors: normal, hover, pressed, sorted, sort indicator. SWT uses simple color manipulation to derive _some_ of these colors from a single background color. In your screenshot, sorted color #d7d7d7 is derived from background color #efeff0 and clashes with passive selection color #d9d9d9 by accident.

Maybe SWT shouldn't derive a separate sorted color at all. (E.g. Win10 uses white for both normal and sorted.)

I suggest avoiding Table.setHeaderBackground is possible.


Best regards,
Nikita Nemkin


Back to the top