Add StIconColors object, compute in StThemeNode

A new StIconColors object is used to efficiently track the colors
we need to colorize a symbolic icon.
st_theme_node_compute_icon_colors() is added to compute the
StIconColors for a theme node. (Refcounting of StIconColors means
that we'll typically share the colors object of the parent node.)

https://bugzilla.gnome.org/show_bug.cgi?id=633865
This commit is contained in:
Owen W. Taylor
2010-10-31 22:06:48 -04:00
parent 3ca86b2197
commit 04da2a61db
6 changed files with 277 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#include <clutter/clutter.h>
#include "st-border-image.h"
#include "st-icon-colors.h"
#include "st-shadow.h"
G_BEGIN_DECLS
@@ -197,6 +198,8 @@ StBorderImage *st_theme_node_get_border_image (StThemeNode *node);
StShadow *st_theme_node_get_shadow (StThemeNode *node);
StShadow *st_theme_node_get_text_shadow (StThemeNode *node);
StIconColors *st_theme_node_get_icon_colors (StThemeNode *node);
/* Helpers for get_preferred_width()/get_preferred_height() ClutterActor vfuncs */
void st_theme_node_adjust_for_height (StThemeNode *node,
float *for_height);