[gtk+] GtkThemingEngine: Render correctly spinbutton buttons.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkThemingEngine: Render correctly spinbutton buttons.
- Date: Sat, 4 Dec 2010 14:56:02 +0000 (UTC)
commit b6226cb7b943be3ffc13cceca328f840b1c85def
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Aug 3 20:38:23 2010 +0200
GtkThemingEngine: Render correctly spinbutton buttons.
gtk/gtkthemingengine.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index f162b31..3d43b2f 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1009,12 +1009,27 @@ gtk_theming_engine_render_frame (GtkThemingEngine *engine,
{
if (gtk_theming_engine_has_class (engine, "button"))
{
+ GtkJunctionSides sides;
+
+ sides = gtk_theming_engine_get_junction_sides (engine);
+
+ if (sides & GTK_JUNCTION_BOTTOM)
+ y += 2;
+
+ width -= 3;
+ height -= 2;
+
+ if (gtk_theming_engine_get_direction (engine) == GTK_TEXT_DIR_RTL)
+ x += 2;
+ else
+ x += 1;
+
gdk_cairo_set_source_color (cr, &lighter);
- add_path_rectangle_sides (cr, x + 1, y + 2, width - 3, height - 2, SIDE_TOP);
+ add_path_rectangle_sides (cr, x, y, width, height, SIDE_TOP);
cairo_stroke (cr);
gdk_cairo_set_source_color (cr, &darker);
- add_path_rectangle_sides (cr, x + 1, y + 2, width - 3, height - 2, SIDE_BOTTOM);
+ add_path_rectangle_sides (cr, x, y, width, height, SIDE_BOTTOM);
cairo_stroke (cr);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]