[murrine] listviewstyle = 2 for a solid line
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [murrine] listviewstyle = 2 for a solid line
- Date: Thu, 18 Mar 2010 22:50:36 +0000 (UTC)
commit 0b328037e8af0d18926ee866f388da3cebc06fa3
Author: Andrea <andrea cimitan gmail com>
Date: Thu Mar 18 23:50:13 2010 +0100
listviewstyle = 2 for a solid line
NEWS | 1 +
schema/murrine.xml.in.in | 3 ++
src/murrine_style.c | 59 ++++++++++++++++++++++++++++++++-------------
3 files changed, 46 insertions(+), 17 deletions(-)
---
diff --git a/NEWS b/NEWS
index 12bbb80..e04ac76 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ Changes in this release:
- New option: textstyle = 1 to draw an inset on the text (use carefully).
- New option: trough_shades = { 1.0, 1.0 } to draw a gradient on
the trough of GtkScrollbar and GtkProgressBar.
+- Changed option: listviewstyle = 2 for a solid line.
- Changed option: reliefstyle = 3 for a gradient on shadow,
reliefstyle = 4 for a stronger shadow.
- Changed option: stepperstyle = 2 for squared steppers with a rounded slider.
diff --git a/schema/murrine.xml.in.in b/schema/murrine.xml.in.in
index 9d39429..64d4bc8 100644
--- a/schema/murrine.xml.in.in
+++ b/schema/murrine.xml.in.in
@@ -160,6 +160,9 @@
<enumeration value="1">
<label>Dotted separators</label>
</enumeration>
+ <enumeration value="1">
+ <label>Solid line</label>
+ </enumeration>
</option>
<option type="enumeration" name="menubaritemstyle" default="0">
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 2410927..32191c2 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -353,30 +353,55 @@ murrine_style_draw_flat_box (DRAW_ARGS)
if (detail && (!strncmp ("cell_even", detail, 9) || !strncmp ("cell_odd", detail, 8)))
{
MurrineStyle *murrine_style = MURRINE_STYLE (style);
- if (murrine_style->listviewstyle > 0)
+ switch (murrine_style->listviewstyle)
{
- MurrineColors *colors = &murrine_style->colors;
- cairo_t *cr;
+ default:
+ case 0:
+ break;
+ case 1:
+ {
+ MurrineColors *colors = &murrine_style->colors;
+ cairo_t *cr;
- CHECK_ARGS
- SANITIZE_SIZE
+ CHECK_ARGS
+ SANITIZE_SIZE
- cr = murrine_begin_paint (window, area);
+ cr = murrine_begin_paint (window, area);
- cairo_translate (cr, x, y);
- int i;
- int pos = 1;
- if (murrine_style->listviewheaderstyle != 1)
- pos = 2;
+ cairo_translate (cr, x, y);
+ int i;
+ int pos = murrine_style->listviewheaderstyle != 1 ? 2 : 1;
- murrine_set_color_rgba (cr, &colors->text[GTK_STATE_NORMAL], 0.42);
- for (i = 2; i < height; i+=4)
- {
- cairo_rectangle (cr, -pos, i, 1, 1);
- cairo_fill (cr);
+ murrine_set_color_rgba (cr, &colors->text[GTK_STATE_NORMAL], 0.42);
+ for (i = 2; i < height; i+=4)
+ {
+ cairo_rectangle (cr, -pos, i, 1, 1);
+ cairo_fill (cr);
+ }
+
+ cairo_destroy (cr);
+ break;
}
+ case 2:
+ {
+ MurrineColors *colors = &murrine_style->colors;
+ cairo_t *cr;
+
+ CHECK_ARGS
+ SANITIZE_SIZE
+
+ cr = murrine_begin_paint (window, area);
- cairo_destroy (cr);
+ cairo_translate (cr, murrine_style->listviewheaderstyle != 1 ? x-1 : x, y);
+
+ cairo_move_to (cr, -0.5, 0);
+ cairo_line_to (cr, -0.5, height);
+ murrine_set_color_rgba (cr, &colors->text[GTK_STATE_NORMAL], 0.2);
+ cairo_stroke (cr);
+
+ cairo_destroy (cr);
+ break;
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]