murrine r10 - in trunk: . src
- From: acimitan svn gnome org
- To: svn-commits-list gnome org
- Subject: murrine r10 - in trunk: . src
- Date: Sat, 16 Feb 2008 00:12:06 +0000 (GMT)
Author: acimitan
Date: Sat Feb 16 00:12:06 2008
New Revision: 10
URL: http://svn.gnome.org/viewvc/murrine?rev=10&view=rev
Log:
2008-02-16 Andrea Cimitan <andrea cimitan gmail com>
* src/murrine_draw_rgba.c: (murrine_rgba_draw_entry),
(murrine_rgba_draw_menubar), (murrine_rgba_draw_toolbar),
(murrine_rgba_draw_tab), (murrine_rgba_draw_menu_frame):
* src/murrine_rc_style.c: (murrine_rc_style_init),
(murrine_rc_style_parse), (murrine_rc_style_merge):
* src/murrine_rc_style.h:
* src/murrine_style.c: (murrine_set_widget_parameters),
(murrine_style_draw_flat_box), (murrine_style_draw_box_gap),
(murrine_style_draw_box), (murrine_style_init_from_rc),
(murrine_style_copy):
* src/murrine_style.h:
* src/murrine_types.h:
Rev 8 again :)
Modified:
trunk/ChangeLog
trunk/src/murrine_draw_rgba.c
trunk/src/murrine_rc_style.c
trunk/src/murrine_rc_style.h
trunk/src/murrine_style.c
trunk/src/murrine_style.h
trunk/src/murrine_types.h
Modified: trunk/src/murrine_draw_rgba.c
==============================================================================
--- trunk/src/murrine_draw_rgba.c (original)
+++ trunk/src/murrine_draw_rgba.c Sat Feb 16 00:12:06 2008
@@ -351,12 +351,12 @@
/* Fill the background (shouldn't have to) */
cairo_rectangle (cr, -0.5, -0.5, width, height);
- murrine_set_color_rgba (cr, &widget->parentbg, WINDOW_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, &widget->parentbg, WINDOW_OPACITY);
cairo_fill (cr);
/* Fill the entry's base color (why isn't is large enough by default?) */
cairo_rectangle (cr, 1.5, 1.5, width-3, height-3);
- murrine_set_color_rgba (cr, base, ENTRY_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, base, ENTRY_OPACITY);
cairo_fill (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
@@ -686,8 +686,8 @@
MurrineRGB lower;
murrine_shade (fill, 0.95, &lower);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
- cairo_pattern_add_color_stop_rgba (pattern, 0.0, fill->r, fill->g, fill->b, MENUBAR_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, 1.0, lower.r, lower.g, lower.b, MENUBAR_OPACITY*widget->mrn_gradient.opacity_ratio);
+ cairo_pattern_add_color_stop_rgba (pattern, 0.0, fill->r, fill->g, fill->b, MENUBAR_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, 1.0, lower.r, lower.g, lower.b, MENUBAR_OPACITY);
cairo_set_source (cr, pattern);
cairo_fill (cr);
cairo_pattern_destroy (pattern);
@@ -701,8 +701,8 @@
murrine_shade (fill, 0.9, &top);
murrine_shade (fill, 1.1, &low);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
- cairo_pattern_add_color_stop_rgba (pattern, 0.0, top.r, top.g, top.b, MENUBAR_STRIPED_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, 1.0, low.r, low.g, low.b, MENUBAR_STRIPED_OPACITY*widget->mrn_gradient.opacity_ratio);
+ cairo_pattern_add_color_stop_rgba (pattern, 0.0, top.r, top.g, top.b, MENUBAR_STRIPED_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, 1.0, low.r, low.g, low.b, MENUBAR_STRIPED_OPACITY);
cairo_set_source (cr, pattern);
cairo_fill (cr);
@@ -712,7 +712,7 @@
int counter = -height;
cairo_set_line_width (cr, 1.0);
murrine_shade (&low, 0.9, &low);
- murrine_set_color_rgba (cr, &low, MENUBAR_STRIPED_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, &low, MENUBAR_STRIPED_OPACITY);
while (counter < width)
{
cairo_move_to (cr, counter, height);
@@ -723,7 +723,7 @@
}
else /* Flat menubar */
{
- murrine_set_color_rgba (cr, fill, MENUBAR_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, fill, MENUBAR_OPACITY);
cairo_fill (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
@@ -763,7 +763,7 @@
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
#ifdef HAVE_MACMENU
- murrine_set_color_rgba (cr, fill, WINDOW_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, fill, WINDOW_OPACITY);
cairo_fill (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
#else
@@ -810,8 +810,8 @@
MurrineRGB lower;
murrine_shade (fill, 0.95, &lower);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
- cairo_pattern_add_color_stop_rgba (pattern, 0.0, fill->r, fill->g, fill->b, TOOLBAR_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, 1.0, lower.r, lower.g, lower.b, TOOLBAR_OPACITY*widget->mrn_gradient.opacity_ratio);
+ cairo_pattern_add_color_stop_rgba (pattern, 0.0, fill->r, fill->g, fill->b, TOOLBAR_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, 1.0, lower.r, lower.g, lower.b, TOOLBAR_OPACITY);
cairo_set_source (cr, pattern);
cairo_fill (cr);
cairo_pattern_destroy (pattern);
@@ -820,7 +820,7 @@
}
else /* Flat toolbar */
{
- murrine_set_color_rgba (cr, fill, TOOLBAR_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, fill, TOOLBAR_OPACITY);
cairo_fill (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
@@ -1106,7 +1106,7 @@
/* Draw fill */
if (!widget->active)
{
- murrine_set_color_rgba (cr, fill, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, fill, NOTEBOOK_OPACITY);
cairo_fill (cr);
}
@@ -1162,10 +1162,10 @@
else
clearlooks_rounded_rectangle (cr, 0, 0, width-1, height-1, widget->roundness, corners);
- cairo_pattern_add_color_stop_rgba (pattern, 0.0, shade1.r, shade1.g, shade1.b, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, 0.4, shade2.r, shade2.g, shade2.b, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, 0.4, shade3.r, shade3.g, shade3.b, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, 1.0, shade4.r, shade4.g, shade4.b, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
+ cairo_pattern_add_color_stop_rgba (pattern, 0.0, shade1.r, shade1.g, shade1.b, NOTEBOOK_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, 0.4, shade2.r, shade2.g, shade2.b, NOTEBOOK_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, 0.4, shade3.r, shade3.g, shade3.b, NOTEBOOK_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, 1.0, shade4.r, shade4.g, shade4.b, NOTEBOOK_OPACITY);
cairo_set_source (cr, pattern);
cairo_fill (cr);
cairo_pattern_destroy (pattern);
@@ -1205,9 +1205,9 @@
else
clearlooks_rounded_rectangle (cr, 0, 0, width-1, height-1, widget->roundness, corners);
- cairo_pattern_add_color_stop_rgba (pattern, 0.0, stripe_fill->r, stripe_fill->g, stripe_fill->b, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, strip_size, stripe_fill->r, stripe_fill->g, stripe_fill->b, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
- cairo_pattern_add_color_stop_rgba (pattern, strip_size, fill->r, fill->g, fill->b, NOTEBOOK_OPACITY*widget->mrn_gradient.opacity_ratio);
+ cairo_pattern_add_color_stop_rgba (pattern, 0.0, stripe_fill->r, stripe_fill->g, stripe_fill->b, NOTEBOOK_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, strip_size, stripe_fill->r, stripe_fill->g, stripe_fill->b, NOTEBOOK_OPACITY);
+ cairo_pattern_add_color_stop_rgba (pattern, strip_size, fill->r, fill->g, fill->b, NOTEBOOK_OPACITY);
cairo_set_source (cr, pattern);
cairo_fill (cr);
cairo_pattern_destroy (pattern);
@@ -1873,7 +1873,7 @@
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
clearlooks_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, widget->roundness, corners);
- murrine_set_color_rgba (cr, &colors->bg[0], MENU_OPACITY*widget->mrn_gradient.opacity_ratio);
+ murrine_set_color_rgba (cr, &colors->bg[0], MENU_OPACITY);
cairo_fill (cr);
murrine_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, widget->roundness, corners);
Modified: trunk/src/murrine_rc_style.c
==============================================================================
--- trunk/src/murrine_rc_style.c (original)
+++ trunk/src/murrine_rc_style.c Sat Feb 16 00:12:06 2008
@@ -58,7 +58,6 @@
TOKEN_MENUBARSTYLE,
TOKEN_MENUITEMSTYLE,
TOKEN_MENUSTYLE,
- TOKEN_OPACITY_RATIO,
TOKEN_RGBA,
TOKEN_ROUNDNESS,
TOKEN_SCROLLBAR_COLOR,
@@ -106,7 +105,6 @@
{ "menubarstyle", TOKEN_MENUBARSTYLE },
{ "menuitemstyle", TOKEN_MENUITEMSTYLE },
{ "menustyle", TOKEN_MENUSTYLE },
- { "opacity_ratio", TOKEN_OPACITY_RATIO },
{ "rgba", TOKEN_RGBA },
{ "roundness", TOKEN_ROUNDNESS },
{ "scrollbar_color", TOKEN_SCROLLBAR_COLOR },
@@ -177,7 +175,6 @@
murrine_rc->menubarstyle = 0;
murrine_rc->menuitemstyle = 1;
murrine_rc->menustyle = 1;
- murrine_rc->opacity_ratio = 1.0;
murrine_rc->rgba = TRUE;
murrine_rc->roundness = 1;
murrine_rc->scrollbarstyle = 0;
@@ -486,10 +483,6 @@
token = theme_parse_int (settings, scanner, &murrine_style->menustyle);
murrine_style->flags |= MRN_FLAG_MENUSTYLE;
break;
- case TOKEN_OPACITY_RATIO:
- token = theme_parse_ratio (settings, scanner, &murrine_style->opacity_ratio);
- murrine_style->flags |= MRN_FLAG_OPACITY_RATIO;
- break;
case TOKEN_RGBA:
token = theme_parse_boolean (settings, scanner, &murrine_style->rgba);
murrine_style->flags |= MRN_FLAG_RGBA;
@@ -618,8 +611,6 @@
dest_w->menuitemstyle = src_w->menuitemstyle;
if (flags & MRN_FLAG_MENUSTYLE)
dest_w->menustyle = src_w->menustyle;
- if (flags & MRN_FLAG_OPACITY_RATIO)
- dest_w->opacity_ratio = src_w->opacity_ratio;
if (flags & MRN_FLAG_RGBA)
dest_w->rgba = src_w->rgba;
if (flags & MRN_FLAG_ROUNDNESS)
Modified: trunk/src/murrine_rc_style.h
==============================================================================
--- trunk/src/murrine_rc_style.h (original)
+++ trunk/src/murrine_rc_style.h Sat Feb 16 00:12:06 2008
@@ -51,15 +51,14 @@
MRN_FLAG_MENUBARSTYLE = 1 << 14,
MRN_FLAG_MENUITEMSTYLE = 1 << 15,
MRN_FLAG_MENUSTYLE = 1 << 16,
- MRN_FLAG_OPACITY_RATIO = 1 << 17,
- MRN_FLAG_RGBA = 1 << 18,
- MRN_FLAG_ROUNDNESS = 1 << 19,
- MRN_FLAG_SCROLLBAR_COLOR = 1 << 20,
- MRN_FLAG_SCROLLBARSTYLE = 1 << 21,
- MRN_FLAG_SLIDERSTYLE = 1 << 22,
- MRN_FLAG_STEPPERSTYLE = 1 << 23,
- MRN_FLAG_STYLE = 1 << 24,
- MRN_FLAG_TOOLBARSTYLE = 1 << 25
+ MRN_FLAG_RGBA = 1 << 17,
+ MRN_FLAG_ROUNDNESS = 1 << 18,
+ MRN_FLAG_SCROLLBAR_COLOR = 1 << 19,
+ MRN_FLAG_SCROLLBARSTYLE = 1 << 20,
+ MRN_FLAG_SLIDERSTYLE = 1 << 21,
+ MRN_FLAG_STEPPERSTYLE = 1 << 22,
+ MRN_FLAG_STYLE = 1 << 23,
+ MRN_FLAG_TOOLBARSTYLE = 1 << 24
} MurrineRcFlags;
struct _MurrineRcStyle
@@ -75,7 +74,6 @@
double gradient_stop_4;
double highlight_ratio;
double innerborder_ratio;
- double opacity_ratio;
guint8 glazestyle;
guint8 listviewheaderstyle;
Modified: trunk/src/murrine_style.c
==============================================================================
--- trunk/src/murrine_style.c (original)
+++ trunk/src/murrine_style.c Sat Feb 16 00:12:06 2008
@@ -161,8 +161,7 @@
}
mrn_gradient.gradients = murrine_style->gradients;
mrn_gradient.use_rgba = (murrine_widget_is_rgba ((GtkWidget*) widget) && murrine_style->rgba);
- mrn_gradient.opacity_ratio = murrine_style->opacity_ratio;
- mrn_gradient.rgba_opacity = GRADIENT_OPACITY*murrine_style->opacity_ratio;
+ mrn_gradient.rgba_opacity = GRADIENT_OPACITY;
MurrineDrawStyles drawstyle = MRN_DRAW_STYLE_MURRINE;
if (mrn_gradient.use_rgba)
@@ -256,7 +255,7 @@
cairo_paint (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- murrine_set_color_rgba (cr, &colors->base[state_type], ENTRY_OPACITY*murrine_style->opacity_ratio);
+ murrine_set_color_rgba (cr, &colors->base[state_type], ENTRY_OPACITY);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
}
@@ -267,7 +266,7 @@
cairo_paint (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- murrine_set_color_rgba (cr, &colors->bg[0], WINDOW_OPACITY*murrine_style->opacity_ratio);
+ murrine_set_color_rgba (cr, &colors->bg[0], WINDOW_OPACITY);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
}
@@ -283,13 +282,13 @@
pattern = cairo_pattern_create_linear (0, 0, width, 0);
cairo_pattern_add_color_stop_rgba (pattern, 0.0, colors->bg[0].r,
colors->bg[0].g,
- colors->bg[0].b, WINDOW_OPACITY*murrine_style->opacity_ratio);
+ colors->bg[0].b, WINDOW_OPACITY);
cairo_pattern_add_color_stop_rgba (pattern, 0.5, colors->bg[0].r,
colors->bg[0].g,
- colors->bg[0].b, 0.8*murrine_style->opacity_ratio);
+ colors->bg[0].b, 0.8);
cairo_pattern_add_color_stop_rgba (pattern, 1.0, colors->bg[0].r,
colors->bg[0].g,
- colors->bg[0].b, WINDOW_OPACITY*murrine_style->opacity_ratio);
+ colors->bg[0].b, WINDOW_OPACITY);
cairo_set_source (cr, pattern);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
@@ -526,7 +525,7 @@
if (!params.mrn_gradient.use_rgba)
murrine_set_color_rgb (cr, &colors->bg[0]);
else
- murrine_set_color_rgba (cr, &colors->bg[0], NOTEBOOK_OPACITY*murrine_style->opacity_ratio);
+ murrine_set_color_rgba (cr, &colors->bg[0], NOTEBOOK_OPACITY);
cairo_fill(cr);
if (params.mrn_gradient.use_rgba)
@@ -674,7 +673,7 @@
if (params.mrn_gradient.use_rgba)
{
- params.mrn_gradient.rgba_opacity = MENUBAR_GLOSSY_OPACITY*murrine_style->opacity_ratio;
+ params.mrn_gradient.rgba_opacity = MENUBAR_GLOSSY_OPACITY;
}
horizontal = height < 2*width;
@@ -1602,7 +1601,6 @@
murrine_style->has_gradient_stop = MURRINE_RC_STYLE (rc_style)->has_gradient_stop;
murrine_style->highlight_ratio = MURRINE_RC_STYLE (rc_style)->highlight_ratio;
murrine_style->innerborder_ratio = MURRINE_RC_STYLE (rc_style)->innerborder_ratio;
- murrine_style->opacity_ratio = MURRINE_RC_STYLE (rc_style)->opacity_ratio;
murrine_style->glazestyle = MURRINE_RC_STYLE (rc_style)->glazestyle;
if (murrine_style->has_gradient_stop &&
@@ -1623,20 +1621,20 @@
}
else
murrine_style->roundness = MURRINE_RC_STYLE (rc_style)->roundness;
- murrine_style->listviewheaderstyle = MURRINE_RC_STYLE (rc_style)->listviewheaderstyle;
- murrine_style->listviewstyle = MURRINE_RC_STYLE (rc_style)->listviewstyle;
- murrine_style->menubaritemstyle = MURRINE_RC_STYLE (rc_style)->menubaritemstyle;
murrine_style->menubarstyle = MURRINE_RC_STYLE (rc_style)->menubarstyle;
- murrine_style->menuitemstyle = MURRINE_RC_STYLE (rc_style)->menuitemstyle;
+ murrine_style->menubaritemstyle = MURRINE_RC_STYLE (rc_style)->menubaritemstyle;
murrine_style->menustyle = MURRINE_RC_STYLE (rc_style)->menustyle;
- murrine_style->scrollbarstyle = MURRINE_RC_STYLE (rc_style)->scrollbarstyle;
+ murrine_style->menuitemstyle = MURRINE_RC_STYLE (rc_style)->menuitemstyle;
+ murrine_style->listviewheaderstyle = MURRINE_RC_STYLE (rc_style)->listviewheaderstyle;
+ murrine_style->listviewstyle = MURRINE_RC_STYLE (rc_style)->listviewstyle;
murrine_style->sliderstyle = MURRINE_RC_STYLE (rc_style)->sliderstyle;
+ murrine_style->scrollbarstyle = MURRINE_RC_STYLE (rc_style)->scrollbarstyle;
+ murrine_style->has_scrollbar_color = MURRINE_RC_STYLE (rc_style)->has_scrollbar_color;
murrine_style->stepperstyle = MURRINE_RC_STYLE (rc_style)->stepperstyle;
murrine_style->toolbarstyle = MURRINE_RC_STYLE (rc_style)->toolbarstyle;
murrine_style->animation = MURRINE_RC_STYLE (rc_style)->animation;
murrine_style->gradients = MURRINE_RC_STYLE (rc_style)->gradients;
murrine_style->colorize_scrollbar = MURRINE_RC_STYLE (rc_style)->colorize_scrollbar;
- murrine_style->has_scrollbar_color = MURRINE_RC_STYLE (rc_style)->has_scrollbar_color;
murrine_style->rgba = MURRINE_RC_STYLE (rc_style)->rgba;
if (murrine_style->has_scrollbar_color)
@@ -1864,7 +1862,6 @@
mrn_style->menubarstyle = mrn_src->menubarstyle;
mrn_style->menuitemstyle = mrn_src->menuitemstyle;
mrn_style->menustyle = mrn_src->menustyle;
- mrn_style->opacity_ratio = mrn_src->opacity_ratio;
mrn_style->rgba = mrn_src->rgba;
mrn_style->roundness = mrn_src->roundness;
mrn_style->scrollbar_color = mrn_src->scrollbar_color;
Modified: trunk/src/murrine_style.h
==============================================================================
--- trunk/src/murrine_style.h (original)
+++ trunk/src/murrine_style.h Sat Feb 16 00:12:06 2008
@@ -43,9 +43,9 @@
GtkStyle parent_instance;
MurrineColors colors;
-
+
MurrineStyles style;
-
+
double contrast;
double gradient_stop_1;
double gradient_stop_2;
@@ -53,7 +53,6 @@
double gradient_stop_4;
double highlight_ratio;
double innerborder_ratio;
- double opacity_ratio;
guint8 glazestyle;
guint8 listviewheaderstyle;
@@ -81,7 +80,7 @@
struct _MurrineStyleClass
{
GtkStyleClass parent_class;
-
+
MurrineStyleFunctions style_functions[MRN_NUM_DRAW_STYLES];
};
Modified: trunk/src/murrine_types.h
==============================================================================
--- trunk/src/murrine_types.h (original)
+++ trunk/src/murrine_types.h Sat Feb 16 00:12:06 2008
@@ -179,7 +179,6 @@
double gradient_stop_2;
double gradient_stop_3;
double gradient_stop_4;
- double opacity_ratio;
double rgba_opacity;
boolean gradients;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]