[murrine] New supported widget: GtkIconView is now themed by the engine.
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [murrine] New supported widget: GtkIconView is now themed by the engine.
- Date: Mon, 16 Aug 2010 17:26:02 +0000 (UTC)
commit 78e33062e3af83ebc3b7378eb8fb8b7ec97f57d3
Author: Andrea Cimitan <andrea cimitan Å?mail com>
Date: Mon Aug 16 19:24:13 2010 +0200
New supported widget: GtkIconView is now themed by the engine.
NEWS | 4 +++-
src/cairo-support.c | 2 +-
src/murrine_draw.c | 41 ++++++++++++++++++++++++++++++++++++++++-
src/murrine_draw_rgba.c | 2 +-
src/murrine_style.c | 21 ++++++++++++++++++++-
src/murrine_types.h | 5 +++++
6 files changed, 70 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index 7a73ef5..536dfc7 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Overview of Changes in 0.91.0 (since 0.90.3)
============================================
Changes in this release:
- New supported widget: GtkExpander is now themed by the engine.
+- New supported widget: GtkIconView is now themed by the engine.
- New supported widget: GtkInfoBar is now themed by the engine.
- New option: arrowstyle = 1 to draw filled arrows.
arrowstyle = 2 to draw fat filled arrows.
@@ -46,7 +47,8 @@ Changes in this release:
the trough of GtkScrollbar and GtkProgressBar.
- Changed option: glowstyle = 5 for a glow around the edges.
- Changed option: listviewstyle = 2 for a solid line.
-- Changed option: menustyle = 2 for glow on the sides of the menu.
+- Changed option: menustyle = 2 for a dark glow on the sides of the menu.
+ menustyle = 3 for a bright glow on the sides of the menu.
- 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/src/cairo-support.c b/src/cairo-support.c
index 6d18927..dad34fe 100644
--- a/src/cairo-support.c
+++ b/src/cairo-support.c
@@ -1178,7 +1178,7 @@ murrine_exchange_axis (cairo_t *cr,
void
murrine_get_fill_color (MurrineRGB *color,
- const MurrineGradients *mrn_gradient)
+ const MurrineGradients *mrn_gradient)
{
if (mrn_gradient->has_gradient_colors)
{
diff --git a/src/murrine_draw.c b/src/murrine_draw.c
index 487a7c6..6f5da94 100644
--- a/src/murrine_draw.c
+++ b/src/murrine_draw.c
@@ -229,7 +229,7 @@ murrine_draw_button (cairo_t *cr,
glow_shade_new, highlight_shade_new, !widget->active ? lightborder_shade_new : 1.0,
mrn_gradient_new, widget,
os+1, os+1, width-(os*2)-2, height-(os*2)-2,
- widget->roundness, widget->corners, horizontal);
+ widget->roundness-1, widget->corners, horizontal);
cairo_restore (cr);
@@ -2401,6 +2401,42 @@ murrine_draw_tooltip (cairo_t *cr,
}
static void
+murrine_draw_iconview (cairo_t *cr,
+ const MurrineColors *colors,
+ const WidgetParameters *widget,
+ int x, int y, int width, int height)
+{
+ MurrineRGB border;
+ MurrineRGB fill = widget->focus ? colors->base[widget->state_type] :
+ colors->base[GTK_STATE_ACTIVE];
+
+ murrine_shade (&fill, murrine_get_contrast(0.6, widget->contrast), &border);
+ murrine_get_fill_color (&fill, &widget->mrn_gradient);
+
+ cairo_save (cr);
+
+ cairo_translate (cr, x, y);
+ cairo_save (cr);
+
+ murrine_rounded_rectangle_closed (cr, 1, 1, width-2, height-2, widget->roundness-1, widget->corners);
+ cairo_clip_preserve (cr);
+
+ murrine_draw_glaze (cr, &fill,
+ widget->glow_shade, widget->highlight_shade, widget->lightborder_shade,
+ widget->mrn_gradient, widget, 1, 1, width-2, height-2,
+ widget->roundness-1, widget->corners, TRUE);
+
+ cairo_restore (cr);
+
+ murrine_draw_border (cr, &border,
+ 0.5, 0.5, width-1, height-1,
+ widget->roundness, widget->corners,
+ widget->mrn_gradient, 1.0);
+
+ cairo_restore (cr);
+}
+
+static void
murrine_draw_handle (cairo_t *cr,
const MurrineColors *colors,
const WidgetParameters *widget,
@@ -3424,6 +3460,7 @@ murrine_draw_focus_border (cairo_t *cr,
radius = widget->roundness;
break;
case MRN_FOCUS_ICONVIEW:
+ return;
break;
case MRN_FOCUS_UNKNOWN:
/* Fallback to classic function, dots */
@@ -3529,6 +3566,7 @@ murrine_draw_focus_inner (cairo_t *cr,
radius = widget->roundness;
break;
case MRN_FOCUS_ICONVIEW:
+ return;
break;
case MRN_FOCUS_UNKNOWN:
/* Fallback to classic function, dots */
@@ -3613,6 +3651,7 @@ murrine_register_style_murrine (MurrineStyleFunctions *functions)
functions->draw_statusbar = murrine_draw_statusbar;
functions->draw_menu_frame = murrine_draw_menu_frame;
functions->draw_tooltip = murrine_draw_tooltip;
+ functions->draw_iconview = murrine_draw_iconview;
functions->draw_handle = murrine_draw_handle;
functions->draw_resize_grip = murrine_draw_resize_grip;
functions->draw_arrow = murrine_draw_arrow;
diff --git a/src/murrine_draw_rgba.c b/src/murrine_draw_rgba.c
index 6f2a8fc..b65025c 100644
--- a/src/murrine_draw_rgba.c
+++ b/src/murrine_draw_rgba.c
@@ -226,7 +226,7 @@ murrine_rgba_draw_button (cairo_t *cr,
glow_shade_new, highlight_shade_new, !widget->active ? lightborder_shade_new : 1.0,
mrn_gradient_new, widget,
os+1, os+1, width-(os*2)-2, height-(os*2)-2,
- widget->roundness, widget->corners, horizontal);
+ widget->roundness-1, widget->corners, horizontal);
cairo_restore (cr);
diff --git a/src/murrine_style.c b/src/murrine_style.c
index b88a21f..01d1f83 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -290,6 +290,25 @@ murrine_style_draw_flat_box (DRAW_ARGS)
cairo_destroy (cr);
}
+ else if (DETAIL ("icon_view_item"))
+ {
+ MurrineStyle *murrine_style = MURRINE_STYLE (style);
+ MurrineColors *colors = &murrine_style->colors;
+ cairo_t *cr;
+
+ CHECK_ARGS
+ SANITIZE_SIZE
+
+ cr = murrine_begin_paint (window, area);
+
+ WidgetParameters params;
+
+ murrine_set_widget_parameters (widget, style, state_type, ¶ms);
+
+ STYLE_FUNCTION(draw_iconview) (cr, colors, ¶ms, x, y, width, height);
+
+ cairo_destroy (cr);
+ }
else
{
if (DETAIL ("base") || DETAIL ("eventbox") || DETAIL ("entry_bg") || DETAIL ("trough"))
@@ -348,7 +367,7 @@ murrine_style_draw_flat_box (DRAW_ARGS)
}
else
{
- // //printf( "draw_flat_box: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget));
+/* printf( "draw_flat_box: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget));*/
GTK_STYLE_CLASS (murrine_style_parent_class)->draw_flat_box (style, window, state_type,
shadow_type,
area, widget, detail,
diff --git a/src/murrine_types.h b/src/murrine_types.h
index 9147715..5dd76a5 100644
--- a/src/murrine_types.h
+++ b/src/murrine_types.h
@@ -564,6 +564,11 @@ struct _MurrineStyleFunctions
const WidgetParameters *widget,
int x, int y, int width, int height);
+ void (*draw_iconview) (cairo_t *cr,
+ const MurrineColors *colors,
+ const WidgetParameters *widget,
+ int x, int y, int width, int height);
+
void (*draw_handle) (cairo_t *cr,
const MurrineColors *colors,
const WidgetParameters *widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]