[gtk+] themingengine: Reduce border to 0 on hidden sides
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] themingengine: Reduce border to 0 on hidden sides
- Date: Sun, 12 Jun 2011 21:01:06 +0000 (UTC)
commit cd4c5274512b344bac417bb72c0c11744f6eb234
Author: Benjamin Otte <otte redhat com>
Date: Sun Jun 12 22:58:10 2011 +0200
themingengine: Reduce border to 0 on hidden sides
Fixes drawing of expanders.
gtk/gtkthemingengine.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index ae48b6d..76ebb9c 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1634,6 +1634,20 @@ gtk_theming_engine_render_background (GtkThemingEngine *engine,
}
static void
+gtk_theming_engine_hide_border_sides (GtkBorder *border,
+ guint hidden_side)
+{
+ if (hidden_side & SIDE_TOP)
+ border->top = 0;
+ if (hidden_side & SIDE_RIGHT)
+ border->right = 0;
+ if (hidden_side & SIDE_BOTTOM)
+ border->bottom = 0;
+ if (hidden_side & SIDE_LEFT)
+ border->left = 0;
+}
+
+static void
render_frame_internal (GtkThemingEngine *engine,
cairo_t *cr,
gdouble x,
@@ -1657,6 +1671,7 @@ render_frame_internal (GtkThemingEngine *engine,
gtk_theming_engine_get_border_color (engine, state, &border_color);
gtk_theming_engine_get_border (engine, state, &border);
+ gtk_theming_engine_hide_border_sides (&border, hidden_side);
gtk_theming_engine_get (engine, state,
"border-style", &border_style,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]