After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613832 - Improve support for CSS shadows
Improve support for CSS shadows
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-24 18:40 UTC by Florian Müllner
Modified: 2010-05-10 18:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[StShadow] Add support for spread radius (5.46 KB, patch)
2010-03-24 18:40 UTC, Florian Müllner
committed Details | Review
Support -st-shadow for all background properties (7.81 KB, patch)
2010-03-24 18:40 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2010-03-24 18:40:17 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.
Comment 1 Florian Müllner 2010-03-24 18:40:38 UTC
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.
Comment 2 Florian Müllner 2010-03-24 18:40:43 UTC
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.
Comment 3 Colin Walters 2010-03-29 18:04:36 UTC
Review of attachment 157004 [details] [review]:

Looks fine to me.
Comment 4 Colin Walters 2010-03-29 18:22:54 UTC
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.
Comment 5 Owen Taylor 2010-03-29 18:26:11 UTC
(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.
Comment 6 Florian Müllner 2010-03-29 21:22:18 UTC
(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 7 Florian Müllner 2010-05-03 22:59:19 UTC
Comment on attachment 157004 [details] [review]
[StShadow] Add support for spread radius

Attachment 157004 [details] pushed as 50c453c - [StShadow] Add support for spread radius
Comment 8 Colin Walters 2010-05-10 17:46:32 UTC
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.
Comment 9 Florian Müllner 2010-05-10 18:13:25 UTC
Attachment 157005 [details] pushed as 014ac2d - Support -st-shadow for all background properties