summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-06-27 17:12:00 +0200
committerTimm Bäder <mail@baedert.org>2017-06-28 13:21:00 +0200
commita9dc2a79d21f3c18f09b4d13ab06e0d94923305c (patch)
treea81328b3e7baf3aae3df60260852cc71e758c2bb
parentc09ffed929cfb6a8546b1e33e4e60b66e9f66d34 (diff)
downloadgtk+-a9dc2a79d21f3c18f09b4d13ab06e0d94923305c.tar.gz
label: Use the correct size in snapshot()
-rw-r--r--gtk/gtklabel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index aaf7edf0ba..be2249b340 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3905,7 +3905,6 @@ gtk_label_snapshot (GtkWidget *widget,
GtkLabelSelectionInfo *info;
GtkStyleContext *context;
gint lx, ly;
- GtkAllocation allocation;
int width, height, x;
label = GTK_LABEL (widget);
@@ -3916,10 +3915,8 @@ gtk_label_snapshot (GtkWidget *widget,
context = _gtk_widget_get_style_context (widget);
- gtk_widget_get_allocation (widget, &allocation);
+ gtk_widget_get_content_size (widget, &width, &height);
x = 0;
- width = allocation.width;
- height = allocation.height;
if (priv->text && (*priv->text != '\0'))
{