GNOME Bugzilla – Bug 671437
GtkStyle background color regression
Last modified: 2014-04-28 20:01:07 UTC
Created attachment 209045 [details] screenshot In Evo 3.3.90, it seems that - the listview widgets containing the list of messages or the list of tasks or memos (on the right; not the treeview on the left) - the message view's background ... now show with a greyish color, as the screenshot illustrates. It used to be white/theme-dependent in 3.2 and earlier, and Evo is the only application I can see with this symptom in GNOME 3.3.x.
Created attachment 209076 [details] Screenshot without Adwaita Confirming. It's even worse when not using Adwaita. This is a GtkStyle regression introduced between GTK+ 3.2 and 3.3. Reassigning.
I'm not seeing this with 3.3.90/91 in F17. I assume this has been fixed in gtk and/or adwaita. Can you confirm ?
I'm still seeing what I posted in comment #1 having just rebuilt against an up-to-date gtk+ git repo and running with no theme set, so not an Adwaita issue. Had been running GTK+ 3.2 until just recently. The black backgrounds started after I upgraded to 3.3. I'll try and bisect it over the weekend.
(In reply to comment #1) > Created an attachment (id=209076) [details] > Screenshot without Adwaita > Confirming. It's even worse when not using Adwaita. I can confirm this - I have seen this for at least 21 days now but I thought it's something broken on my machine with the theming.
Hrm, maybe it's an issue with the X driver? Could you try running with the env var GDK_RENDERING=image set?
This might be an Evolution bug after all since bisecting GTK+ since 3.2 didn't yield anything. Stand by...
Doubt it's an X driver issue, given that I was running this in virtualbox and the devs are probably running Intel or Radeon chips on thinkpads :)
Cleaned out my development environment, updated and rebuilt GLib, GTK+, GDK-Pixbuf, GtkHTML, E-D-S and Evolution from git and the backgrounds are back to normal for me now. Must have been whatever combination of module revisions I had before updating... unfortunately I failed to note them. If anyone is still seeing this, it would be helpful to note the versions or even git revisions of the aforementioned modules. In any case, I suggest removing this from the blocker list.
Thanks for retesting !
Tested again after applying F17 updates, the issue is gone now.
(In reply to comment #8) > Cleaned out my development environment, updated and rebuilt GLib, GTK+, > GDK-Pixbuf, GtkHTML, E-D-S and Evolution from git and the backgrounds are back > to normal for me now. > > Must have been whatever combination of module revisions I had before > updating... unfortunately I failed to note them. If anyone is still seeing > this, it would be helpful to note the versions or even git revisions of the > aforementioned modules. > > In any case, I suggest removing this from the blocker list. I am experiencing the same thing with Evolution 3.2.2-1 in Debian Sid/unstable after upgrading the following non-evolution packages [1][2]. [AKTUALISIERUNG] apt:i386 0.8.15.10 -> 0.9.2 [AKTUALISIERUNG] apt-utils:i386 0.9.1 -> 0.9.2 [AKTUALISIERUNG] baobab:i386 3.2.1-3 -> 3.4.1-1 [AKTUALISIERUNG] cdbs:i386 0.4.110 -> 0.4.111 [AKTUALISIERUNG] cmake:i386 2.8.7-4 -> 2.8.8-1 [AKTUALISIERUNG] cmake-data:i386 2.8.7-4 -> 2.8.8-1 [AKTUALISIERUNG] cups-filters:i386 1.0.13-1 -> 1.0.16-2 [AKTUALISIERUNG] eog:i386 3.2.2-3 -> 3.4.1-2 [AKTUALISIERUNG] eog-dbg:i386 3.2.2-3 -> 3.4.1-2 [AKTUALISIERUNG] gir1.2-freedesktop:i386 1.32.0-1 -> 1.32.1-1 [AKTUALISIERUNG] gir1.2-glib-2.0:i386 1.32.0-1 -> 1.32.1-1 [AKTUALISIERUNG] gir1.2-gnomekeyring-1.0:i386 3.4.0-1 -> 3.4.1-1 [AKTUALISIERUNG] gir1.2-gtk-3.0:i386 3.2.3-1 -> 3.4.1-2 [AKTUALISIERUNG] gir1.2-gtksource-3.0:i386 3.4.0-2 -> 3.4.1-1 [AKTUALISIERUNG] gir1.2-telepathyglib-0.12:i386 0.16.2-1+b1 -> 0.18.1-1 [AKTUALISIERUNG] gnome-desktop3-data:i386 3.2.1-4 -> 3.4.1-2 [AKTUALISIERUNG] gnome-power-manager:i386 3.2.1-2 -> 3.4.0-2 [AKTUALISIERUNG] gnome-system-log:i386 3.2.1-3 -> 3.4.1-1 [AKTUALISIERUNG] gnome-system-monitor:i386 3.2.1-1 -> 3.4.1-2 [AKTUALISIERUNG] gnome-themes-standard:i386 3.2.1-2 -> 3.4.1-2 [AKTUALISIERUNG] gobject-introspection:i386 1.32.0-1 -> 1.32.1-1 [AKTUALISIERUNG] help2man:i386 1.40.8 -> 1.40.9 [AKTUALISIERUNG] keyboard-configuration:i386 1.75 -> 1.76 [AKTUALISIERUNG] libapt-inst1.5:i386 0.9.1 -> 0.9.2 [AKTUALISIERUNG] libapt-pkg4.12:i386 0.9.1 -> 0.9.2 [AKTUALISIERUNG] libaudio-dev:i386 1.9.3-4 -> 1.9.3-5 [AKTUALISIERUNG] libaudio2:i386 1.9.3-4 -> 1.9.3-5 [AKTUALISIERUNG] libcupsfilters1:i386 1.0.13-1 -> 1.0.16-2 [AKTUALISIERUNG] libdmapsharing-3.0-2:i386 2.9.14-1 -> 2.9.15-1 [AKTUALISIERUNG] libgail-3-0:i386 3.2.3-1 -> 3.4.1-2 [AKTUALISIERUNG] libgail-3-0-dbg:i386 3.2.3-1 -> 3.4.1-2 [AKTUALISIERUNG] libgirepository-1.0-1:i386 1.32.0-1 -> 1.32.1-1 [AKTUALISIERUNG] libgirepository1.0-dev:i386 1.32.0-1 -> 1.32.1-1 [AKTUALISIERUNG] libgladeui-2-0:i386 3.11.0-1 -> 3.12.0-1 [AKTUALISIERUNG] libgladeui-common:i386 3.11.0-1 -> 3.12.0-1 [AKTUALISIERUNG] libgnome-desktop-3-2:i386 3.2.1-4 -> 3.4.1-2 [AKTUALISIERUNG] libgnome-keyring-common:i386 3.4.0-1 -> 3.4.1-1 [AKTUALISIERUNG] libgnome-keyring-dev:i386 3.4.0-1 -> 3.4.1-1 [AKTUALISIERUNG] libgnome-keyring0:i386 3.4.0-1 -> 3.4.1-1 [AKTUALISIERUNG] libgnome-keyring0-dbg:i386 3.4.0-1 -> 3.4.1-1 [AKTUALISIERUNG] libgtk-3-0:i386 3.2.3-1 -> 3.4.1-2 [AKTUALISIERUNG] libgtk-3-0-dbg:i386 3.2.3-1 -> 3.4.1-2 [AKTUALISIERUNG] libgtk-3-bin:i386 3.2.3-1 -> 3.4.1-2 [AKTUALISIERUNG] libgtk-3-common:i386 3.2.3-1 -> 3.4.1-2 [AKTUALISIERUNG] libgtkmm-3.0-1:i386 3.2.0-1 -> 3.4.0-2 [AKTUALISIERUNG] libgtkmm-3.0-dbg:i386 3.2.0-1 -> 3.4.0-2 [AKTUALISIERUNG] libgtksourceview-3.0-0:i386 3.4.0-2 -> 3.4.1-1 [AKTUALISIERUNG] libgtksourceview-3.0-common:i386 3.4.0-2 -> 3.4.1-1 [AKTUALISIERUNG] libhyphen0:i386 2.8.3-1 -> 2.8.3-2 [AKTUALISIERUNG] libmtp-common:i386 1.1.3-1 -> 1.1.3-2 [AKTUALISIERUNG] libmtp-dbg:i386 1.1.3-1 -> 1.1.3-2 [AKTUALISIERUNG] libmtp-runtime:i386 1.1.3-1 -> 1.1.3-2 [AKTUALISIERUNG] libmtp9:i386 1.1.3-1 -> 1.1.3-2 [AKTUALISIERUNG] libnautilus-extension1a:i386 3.2.1-3 -> 3.4.1-1 [AKTUALISIERUNG] libssl-dev:i386 1.0.1-4 -> 1.0.1a-3 [AKTUALISIERUNG] libssl1.0.0:i386 1.0.1-4 -> 1.0.1a-3 [AKTUALISIERUNG] libtelepathy-glib0:i386 0.16.2-1+b1 -> 0.18.1-1 [AKTUALISIERUNG] libx11-6:i386 2:1.4.4-4 -> 2:1.4.99.901-1 [AKTUALISIERUNG] libx11-6-dbg:i386 2:1.4.4-4 -> 2:1.4.99.901-1 [AKTUALISIERUNG] libx11-data:i386 2:1.4.4-4 -> 2:1.4.99.901-1 [AKTUALISIERUNG] libx11-dev:i386 2:1.4.4-4 -> 2:1.4.99.901-1 [AKTUALISIERUNG] libx11-xcb1:i386 2:1.4.4-4 -> 2:1.4.99.901-1 [AKTUALISIERUNG] libxi-dev:i386 2:1.4.5-1.1 -> 2:1.6.0-1 [AKTUALISIERUNG] libxi6:i386 2:1.4.5-1.1 -> 2:1.6.0-1 [AKTUALISIERUNG] libxinerama-dev:i386 2:1.1.1-3 -> 2:1.1.2-1 [AKTUALISIERUNG] libxinerama1:i386 2:1.1.1-3 -> 2:1.1.2-1 [AKTUALISIERUNG] lsb-base:i386 4.1+Debian0 -> 4.1+Debian1 [AKTUALISIERUNG] lsb-release:i386 4.1+Debian0 -> 4.1+Debian1 [AKTUALISIERUNG] lxmenu-data:i386 0.1.2-1 -> 0.1.2-2 [AKTUALISIERUNG] mtp-tools:i386 1.1.3-1 -> 1.1.3-2 [AKTUALISIERUNG] nautilus:i386 3.2.1-3 -> 3.4.1-1 [AKTUALISIERUNG] nautilus-data:i386 3.2.1-3 -> 3.4.1-1 [AKTUALISIERUNG] nautilus-dbg:i386 3.2.1-3 -> 3.4.1-1 [AKTUALISIERUNG] openssl:i386 1.0.1-4 -> 1.0.1a-3 [AKTUALISIERUNG] os-prober:i386 1.51 -> 1.52 [AKTUALISIERUNG] simple-scan:i386 3.4.0-1 -> 3.4.1-1 [AKTUALISIERUNG] unattended-upgrades:i386 0.76 -> 0.76.2 [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669694 [2] http://mail.gnome.org/archives/evolution-list/2012-April/msg00058.html
*** Bug 675051 has been marked as a duplicate of this bug. ***
I found a workaround (under Arch Linux): downgrade the package "gtk3" from 3.4.1 to 3.2.3. Then the "black on black" colour problem in Evolution 3.4.1 is gone. Obviously this bug still persists in the current GTK version. I wonder why this bug is marked as "resolved"?
Could this report please be reopened? It is at least not INVALID and enough information is provided to figure out the culprit.
Reopening as requested. We got another question about it just today on the mailing list: http://mail.gnome.org/archives/evolution-list/2012-May/msg00065.html
Just as a follow up. Upgrading to GTK+ 3.4.1 does *not* fix this issue. [AKTUALISIERUNG] gir1.2-gtk-3.0:i386 3.4.1-2 -> 3.4.2-1 [AKTUALISIERUNG] libgail-3-0:i386 3.4.1-2 -> 3.4.2-1 [AKTUALISIERUNG] libgail-3-0-dbg:i386 3.4.1-2 -> 3.4.2-1 [AKTUALISIERUNG] libgtk-3-0:i386 3.4.1-2 -> 3.4.2-1 [AKTUALISIERUNG] libgtk-3-0-dbg:i386 3.4.1-2 -> 3.4.2-1 [AKTUALISIERUNG] libgtk-3-bin:i386 3.4.1-2 -> 3.4.2-1 [AKTUALISIERUNG] libgtk-3-common:i386 3.4.1-2 -> 3.4.2-1
*** Bug 676115 has been marked as a duplicate of this bug. ***
Mathew, you marked my bug report 676115 as "RESOLVED", however, I don't see this as resolved, as the problem still exists in Evolution, v. 3.2.2 in Debian Testing. Please advise how to correct this problem.
(In reply to comment #18) > Mathew, you marked my bug report 676115 as "RESOLVED", however, I don't see > this as resolved, as the problem still exists in Evolution, v. 3.2.2 in Debian > Testing. Please advise how to correct this problem. Resolved does not imply fixed. Your bug report was resolved as a duplicate of this bug report.
*** Bug 674407 has been marked as a duplicate of this bug. ***
I think I botched my first attempt at bisecting this so here's another try. We're still getting questions about this issue on Evolution's mailing list. I can still reproduce it by using the fallback GTK+ theme ("Raleigh" is it?). Running the same Evolution revision against various GTK+ builds: master/HEAD - Broken, GtkStyle backgrounds are black. gtk-3-4/HEAD - Broken, GtkStyle backgrounds are black. gtk-3-4/3.4.0 - Broken, GtkStyle backgrounds are black. ... all subsequent 3.3.x releases presumed broken ... gtk-3-4/3.3.14 - Broken, GtkStyle backgrounds are black. gtk-3-4/3.3.12 - Works, GtkStyle backgrounds are normal. gtk-3-4/3.3.10 - Unusable, conflicting GIO dependencies. gtk-3-4/3.3.8 - Unusable, conflicting GIO dependencies. gtk-3-4/3.3.6 - Works, GtkStyle backgrounds are normal. gtk-3-4/3.3.4 - Works, GtkStyle backgrounds are normal. gtk-3-4/3.3.2 - Works, GtkStyle backgrounds are normal. gtk-3-2/HEAD - Works, GtkStyle backgrounds are normal. So the regression was introduced between 3.3.12 and 3.3.14. Bisecting that range reveals the guilty commit to be: http://git.gnome.org/browse/gtk+/commit/?id=4dd9a73c8ae5254361e746a3013e952e0f72d6a3 Which causes the screen capture shown in attachment #209076 [details].
Bug 676952 might be another symptom.
*** Bug 676952 has been marked as a duplicate of this bug. ***
As I reported in Bug 676952 these black backgrounds show up in e.g. Gedit and Disk Utility as well when using the default ("no theme") Raleigh theme. To me it seems more likely that these applications are using GTK 3.4 incorrectly than there being a bug in the hard coded Raleigh theme.
Here is the problem for the evolution sidebar: e_shell_sidebar_init () { ... widget = gtk_event_box_new (); style = gtk_widget_get_style (widget); color = &style->bg[GTK_STATE_ACTIVE]; gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color); The problem with this is in the new world, the background color for a widget state might be (partially) transparent, but style->bg is a GdkColor which does not have any alpha values. The computation of the style colors happens in gtkstyle.c:set_color(), and atm it just throws away the alpha. In this particular case the background is completely transparent (which is quite common in the new world where most widgets should draw their background, but the default is transparent). If you throw away the alpha you then get black, which is generally a bad background as most text is black. I tried to make it detect transparent colors and look at the parent style context background, but that fails in this case as the widget is not yet in a hierarchy, and as such doesn't have a parent yet. And anyway, while that could work in some cases it would never handle other cases well like partially transparent backgrounds or cases where the parent style changes over time. So, the simplest fix i could find was to just use the default value for completely transparent colors. This avoids complete failure like black-on-black, while being easy to understand.
Created attachment 217562 [details] [review] Handle transparent colors better in GtkStyle emulation We can't expose colors with alpha in the GtkStyle colors, since GdkColor has no alpha. Currently we throw away alpha completely, which fails very badly for completely transparent backgrounds, which now is the default for most widgets, as it typically end up with black-on-black. We handle this by falling back on the default/previous colors for transparent colors. This is is simple and avoids complete failure.
Attachment 217562 [details] pushed as 1042372 - Handle transparent colors better in GtkStyle emulation
Is this safe to also commit to the 3.4 branch?
*** Bug 679117 has been marked as a duplicate of this bug. ***
Cherry-picked to gtk-3-4 with Benjamin's permission: http://git.gnome.org/browse/gtk+/commit/?h=gtk-3-4&id=72feb95edb6ab8c3fac27c0c32afeb2b2f61bd1c
*** Bug 679595 has been marked as a duplicate of this bug. ***
The "black on black" bug in evolution on my three Arch Linux installations is gone since the upgrade to gtk3 version 3.4.4. Many thanks for the bug fix. The only remaining colour problem is that selecting text within an e-mail with the mouse results in a black stripe or rectangle, i.e. the selected text is rendered "black on black".
*** Bug 682321 has been marked as a duplicate of this bug. ***
*** Bug 682631 has been marked as a duplicate of this bug. ***
*** Bug 707624 has been marked as a duplicate of this bug. ***
I know this is an old bug, but I'm seeing the same problem now in Evolution 3.10, running Fedora 20. Reading the thread I'm not sure if there's anything I can do directly to solve it, since (I guess) it was solved upstream some time ago. BTW, the problem appears only with some gtk themes (for example Evolve), but not Adwaita.
I have also seen this bug resurface using the Evolve theme. Evolution 3.10.4 and gtk-3.10.8 (Ubuntu 14.04 LTS). Also happens in gedit. In Evolution black areas appear specifically around buttons and the headers in Evolution. Does not happen with the Adwaita theme.
After consulting with Milan on evolution-list I agree this is not an Evolution issue, but rather an issue with non-built-in themes that do not define the background-color property for all elements in their stylesheets. For the Evolve theme, I found this the following to fix the problem the issue with default back backgrounds in Evolution, gedit and Gnome Tweak. Add: * { background-color: @theme_bg_color; } at the top of: /usr/share/themes/Evolve/gtk-3.0/gtk-widgets.css: This sets the background-color on all elements to the theme's default background color where none is explicitly defined.
(In reply to comment #38) > * { background-color: @theme_bg_color; } > > at the top of: > /usr/share/themes/Evolve/gtk-3.0/gtk-widgets.css: > > This sets the background-color on all elements to the theme's default > background color where none is explicitly defined. That's a bad idea though because it draws a lot more stuff and because labels inside buttons suddenly draw backgrounds. So I would strongly advise against defining backgrounds this broadly in themes. However, widgets that insist on having a background should add the BACKGROUND style class using gtk_style_context_add_class(). It's the class that GtkWindow uses to ensure it has a background.