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 619083 - [StThemeNode] Make shadows respect paint opacity
[StThemeNode] Make shadows respect paint opacity
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-05-19 13:23 UTC by Florian Müllner
Modified: 2010-05-26 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[StThemeNode] Make shadows respect paint opacity (6.84 KB, patch)
2010-05-19 13:23 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2010-05-19 13:23:01 UTC
See patch.
Comment 1 Florian Müllner 2010-05-19 13:23:05 UTC
Created attachment 161435 [details] [review]
[StThemeNode] Make shadows respect paint opacity

Currently shadows disregard the overall opacity, so e.g. setting
an ancestor's opacity does not effect the shadow. Fix this by
deferring the setting of the shadow's color until it is painted.
Also move duplicated drawing code from st_theme_node_paint() into
its own function.
Comment 2 Owen Taylor 2010-05-21 19:18:41 UTC
Review of attachment 161435 [details] [review]:

Looks good to me, couple of tiny quibbles - good to commit with those fixed. (How did we get such a huge block of duplicated code in the first place? :-)

::: src/st/st-theme-node-drawing.c
@@ +202,3 @@
 
+  /* We set up the material to blend the shadow texture with the combine
+   * constant, but defer setting the latter until painting to take the

Minor English style quibble

 "until painting, so that we can take..."

@@ +855,2 @@
 static void
+paint_shadow_with_opacity (CoglHandle       shadow,

Especially since CoglHandle is a generic type, the name of the object should convey something about its actual type - so shadow_material, not shadow
Comment 3 Florian Müllner 2010-05-26 12:40:14 UTC
Attachment 161435 [details] pushed as a433a1c - [StThemeNode] Make shadows respect paint opacity