summaryrefslogtreecommitdiff
path: root/gtk/gtkflowbox.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2014-05-02 02:05:49 +0200
committerCosimo Cecchi <cosimoc@gnome.org>2014-05-09 11:02:43 -0700
commit053b21cc1f0642d42169927f7a9aafa4e6fd8919 (patch)
treefe1884aba409b1b677832515ba213d270d3ef554 /gtk/gtkflowbox.c
parent241b4c0c75e78977be221399ae38669dc5fa1c0e (diff)
downloadgtk+-053b21cc1f0642d42169927f7a9aafa4e6fd8919.tar.gz
flowbox: don't use focus padding
Diffstat (limited to 'gtk/gtkflowbox.c')
-rw-r--r--gtk/gtkflowbox.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index e2cbc370a9..366b9ed2e5 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -342,7 +342,6 @@ gtk_flow_box_child_draw (GtkWidget *widget,
GtkStyleContext* context;
GtkStateFlags state;
GtkBorder border;
- gint focus_pad;
gtk_widget_get_allocation (widget, &allocation);
context = gtk_widget_get_style_context (widget);
@@ -354,13 +353,9 @@ gtk_flow_box_child_draw (GtkWidget *widget,
if (gtk_widget_has_visible_focus (widget))
{
gtk_style_context_get_border (context, state, &border);
-
- gtk_style_context_get_style (context,
- "focus-padding", &focus_pad,
- NULL);
- gtk_render_focus (context, cr, border.left + focus_pad, border.top + focus_pad,
- allocation.width - 2 * focus_pad - border.left - border.right,
- allocation.height - 2 * focus_pad - border.top - border.bottom);
+ gtk_render_focus (context, cr, border.left, border.top,
+ allocation.width - border.left - border.right,
+ allocation.height - border.top - border.bottom);
}
GTK_WIDGET_CLASS (gtk_flow_box_child_parent_class)->draw (widget, cr);
@@ -378,7 +373,7 @@ gtk_flow_box_child_get_full_border (GtkFlowBoxChild *child,
GtkStyleContext *context;
GtkStateFlags state;
GtkBorder padding, border;
- int focus_width, focus_pad;
+ int focus_width;
context = gtk_widget_get_style_context (widget);
state = gtk_style_context_get_state (context);
@@ -387,13 +382,12 @@ gtk_flow_box_child_get_full_border (GtkFlowBoxChild *child,
gtk_style_context_get_border (context, state, &border);
gtk_style_context_get_style (context,
"focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
NULL);
- full_border->left = padding.left + border.left + focus_width + focus_pad;
- full_border->right = padding.right + border.right + focus_width + focus_pad;
- full_border->top = padding.top + border.top + focus_width + focus_pad;
- full_border->bottom = padding.bottom + border.bottom + focus_width + focus_pad;
+ full_border->left = padding.left + border.left + focus_width;
+ full_border->right = padding.right + border.right + focus_width;
+ full_border->top = padding.top + border.top + focus_width;
+ full_border->bottom = padding.bottom + border.bottom + focus_width;
}
static GtkSizeRequestMode