Summary: | [macOS] Selection system colors are alpha-blended white | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <ts-swt> | ||||||||
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||||
Status: | NEW --- | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | alexandr.miloslavskiy, ts-swt | ||||||||
Version: | 4.13 | ||||||||||
Target Milestone: | --- | ||||||||||
Hardware: | PC | ||||||||||
OS: | Mac OS X | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Thomas Singer
2019-12-12 07:13:46 EST
Created attachment 281214 [details]
Snippet to reproduce
Created attachment 281215 [details]
macOS preferences
Forgot to mention: you need to switch the macOS 'Accent colour' from the default blue (left) to graphite (right).
Created attachment 281216 [details]
Screenshot on macOS 10.14.5
Frankly, my findings surprised me: GC ignores alpha component of 'GC.setBackground()', 'GC.setForeground()' etc, replacing it with GC.getAlpha() instead. This seems to happen on all 3 platforms, and for example on macOS the code seems to remain unchanged since initial implementation. See for example 'GC.checkGC' on macOS: NSColor bg = data.bg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f); In 21st century, I see the behavior of ignoring Color's alpha as... ancient, at best. I see a simple solution here: multiply gc.getAlpha() by Color.getAlpha(), problem solved. However, this is a breaking change, and could cause issues if for whatever reason some colors had wrong alpha values which were previously ignored. Yes, technically that's a bug in that other code, yet still... What do you think? |