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

Hi Nikita,

Thank you for the detailed explanation.

I suggest avoiding Table.setHeaderBackground is possible.

I was not aware of having set a custom table header background, but you are right. Without setting it, it looks fine and the original reason why we had to set it (better visibility of the allowed area for drag and drop reordering in a table) has been resolved by not using a table control for the drag and drop reordering control.

--
Best regards,
Thomas Singer
=============
syntevo GmbH
https://www.syntevo.com
https://www.syntevo.com/blog



On 2018-04-26 12:38, Nikita Nemkin wrote:
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



_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top