summaryrefslogtreecommitdiff
path: root/gtk/gtkmodelbutton.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2014-05-02 02:08:47 +0200
committerCosimo Cecchi <cosimoc@gnome.org>2014-05-09 11:02:43 -0700
commit80981f5c9522be360e18de6669eb9e2097dcc3ee (patch)
treeee25ca8e9c7efb9b1a3f4631b5113d4f35f082b1 /gtk/gtkmodelbutton.c
parent053b21cc1f0642d42169927f7a9aafa4e6fd8919 (diff)
downloadgtk+-80981f5c9522be360e18de6669eb9e2097dcc3ee.tar.gz
modelbutton: don't use focus padding
Diffstat (limited to 'gtk/gtkmodelbutton.c')
-rw-r--r--gtk/gtkmodelbutton.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 5132262b78..291a50e78c 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -245,23 +245,22 @@ gtk_model_button_get_full_border (GtkModelButton *button,
GtkBorder *border,
gint *indicator)
{
- gint focus_width, focus_pad;
+ gint focus_width;
gint indicator_size, indicator_spacing;
gint border_width;
border_width = gtk_container_get_border_width (GTK_CONTAINER (button));
gtk_widget_style_get (GTK_WIDGET (button),
"focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
NULL);
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &indicator_size, NULL);
indicator_spacing = indicator_size / 8;
- border->left = border_width + focus_width + focus_pad;
- border->right = border_width + focus_width + focus_pad;
- border->top = border_width + focus_width + focus_pad;
- border->bottom = border_width + focus_width + focus_pad;
+ border->left = border_width + focus_width;
+ border->right = border_width + focus_width;
+ border->top = border_width + focus_width;
+ border->bottom = border_width + focus_width;
if (button->iconic)
*indicator = 0;
@@ -580,7 +579,7 @@ gtk_model_button_draw (GtkWidget *widget,
gint x, y;
gint width, height;
gint indicator_size, indicator_spacing;
- gint focus_width, focus_pad;
+ gint focus_width;
gint baseline;
state = get_button_state (model_button);
@@ -602,13 +601,12 @@ gtk_model_button_draw (GtkWidget *widget,
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
NULL);
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &indicator_size, NULL);
indicator_spacing = indicator_size / 8;
- x = width - border_width - focus_width - focus_pad - indicator_spacing - indicator_size;
+ x = width - border_width - focus_width - indicator_spacing - indicator_size;
if (indicator_is_left (widget))
x = width - (indicator_size + x);
@@ -658,10 +656,10 @@ gtk_model_button_draw (GtkWidget *widget,
gtk_style_context_get_border (context, state, &border);
gtk_render_focus (context, cr,
- border_width + border.left + focus_pad,
- border_width + border.top + focus_pad,
- width - 2 * (border_width + focus_pad) - border.left - border.right,
- height - 2 * (border_width + focus_pad) - border.top - border.bottom);
+ border_width + border.left,
+ border_width + border.top,
+ width - 2 * border_width - border.left - border.right,
+ height - 2 * border_width - border.top - border.bottom);
}
child = gtk_bin_get_child (GTK_BIN (widget));