GNOME Bugzilla – Bug 705443
Fix image effects
Last modified: 2013-08-20 01:05:08 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.
Created attachment 250795 [details] [review] themingengine: refactor a conditional branch Return early when the state is not wildcarded - makes the code more readable.
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.
Created attachment 250797 [details] [review] themingengine: apply image effects according to GtkCssImageEffect value Instead of only looking at the state flags.
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.
Created attachment 250806 [details] [review] iconhelper: refactor some code into a single function
Ping?
Looks good, please commit!
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