Bug 531573 - [GTK3][Ambiance theme] Combobox background does not look good
Summary: [GTK3][Ambiance theme] Combobox background does not look good
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: Category:theme, ambiance, dark
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-02-23 04:18 EST by Lars Vogel CLA
Modified: 2018-11-20 15:32 EST (History)
3 users (show)

See Also:


Attachments
Screenshot (34.07 KB, image/png)
2018-02-23 04:18 EST, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2018-02-23 04:18:04 EST
Created attachment 272844 [details]
Screenshot

The Combobox looks not good with a dark background. See screenshot from the dark theme.

Eclipse SDK
Version: Photon (4.8)
Build id: I20180220-2000
OS: Linux, v.4.13.0-32-generic, x86_64 / gtk 3.22.25, WebKit 2.18.6
Comment 1 Leo Ufimtsev CLA 2018-02-23 12:34:55 EST
The issue is specific to Ambiance theme. Doesn't occur on Adwaita.

The reason for above behavior is that Adwaita has a dark-variant where as Ambiance doesn't.
In Eclipse, we request OS help by asking for the 'dark' version of a theme, but in the case of Ambiance there is no dark version to request.

OS.java:
public static final void setDarkThemePreferred(boolean preferred){
..
	g_object_set(GTK.gtk_settings_get_default(), GTK.gtk_application_prefer_dark_theme, preferred, 0);
	g_object_notify(GTK.gtk_settings_get_default(),GTK.gtk_application_prefer_dark_theme);
}

Thoughts that come to mind:
- Maybe see if we can update combobox to do more css theming in the case of setBackgroud(), something like this:
https://git.eclipse.org/r/#/c/45077/6/bundles/org.eclipse.swt/Eclipse+SWT/gtk/org/eclipse/swt/widgets/Button.java
- I recall working on this when I was an intern, can't remember the outcome very well. Background color logic has changed quite a bit since thou:
https://git.eclipse.org/r/#/c/45415/



- Consider using alternative system theme that has a dark-variant if dark theme is desired.
Comment 2 Alexander Kurtakov CLA 2018-10-19 07:30:35 EDT
Lars, do you still face this one?
Comment 3 Lars Vogel CLA 2018-10-19 07:33:33 EDT
(In reply to Alexander Kurtakov from comment #2)
> Lars, do you still face this one?

Nope
Comment 4 Eric Williams CLA 2018-11-20 15:32:32 EST
Not sure why this one was under 4.10 M3, marking as WORKSFORME.