[gtk-theme-engine-clearlooks] Get border-width as a GtkBorder.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-theme-engine-clearlooks] Get border-width as a GtkBorder.
- Date: Mon, 6 Dec 2010 21:23:38 +0000 (UTC)
commit c67067d661a28fe136868632aaf67694ac5a847d
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 1 03:06:57 2010 +0100
Get border-width as a GtkBorder.
src/clearlooks_draw.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/clearlooks_draw.c b/src/clearlooks_draw.c
index 4125a41..700d951 100644
--- a/src/clearlooks_draw.c
+++ b/src/clearlooks_draw.c
@@ -632,7 +632,7 @@ clearlooks_draw_spinbutton (cairo_t *cr,
CairoColor *bg_color, border;
CairoColor hilight;
GtkStateFlags state;
- gint border_width;
+ GtkBorder *button_border;
state = gtk_theming_engine_get_state (engine);
@@ -646,7 +646,7 @@ clearlooks_draw_spinbutton (cairo_t *cr,
gtk_theming_engine_get (engine, state,
"background-color", &bg_color,
- "border-width", &border_width,
+ "border-width", &button_border,
NULL);
style_functions->draw_button (cr, engine, x, y, width, height);
@@ -656,17 +656,18 @@ clearlooks_draw_spinbutton (cairo_t *cr,
cairo_translate (cr, x, y);
- cairo_move_to (cr, border_width + 0.5, (height/2) + 0.5);
- cairo_line_to (cr, width-border_width - 0.5, (height/2) + 0.5);
+ cairo_move_to (cr, button_border->left + 0.5, (height/2) + 0.5);
+ cairo_line_to (cr, width - button_border->right - 0.5, (height/2) + 0.5);
ge_cairo_set_color (cr, &border);
cairo_stroke (cr);
- cairo_move_to (cr, border_width + 0.5, (height/2)+1.5);
- cairo_line_to (cr, width-border_width - 0.5, (height/2)+1.5);
+ cairo_move_to (cr, button_border->left + 0.5, (height/2)+1.5);
+ cairo_line_to (cr, width - button_border->right - 0.5, (height/2)+1.5);
ge_cairo_set_color (cr, &hilight);
cairo_stroke (cr);
gdk_rgba_free ((GdkRGBA *) bg_color);
+ gtk_border_free (button_border);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]