| Summary: | [Cocoa][10.14] Shell background under macOS 10.14 (Mojave) is white instead of gray | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <eclipse> | ||||
| Component: | SWT | Assignee: | Lakshmi P Shanmugam <lshanmug> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eclipse, konrad_w, lshanmug, p.belusky, peter, register.eclipse, shashwat.work | ||||
| Version: | 4.9 | ||||||
| Target Milestone: | 4.10 M3 | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| See Also: |
https://git.eclipse.org/r/130748 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=b7f9ee185c5fda2bc82474b9f515146205a789bd https://git.eclipse.org/r/130845 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=a35cc4fcf86e4356dc9e591ed9718fe6cc911a9a |
||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 538976 | ||||||
| Attachments: |
|
||||||
Created attachment 276179 [details]
Wrong background color in Eclipse Preferences in Mac OS 10.14
I do have a similar issue with wrong background colors in Mac OS 10.14 (Mojave). The nested containers have a grey background color instead of white. Please see the attached screenshot of the Eclipse Preference Page "General" SWT uses NSColor.controlHighlightColor() as the default background color. This is returning white on macOS 10.14. I'm looking at changing this to NSColor.windowBackgroundColor() which returns gray. The background color for Group widget also looks different, since it uses NSBox may be some change is required. (In reply to Konrad Windszus from comment #2) > The nested containers have a grey background color instead of > white. Why do you think the background should be white instead of gray? It is gray on older versions. Yes, sorry for the confusion here. I just checked other native apps (like Mail, Calendar) and there the background for preference pages is still grey. So it should also be grey in SWT. New Gerrit change created: https://git.eclipse.org/r/130748 Gerrit change https://git.eclipse.org/r/130748 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=b7f9ee185c5fda2bc82474b9f515146205a789bd New Gerrit change created: https://git.eclipse.org/r/130845 Gerrit change https://git.eclipse.org/r/130845 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=a35cc4fcf86e4356dc9e591ed9718fe6cc911a9a *** Bug 540670 has been marked as a duplicate of this bug. *** Verified with I20181119-2315. |
Please try a simple SWT snippet like public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); createButton(shell, "Hello").setLocation(10, 10); final Composite composite = new Composite(shell, SWT.NONE); createButton(composite, "World").setLocation(10, 10); composite.setBounds(20, 50, 300, 200); shell.setSize(400, 300); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } public static Button createButton(Composite parent, String text) { final Button button = new Button(parent, SWT.PUSH); button.setText(text); button.setSize(button.computeSize(SWT.DEFAULT, SWT.DEFAULT)); return button; } on macOS 10.14 and earlier. On 10.14 the shell's background will be white instead of the usual gray from previous applications.