summaryrefslogtreecommitdiff
path: root/gtk/gtklabel.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-08-16 06:53:03 +0200
committerTimm Bäder <mail@baedert.org>2018-11-13 16:28:54 +0100
commitade171a2ed1f868b13dd1f1cb221e6622b92e052 (patch)
tree19d911660e38043ee30b51e29548f7c9b72acdcc /gtk/gtklabel.c
parent1f1306a53b7c496ba0694544bde71265110fe4ed (diff)
downloadgtk+-ade171a2ed1f868b13dd1f1cb221e6622b92e052.tar.gz
widget: Don't pass a position to ->size_allocate
The values have been 0/0 for a long time now, so just drop the GtkAllocation argument and replace it with width and height.
Diffstat (limited to 'gtk/gtklabel.c')
-rw-r--r--gtk/gtklabel.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 967e4f46ab..7ca9ad7cf3 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -404,9 +404,10 @@ static void gtk_label_get_property (GObject *object,
GParamSpec *pspec);
static void gtk_label_finalize (GObject *object);
static void gtk_label_destroy (GtkWidget *widget);
-static void gtk_label_size_allocate (GtkWidget *widget,
- const GtkAllocation *allocation,
- int baseline);
+static void gtk_label_size_allocate (GtkWidget *widget,
+ int width,
+ int height,
+ int baseline);
static void gtk_label_state_flags_changed (GtkWidget *widget,
GtkStateFlags prev_state);
static void gtk_label_style_updated (GtkWidget *widget);
@@ -3649,9 +3650,10 @@ get_layout_location (GtkLabel *label,
}
static void
-gtk_label_size_allocate (GtkWidget *widget,
- const GtkAllocation *allocation,
- int baseline)
+gtk_label_size_allocate (GtkWidget *widget,
+ int width,
+ int height,
+ int baseline)
{
GtkLabel *label = GTK_LABEL (widget);
GtkLabelPrivate *priv = gtk_label_get_instance_private (label);
@@ -3659,8 +3661,7 @@ gtk_label_size_allocate (GtkWidget *widget,
if (priv->layout)
{
if (priv->ellipsize || priv->wrap)
- pango_layout_set_width (priv->layout,
- allocation->width * PANGO_SCALE);
+ pango_layout_set_width (priv->layout, width * PANGO_SCALE);
else
pango_layout_set_width (priv->layout, -1);
}