mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
remove color_set flag remove check of color_set flag before rendering (we
2008-05-13 Robert Escriva <me@robescriva.com> * src/ui/theme.h (struct): remove color_set flag * src/ui/theme.c (meta_color_spec_render, meta_color_spec_new_from_string): remove check of color_set flag before rendering (we always do it now). Closes #511826. svn path=/trunk/; revision=3708
This commit is contained in:
parent
8547d1e8ed
commit
53b9e49ca4
@ -1,3 +1,10 @@
|
|||||||
|
2008-05-13 Robert Escriva <me@robescriva.com>
|
||||||
|
|
||||||
|
* src/ui/theme.h (struct): remove color_set flag
|
||||||
|
* src/ui/theme.c (meta_color_spec_render,
|
||||||
|
meta_color_spec_new_from_string): remove check of color_set flag
|
||||||
|
before rendering (we always do it now). Closes #511826.
|
||||||
|
|
||||||
2008-05-12 Thomas Thurman <tthurman@gnome.org>
|
2008-05-12 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
* tools/xlib.py: Basic Python-based Xlib client for testing
|
* tools/xlib.py: Basic Python-based Xlib client for testing
|
||||||
|
@ -1264,7 +1264,6 @@ meta_color_spec_new_from_string (const char *str,
|
|||||||
spec->data.blend.alpha = alpha;
|
spec->data.blend.alpha = alpha;
|
||||||
spec->data.blend.background = bg;
|
spec->data.blend.background = bg;
|
||||||
spec->data.blend.foreground = fg;
|
spec->data.blend.foreground = fg;
|
||||||
spec->data.blend.color_set = FALSE;
|
|
||||||
}
|
}
|
||||||
else if (str[0] == 's' && str[1] == 'h' && str[2] == 'a' && str[3] == 'd' &&
|
else if (str[0] == 's' && str[1] == 'h' && str[2] == 'a' && str[3] == 'd' &&
|
||||||
str[4] == 'e' && str[5] == '/')
|
str[4] == 'e' && str[5] == '/')
|
||||||
@ -1323,7 +1322,6 @@ meta_color_spec_new_from_string (const char *str,
|
|||||||
spec = meta_color_spec_new (META_COLOR_SPEC_SHADE);
|
spec = meta_color_spec_new (META_COLOR_SPEC_SHADE);
|
||||||
spec->data.shade.factor = factor;
|
spec->data.shade.factor = factor;
|
||||||
spec->data.shade.base = base;
|
spec->data.shade.base = base;
|
||||||
spec->data.shade.color_set = FALSE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1411,15 +1409,11 @@ meta_color_spec_render (MetaColorSpec *spec,
|
|||||||
{
|
{
|
||||||
GdkColor bg, fg;
|
GdkColor bg, fg;
|
||||||
|
|
||||||
if (spec->data.blend.color_set == FALSE)
|
meta_color_spec_render (spec->data.blend.background, widget, &bg);
|
||||||
{
|
meta_color_spec_render (spec->data.blend.foreground, widget, &fg);
|
||||||
meta_color_spec_render (spec->data.blend.background, widget, &bg);
|
|
||||||
meta_color_spec_render (spec->data.blend.foreground, widget, &fg);
|
|
||||||
|
|
||||||
color_composite (&bg, &fg, spec->data.blend.alpha,
|
color_composite (&bg, &fg, spec->data.blend.alpha,
|
||||||
&spec->data.blend.color);
|
&spec->data.blend.color);
|
||||||
spec->data.blend.color_set = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
*color = spec->data.blend.color;
|
*color = spec->data.blend.color;
|
||||||
}
|
}
|
||||||
@ -1427,15 +1421,11 @@ meta_color_spec_render (MetaColorSpec *spec,
|
|||||||
|
|
||||||
case META_COLOR_SPEC_SHADE:
|
case META_COLOR_SPEC_SHADE:
|
||||||
{
|
{
|
||||||
if (spec->data.shade.color_set == FALSE)
|
meta_color_spec_render (spec->data.shade.base, widget,
|
||||||
{
|
&spec->data.shade.color);
|
||||||
meta_color_spec_render (spec->data.shade.base, widget,
|
|
||||||
&spec->data.shade.color);
|
|
||||||
|
|
||||||
gtk_style_shade (&spec->data.shade.color,
|
gtk_style_shade (&spec->data.shade.color,
|
||||||
&spec->data.shade.color, spec->data.shade.factor);
|
&spec->data.shade.color, spec->data.shade.factor);
|
||||||
spec->data.shade.color_set = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
*color = spec->data.shade.color;
|
*color = spec->data.shade.color;
|
||||||
}
|
}
|
||||||
|
@ -259,14 +259,12 @@ struct _MetaColorSpec
|
|||||||
MetaColorSpec *background;
|
MetaColorSpec *background;
|
||||||
double alpha;
|
double alpha;
|
||||||
|
|
||||||
gboolean color_set;
|
|
||||||
GdkColor color;
|
GdkColor color;
|
||||||
} blend;
|
} blend;
|
||||||
struct {
|
struct {
|
||||||
MetaColorSpec *base;
|
MetaColorSpec *base;
|
||||||
double factor;
|
double factor;
|
||||||
|
|
||||||
gboolean color_set;
|
|
||||||
GdkColor color;
|
GdkColor color;
|
||||||
} shade;
|
} shade;
|
||||||
} data;
|
} data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user