GNOME Bugzilla – Bug 663397
The panel doesn't correctly apply CSS gradients
Last modified: 2012-03-05 07:39:22 UTC
Created attachment 200688 [details] Screenshot of the issue In Ubuntu, we use the following CSS file for themeing panel: http://bazaar.launchpad.net/~ubuntu-art-pkg/light-themes/trunk/view/head:/Ambiance/gtk-3.0/apps/gnome-panel.css. It seems that the gradient code is not working: PanelWidget, PanelApplet, PanelToplevel { background-image: -gtk-gradient (linear, left top, left bottom, from (shade (@dark_bg_color, 1.5)), to (shade (@dark_bg_color, 1.05))); <...> } This works for PanelApplet, but doesn't for PanelToplevel (see the screenshot attached). As one of users discovered (see https://bugs.launchpad.net/ubuntu/+source/light-themes/+bug/885691), it instead fills the background with the second solid color of the gradient. // I'm not sure whether it's a bug in Gnome Panel or in Gtk+.
Reassigning to Gtk+ because it is responsible for parsing & applying css styles.
@carlosgc: You worked on GtkStyleContext support (http://mail.gnome.org/archives/commits-list/2011-January/msg07791.html), can you please look at this?
Created attachment 208884 [details] [review] git patch 1/1 Actually, this is a gnome-panel bug. The patch comment goes into some detail on the whys and hows of what goes wrong, but the short version is that the pattern set as the background pattern is incorrectly scaled (that is, not scaled). The pattern is actually drawn but the scale is so off that it appears as though it's not a gradient at all.
Created attachment 208885 [details] Screenshot of themed gradient background [after patch] Attached is a screenshot of the panel after the patch was applied. As you can see, the gradient is correct. (NB: please ignore the separator background. I haven't tracked down if that's a theme or panel bug)
The screenshot shows the Radiance theme, which is a companion theme to the original reporter' Ambiance theme and distributed in the same dist package.
Comment on attachment 208884 [details] [review] git patch 1/1 Thanks, pushed after fixing the coding style.