GNOME Bugzilla – Bug 613832
Improve support for CSS shadows
Last modified: 2010-05-10 18:13:29 UTC
Currently we support adding drop shadows to background images, which is enough for the close buttons in the overview; it would be nice to be able to add shadows to other elements as well. The second improvement adds an (optional) spread radius to the shadow description, which can be used to enlarge the shadow without increasing the blur. Those patches are used to implement the glow effect around the activated search entry in the overview.
Created attachment 157004 [details] [review] [StShadow] Add support for spread radius The (optional) spread radius allows to make the shadow bigger without enlarging the blur value. Mozilla supports this parameter for the -moz-box-shadow property.
Created attachment 157005 [details] [review] Support -st-shadow for all background properties Extend the existing support for -st-shadow to apply to the background, background-gradient and border properties in addition to background-image.
Review of attachment 157004 [details] [review]: Looks fine to me.
Review of attachment 157005 [details] [review]: Do you need this for something in particular? It's going to make the code notably more complex. I'm also not totally sure of the availability of FBOs.
(In reply to comment #4) > Review of attachment 157005 [details] [review]: > > Do you need this for something in particular? It's going to make the code > notably more complex. I'm also not totally sure of the availability of FBOs. We use FBO's for the mipmap emulation in Mutter. FBO's (though not shaders) should be essentially universally available, since they are just memory management - where does the card render to.
(In reply to comment #4) > Do you need this for something in particular? It's going to make the code > notably more complex. I was planning on using this for the glow effect on the search entry - an alternative would be to only extend the shadow support to gradients and use a background-color to background-color gradient for the entry (or implement the glow some other way or drop it entirely *ducks*)
Comment on attachment 157004 [details] [review] [StShadow] Add support for spread radius Attachment 157004 [details] pushed as 50c453c - [StShadow] Add support for spread radius
Review of attachment 157005 [details] [review]: Two minor comments, otherwise looks good to commit. ::: src/st/st-theme-node-drawing.c @@ +804,3 @@ + buffer); + cogl_handle_unref (buffer); + } Still need to unref the buffer even if offscreen is COGL_INVALID_HANDLE. @@ +1103,3 @@ + cogl_rectangle_with_texture_coords (shadow_box.x1, shadow_box.y1, shadow_box.x2, shadow_box.y2, + 0, 0, 1, 1); + } Would prefer this to come after the big commentary on painting, not before.
Attachment 157005 [details] pushed as 014ac2d - Support -st-shadow for all background properties