| Summary: | [win32][Dark theme] Table header delimiters color is bad for dark theme | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Alexandr Miloslavskiy <alexandr.miloslavskiy> | ||||||||
| Component: | SWT | Assignee: | Alexandr Miloslavskiy <alexandr.miloslavskiy> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | Niraj Modi <niraj.modi> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | alexandr.miloslavskiy, Lars.Vogel, nikita, niraj.modi, ts-swt | ||||||||
| Version: | 4.14 | ||||||||||
| Target Milestone: | 4.16 M3 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 10 | ||||||||||
| See Also: |
https://git.eclipse.org/r/157923 https://bugs.eclipse.org/bugs/show_bug.cgi?id=517003 https://bugs.eclipse.org/bugs/show_bug.cgi?id=518676 https://bugs.eclipse.org/bugs/show_bug.cgi?id=576614 |
||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 562193 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Alexandr Miloslavskiy
I will provide a patch soon. New Gerrit change created: https://git.eclipse.org/r/157923 Nikita, I would prefer to have all used colors configurable by the user - that is the whole point of theming. The current algorithms can be used as a fall-back if such special colors are not configured. Thanks for your suggestion regarding 'getSlightlyDifferentColor'. Indeed, this looks reasonable, both in dark and light (in light, explicit .setHeaderBackground() is needed to trigger custom drawing). However, our UI designed told me that he wants to configure a precise color that he selected. After thinking, I believe that it's a perfectly good idea to provide as many tunable knobs as possible. I think in some of our previous discussions, you already complained about the state of Windows theming. But this complain goes down exactly to the lack of tunable knobs! So when we want to change a tiny detail, we often have to owner-draw everything instead. On the other hand, there's GTK, where I really like how theming was designed as a cornerstone, and as a result every tiny detail can be customized via CSS. Therefore, I think I will split the patch into two: 1) Improve default baseline. This will probably use your suggestion. 2) Also add a tunable knob to override that default. While studying your suggestion, I found that the code actually contains a problem since Bug 517003: if you look carefully, the line of code highlighted by you and the one I modified actually paint exactly the same pixels, but with different colors! That is, "your" line has no effect. I then started looking into this and discovered that it's a whole bunch of connected problems. I have submitted a new version of the patch with an updated test snippet that shows them: * With owner drawing, non-header column separators disappear. * With 'Table lines', Windows draws 2px non-header column delimiters, but only 1px header delimiters. This looks like a Windows bug for 'Explorer' theme Table. * With 'Dark', non-header lines are misaligned with header lines. It seems that Windows actually paints _two_ non-header lines, but one is not visible with light background. * With 'Table lines' and 'Dark', there are two badly misaligned non-header lines Maybe that's another Windows bug for 'Explorer' theme Table. I'll try to defeat some of them, unless that takes too much time. The previous comment is a reply to Nikita Nemkin's code review. Created attachment 281956 [details]
Screenshot of test snippet for Win10
High zoom (4x or more) is recommended to see various problems with column lines.
Created attachment 282827 [details]
Eclipse (old)
Created attachment 282828 [details]
Eclipse (with patch)
Eclipse should refrain from using Table.setLinesVisible() in dark theme, because the lines are too bright. Changes merged to master via: https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=fdad775eff1272fde91253a01f85ee57d35b3ec6 Resolving now. Thanks! Verified using Build id: I20200518-2220 on Win10. Details on how to disable this feature: On Windows 10 all the dark theme tweaks, including the Table header delimiters color can be disabled using the org.eclipse.swt.internal.win32.disableCustomThemeTweaks Java property. For Example. add this VM argument in eclipse.ini or on the command line after -vmargs: -Dorg.eclipse.swt.internal.win32.disableCustomThemeTweaks=true |