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 705443 - Fix image effects
Fix image effects
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-08-04 09:52 UTC by Cosimo Cecchi
Modified: 2013-08-20 01:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
themingengine: refactor a conditional branch (3.25 KB, patch)
2013-08-04 09:52 UTC, Cosimo Cecchi
committed Details | Review
css: Add a GtkCssValue for GtkCssImageEffect (5.10 KB, patch)
2013-08-04 09:53 UTC, Cosimo Cecchi
committed Details | Review
themingengine: apply image effects according to GtkCssImageEffect value (1.80 KB, patch)
2013-08-04 09:55 UTC, Cosimo Cecchi
committed Details | Review
iconfactory: cache/invalidate pixbufs according to the effect (5.41 KB, patch)
2013-08-04 09:56 UTC, Cosimo Cecchi
committed Details | Review
iconhelper: refactor some code into a single function (3.43 KB, patch)
2013-08-04 14:59 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2013-08-04 09:52:29 UTC
Since we stopped propagating widget states down the hierarchy, the mechanism we had in place to apply highlight/dim effects to prelit/insensitive images doesn't really work anymore.
A solution to this is to introduce a CSS property to select the desired effect, and use CSS inheritance to propagate it. This patchset implements that.
Comment 1 Cosimo Cecchi 2013-08-04 09:52:33 UTC
Created attachment 250795 [details] [review]
themingengine: refactor a conditional branch

Return early when the state is not wildcarded - makes the code more
readable.
Comment 2 Cosimo Cecchi 2013-08-04 09:53:50 UTC
Created attachment 250796 [details] [review]
css: Add a GtkCssValue for GtkCssImageEffect

This will allow us to use the CSS machinery to apply a highlight or dim
effect when images are prelit or insensitive.
Comment 3 Cosimo Cecchi 2013-08-04 09:55:24 UTC
Created attachment 250797 [details] [review]
themingengine: apply image effects according to GtkCssImageEffect value

Instead of only looking at the state flags.
Comment 4 Cosimo Cecchi 2013-08-04 09:56:01 UTC
Created attachment 250798 [details] [review]
iconfactory: cache/invalidate pixbufs according to the effect

The state of the widget is not enough now to cache the pixbuf - we also
have to take into consideration the image effect itself, since the state
on the actual GtkStyleContext we use might not change, e.g. because the
change was on a parent context.
Comment 5 Cosimo Cecchi 2013-08-04 14:59:34 UTC
Created attachment 250806 [details] [review]
iconhelper: refactor some code into a single function
Comment 6 Cosimo Cecchi 2013-08-20 00:16:37 UTC
Ping?
Comment 7 Benjamin Otte (Company) 2013-08-20 00:29:43 UTC
Looks good, please commit!
Comment 8 Cosimo Cecchi 2013-08-20 01:04:42 UTC
Thanks, pushed.

Attachment 250795 [details] pushed as 723a589 - themingengine: refactor a conditional branch
Attachment 250796 [details] pushed as 736b350 - css: Add a GtkCssValue for GtkCssImageEffect
Attachment 250797 [details] pushed as b6cf6d5 - themingengine: apply image effects according to GtkCssImageEffect value
Attachment 250798 [details] pushed as 19c5a00 - iconfactory: cache/invalidate pixbufs according to the effect
Attachment 250806 [details] pushed as 417d666 - iconhelper: refactor some code into a single function