[murrine] New option: expanderstyle = 0 to draw arrows.
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [murrine] New option: expanderstyle = 0 to draw arrows.
- Date: Tue, 25 May 2010 18:34:13 +0000 (UTC)
commit 11c424d27ce81e751df6a3f3ec5c15432b8dc59e
Author: Andrea Cimitan <andrea cimitan gmail com>
Date: Tue May 25 19:33:56 2010 +0100
New option: expanderstyle = 0 to draw arrows.
NEWS | 1 +
src/murrine_rc_style.c | 9 +++++++++
src/murrine_rc_style.h | 48 +++++++++++++++++++++++++-----------------------
src/murrine_style.c | 9 ++++-----
src/murrine_style.h | 1 +
5 files changed, 40 insertions(+), 28 deletions(-)
---
diff --git a/NEWS b/NEWS
index 1068391..c6090e1 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Changes in this release:
cellstyle = 1 for the border around the selected cell (as before).
- New option: comboboxstyle = 1 to colorize the GtkComboBox below the arrow.
- New option: disable_focus = TRUE to disable focus drawing.
+- New option: expanderstyle = 0 to draw arrows.
- New option: gradient_colors = { "#ffffff", "#ffffff", "#ffffff", "#ffffff" }
to set the colors used on the gradient of many widgets.
gradient_colors = FALSE to disable.
diff --git a/src/murrine_rc_style.c b/src/murrine_rc_style.c
index fc400ca..bd27390 100644
--- a/src/murrine_rc_style.c
+++ b/src/murrine_rc_style.c
@@ -44,6 +44,7 @@ enum
TOKEN_COMBOBOXSTYLE,
TOKEN_CONTRAST,
TOKEN_DISABLE_FOCUS,
+ TOKEN_EXPANDERSTYLE,
TOKEN_FOCUS_COLOR,
TOKEN_GLAZESTYLE,
TOKEN_GLOW_SHADE,
@@ -105,6 +106,7 @@ theme_symbols[] =
{ "comboboxstyle", TOKEN_COMBOBOXSTYLE },
{ "contrast", TOKEN_CONTRAST },
{ "disable_focus", TOKEN_DISABLE_FOCUS },
+ { "expanderstyle", TOKEN_EXPANDERSTYLE },
{ "focus_color", TOKEN_FOCUS_COLOR },
{ "glazestyle", TOKEN_GLAZESTYLE },
{ "glow_shade", TOKEN_GLOW_SHADE },
@@ -172,6 +174,7 @@ murrine_rc_style_init (MurrineRcStyle *murrine_rc)
murrine_rc->comboboxstyle = 0;
murrine_rc->contrast = 1.0;
murrine_rc->disable_focus = FALSE;
+ murrine_rc->expanderstyle = 0;
murrine_rc->has_border_colors = FALSE;
murrine_rc->has_gradient_colors = FALSE;
murrine_rc->glazestyle = 1;
@@ -648,6 +651,10 @@ murrine_rc_style_parse (GtkRcStyle *rc_style,
token = theme_parse_boolean (settings, scanner, &murrine_style->disable_focus);
murrine_style->bflags |= MRN_FLAG_DISABLE_FOCUS;
break;
+ case TOKEN_EXPANDERSTYLE:
+ token = theme_parse_int (settings, scanner, &murrine_style->expanderstyle);
+ murrine_style->flags |= MRN_FLAG_EXPANDERSTYLE;
+ break;
case TOKEN_FOCUS_COLOR:
token = theme_parse_color (settings, scanner, rc_style, &murrine_style->focus_color);
murrine_style->flags |= MRN_FLAG_FOCUS_COLOR;
@@ -851,6 +858,8 @@ murrine_rc_style_merge (GtkRcStyle *dest,
dest_w->cellstyle = src_w->cellstyle;
if (flags & MRN_FLAG_COMBOBOXSTYLE)
dest_w->comboboxstyle = src_w->comboboxstyle;
+ if (flags & MRN_FLAG_EXPANDERSTYLE)
+ dest_w->expanderstyle = src_w->expanderstyle;
if (flags & MRN_FLAG_FOCUS_COLOR)
dest_w->focus_color = src_w->focus_color;
if (flags & MRN_FLAG_GLAZESTYLE)
diff --git a/src/murrine_rc_style.h b/src/murrine_rc_style.h
index 4eb44d6..52b6dc5 100644
--- a/src/murrine_rc_style.h
+++ b/src/murrine_rc_style.h
@@ -39,29 +39,30 @@ typedef enum
MRN_FLAG_CELLSTYLE = 1 << 2,
MRN_FLAG_COMBOBOXSTYLE = 1 << 3,
MRN_FLAG_FOCUS_COLOR = 1 << 4,
- MRN_FLAG_GLAZESTYLE = 1 << 5,
- MRN_FLAG_GLOW_SHADE = 1 << 6,
- MRN_FLAG_GLOWSTYLE = 1 << 7,
- MRN_FLAG_HIGHLIGHT_SHADE = 1 << 8,
- MRN_FLAG_LIGHTBORDER_SHADE = 1 << 9,
- MRN_FLAG_LIGHTBORDERSTYLE= 1 << 10,
- MRN_FLAG_LISTVIEWHEADERSTYLE = 1 << 11,
- MRN_FLAG_LISTVIEWSTYLE = 1 << 12,
- MRN_FLAG_MENUBARITEMSTYLE = 1 << 13,
- MRN_FLAG_MENUBARSTYLE = 1 << 14,
- MRN_FLAG_MENUITEMSTYLE = 1 << 15,
- MRN_FLAG_MENUSTYLE = 1 << 16,
- MRN_FLAG_PRELIGHT_SHADE = 1 << 17,
- MRN_FLAG_PROGRESSBARSTYLE = 1 << 18,
- MRN_FLAG_RELIEFSTYLE = 1 << 19,
- MRN_FLAG_SCROLLBARSTYLE = 1 << 20,
- MRN_FLAG_SEPARATORSTYLE = 1 << 21,
- MRN_FLAG_SLIDERSTYLE = 1 << 22,
- MRN_FLAG_SPINBUTTONSTYLE = 1 << 23,
- MRN_FLAG_STEPPERSTYLE = 1 << 24,
- MRN_FLAG_TEXTSTYLE = 1 << 25,
- MRN_FLAG_TEXT_SHADE = 1 << 26,
- MRN_FLAG_TOOLBARSTYLE = 1 << 27
+ MRN_FLAG_EXPANDERSTYLE = 1 << 5,
+ MRN_FLAG_GLAZESTYLE = 1 << 6,
+ MRN_FLAG_GLOW_SHADE = 1 << 7,
+ MRN_FLAG_GLOWSTYLE = 1 << 8,
+ MRN_FLAG_HIGHLIGHT_SHADE = 1 << 9,
+ MRN_FLAG_LIGHTBORDER_SHADE = 1 << 10,
+ MRN_FLAG_LIGHTBORDERSTYLE= 1 << 11,
+ MRN_FLAG_LISTVIEWHEADERSTYLE = 1 << 12,
+ MRN_FLAG_LISTVIEWSTYLE = 1 << 13,
+ MRN_FLAG_MENUBARITEMSTYLE = 1 << 14,
+ MRN_FLAG_MENUBARSTYLE = 1 << 15,
+ MRN_FLAG_MENUITEMSTYLE = 1 << 16,
+ MRN_FLAG_MENUSTYLE = 1 << 17,
+ MRN_FLAG_PRELIGHT_SHADE = 1 << 18,
+ MRN_FLAG_PROGRESSBARSTYLE = 1 << 19,
+ MRN_FLAG_RELIEFSTYLE = 1 << 20,
+ MRN_FLAG_SCROLLBARSTYLE = 1 << 21,
+ MRN_FLAG_SEPARATORSTYLE = 1 << 22,
+ MRN_FLAG_SLIDERSTYLE = 1 << 23,
+ MRN_FLAG_SPINBUTTONSTYLE = 1 << 24,
+ MRN_FLAG_STEPPERSTYLE = 1 << 25,
+ MRN_FLAG_TEXTSTYLE = 1 << 26,
+ MRN_FLAG_TEXT_SHADE = 1 << 27,
+ MRN_FLAG_TOOLBARSTYLE = 1 << 28
} MurrineRcFlags;
typedef enum
@@ -106,6 +107,7 @@ struct _MurrineRcStyle
guint8 arrowstyle;
guint8 cellstyle;
guint8 comboboxstyle;
+ guint8 expanderstyle;
guint8 glazestyle;
guint8 glowstyle;
guint8 lightborderstyle;
diff --git a/src/murrine_style.c b/src/murrine_style.c
index cf28ce9..ddf4493 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -2088,17 +2088,14 @@ murrine_style_draw_expander (GtkStyle *style,
murrine_set_widget_parameters (widget, style, state_type, ¶ms);
- if (widget &&
- gtk_widget_class_find_style_property (GTK_WIDGET_GET_CLASS (widget), "expander-size"))
- {
+ if (widget && gtk_widget_class_find_style_property (GTK_WIDGET_GET_CLASS (widget), "expander-size"))
gtk_widget_style_get (widget, "expander-size", &expander.size, NULL);
- }
else
expander.size = 7;
expander.expander_style = expander_style;
expander.text_direction = murrine_get_direction (widget);
- expander.style = 0;
+ expander.style = murrine_style->expanderstyle;
STYLE_FUNCTION(draw_expander) (cr, colors, ¶ms, &expander, x, y, expander.size, expander.size);
@@ -2331,6 +2328,7 @@ murrine_style_init_from_rc (GtkStyle *style,
murrine_style->contrast = MURRINE_RC_STYLE (rc_style)->contrast;
murrine_style->colorize_scrollbar = MURRINE_RC_STYLE (rc_style)->colorize_scrollbar;
murrine_style->disable_focus = MURRINE_RC_STYLE (rc_style)->disable_focus;
+ murrine_style->expanderstyle = MURRINE_RC_STYLE (rc_style)->expanderstyle;
murrine_style->has_border_colors = MURRINE_RC_STYLE (rc_style)->has_border_colors;
murrine_style->has_focus_color = MURRINE_RC_STYLE (rc_style)->flags & MRN_FLAG_FOCUS_COLOR;
murrine_style->has_gradient_colors = MURRINE_RC_STYLE (rc_style)->has_gradient_colors;
@@ -2464,6 +2462,7 @@ murrine_style_copy (GtkStyle *style, GtkStyle *src)
mrn_style->comboboxstyle = mrn_src->comboboxstyle;
mrn_style->contrast = mrn_src->contrast;
mrn_style->disable_focus = mrn_src->disable_focus;
+ mrn_style->expanderstyle = mrn_src->expanderstyle;
mrn_style->focus_color = mrn_src->focus_color;
mrn_style->glazestyle = mrn_src->glazestyle;
mrn_style->glow_shade = mrn_src->glow_shade;
diff --git a/src/murrine_style.h b/src/murrine_style.h
index a126aeb..b9f949a 100644
--- a/src/murrine_style.h
+++ b/src/murrine_style.h
@@ -56,6 +56,7 @@ struct _MurrineStyle
guint8 arrowstyle;
guint8 cellstyle;
guint8 comboboxstyle;
+ guint8 expanderstyle;
guint8 glazestyle;
guint8 glowstyle;
guint8 lightborderstyle;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]