summaryrefslogtreecommitdiff
path: root/gtk/gtkimage.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-05-27 13:04:34 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-05-27 13:04:34 -0400
commit7c83a71239a46451b2cbab12618827509a5fbc85 (patch)
tree5a8194d43ede39a84f8bb8d22ebb63ec5e7b30a7 /gtk/gtkimage.c
parentd9bdb9a1379864d3971b2658a70f02fe5b6f9dd7 (diff)
downloadgtk+-7c83a71239a46451b2cbab12618827509a5fbc85.tar.gz
Revert "More label and image sizing fixes"
This reverts commit 68c1e83cf0fd7432dbb151ff351ce225708e3ffb.
Diffstat (limited to 'gtk/gtkimage.c')
-rw-r--r--gtk/gtkimage.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 17482c3e11..115920b1f3 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -33,7 +33,6 @@
#include "gtkimageprivate.h"
#include "deprecated/gtkiconfactory.h"
#include "deprecated/gtkstock.h"
-#include "deprecated/gtkmisc.h"
#include "gtkicontheme.h"
#include "gtksizerequest.h"
#include "gtkintl.h"
@@ -1521,21 +1520,11 @@ gtk_image_get_padding_and_border (GtkImage *image,
GtkStyleContext *context;
GtkStateFlags state;
GtkBorder tmp;
- gint xpad, ypad;
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);
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- gtk_misc_get_padding (GTK_MISC (image), &xpad, &ypad);
- border->top += ypad;
- border->left += xpad;
- border->bottom += ypad;
- border->right += xpad;
-G_GNUC_END_IGNORE_DEPRECATIONS
-
gtk_style_context_get_border (context, state, &tmp);
border->top += tmp.top;
border->right += tmp.right;
@@ -1651,6 +1640,7 @@ gtk_image_draw (GtkWidget *widget,
GtkStyleContext *context;
gint x, y, width, height, baseline;
gfloat xalign, yalign;
+ GtkStateFlags state;
GtkBorder border;
g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE);
@@ -1659,6 +1649,8 @@ gtk_image_draw (GtkWidget *widget,
priv = image->priv;
context = gtk_widget_get_style_context (widget);
+ state = gtk_widget_get_state_flags (GTK_WIDGET (image));
+ gtk_style_context_get_border (context, state, &border);
gtk_render_background (context, cr,
0, 0,
@@ -1669,7 +1661,7 @@ gtk_image_draw (GtkWidget *widget,
xalign = halign_to_float (widget);
yalign = valign_to_float (widget);
- gtk_image_get_padding_and_border (image, &border);
+
gtk_image_get_preferred_size (image, &width, &height);
baseline = gtk_widget_get_allocated_baseline (widget);