summaryrefslogtreecommitdiff
path: root/gtk/gtkimage.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-05-27 13:04:43 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-05-27 13:04:43 -0400
commit6ce2a8fb138fd73ecd1a87c5c5506dd07496e032 (patch)
treed3751a9127d6a1d0ca5f2cd3cf2beeff9b58a25e /gtk/gtkimage.c
parent7c83a71239a46451b2cbab12618827509a5fbc85 (diff)
downloadgtk+-6ce2a8fb138fd73ecd1a87c5c5506dd07496e032.tar.gz
Revert "Fix up GtkLabel and GtkImage sizing"
This reverts commit 3b30cfa344ebc035ae7318dda5cfa11b8ab3aee7.
Diffstat (limited to 'gtk/gtkimage.c')
-rw-r--r--gtk/gtkimage.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 115920b1f3..f806cc96a7 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1514,25 +1514,6 @@ get_animation_frame (GtkImage *image)
}
static void
-gtk_image_get_padding_and_border (GtkImage *image,
- GtkBorder *border)
-{
- GtkStyleContext *context;
- GtkStateFlags state;
- GtkBorder tmp;
-
- context = gtk_widget_get_style_context (GTK_WIDGET (image));
- state = gtk_widget_get_state_flags (GTK_WIDGET (image));
-
- gtk_style_context_get_padding (context, state, border);
- gtk_style_context_get_border (context, state, &tmp);
- border->top += tmp.top;
- border->right += tmp.right;
- border->bottom += tmp.bottom;
- border->left += tmp.left;
-}
-
-static void
gtk_image_get_preferred_size (GtkImage *image,
gint *width_out,
gint *height_out)
@@ -1541,9 +1522,11 @@ gtk_image_get_preferred_size (GtkImage *image,
gint width, height;
GtkBorder border;
GtkStyleContext *context;
+ GtkStateFlags state;
context = gtk_widget_get_style_context (GTK_WIDGET (image));
- gtk_image_get_padding_and_border (image, &border);
+ state = gtk_widget_get_state_flags (GTK_WIDGET (image));
+ gtk_style_context_get_border (context, state, &border);
_gtk_icon_helper_get_size (priv->icon_helper, context, &width, &height);
width += border.left + border.right;