Human theme makes bad GTK widget class assumptions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
human-theme (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: human-theme
I'm the Banshee maintainer, and we've had a few bugs filed against our new 1.0 code base regarding theme issues specifically with Ubuntu's Human theme.
It appears that the gtkrc for Human does some pretty nasty things by making assumptions that all widgets in an application will derive from the small set of standard GTK widgets.
For instance, our primary interface element in Banshee is a custom list view widget that is drawn 100% in Cairo. To the user it feels and mostly looks like a GtkTreeView, but it has nothing to do with the GtkTreeView. In fact it derives directly from GtkWidget and we handle all internal windowing, widgetry, events, drawing, and so on. So what's the problem?
Human applies a special style for GtkTreeView based widgets:
...
style "clearlooks-
{
bg[SELECTED] = @selected_bg_color
engine "clearlooks" {
hint = "treeview"
}
}
...
widget_class "*.<GtkTreeView>*" style "clearlooks-
...
There are a number of other similar special-case assumptions, but this is the one that affects us the most.
As can be seen in the screenshot on the bug for this against Banshee (filed by a poor unsuspecting user), it's rather confusing. On the left, our source view, is a standard GtkTreeView so it has the correct selection background color [1], but on the right is our custom list view which gets an improper selection background color:
http://
Because our list view is not derived from GtkTreeView, the style is not applied through the widget_class match, so the "treeview" hint is never passed to Clearlooks for our widget.
I won't go into the details here about why this is horrible for ISVs and so on (which I consider Banshee to be in many cases) as I hope my findings are obvious and also I've already detailed this overall problem with GTK themes about a year ago in a blog post [2]. If it needs further clarifying, I'd be glad to do so in followup comments.
I consider this to be a critical issue because Human is Ubuntu's default theme and thus there are a huge number of users using it, and as somewhat of a function of this, users will default to filing bugs against Banshee, the upstream application, and not Ubuntu, where the bug exists.
Thanks for the consideration!
--
[1] Due to other somewhat unrelated GTK theme issues, we do some color shading of the selection background to create a selection background gradient that is at least appealing if not 100% theme compatible. It is at least very theme derived, barring this specific bug or similar bugs with other themes.
[2] http://
Changed in human-theme: | |
status: | New → Confirmed |
Changed in human-theme: | |
status: | Confirmed → In Progress |
Changed in human-theme (Ubuntu): | |
status: | Fix Committed → Fix Released |
Here's the most relevant upstream bug on this issue:
http:// bugzilla. gnome.org/ show_bug. cgi?id= 534731