summaryrefslogtreecommitdiff
path: root/gtk/gtkstatusbar.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2019-10-06 14:03:57 +0200
committerTimm Bäder <mail@baedert.org>2019-10-09 16:57:22 +0200
commit371c325ed1e35af94e9ef40d8242d851ca73ba52 (patch)
treef1f10d1d577843d2e0783f5f8262911d62b233a7 /gtk/gtkstatusbar.c
parent542b95e7e83e4657c433e75dd61c554e9526053c (diff)
downloadgtk+-371c325ed1e35af94e9ef40d8242d851ca73ba52.tar.gz
statusbar: Use a bin layout
Diffstat (limited to 'gtk/gtkstatusbar.c')
-rw-r--r--gtk/gtkstatusbar.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index c214015a73..cf140118e2 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -27,6 +27,7 @@
#include "gtkstatusbar.h"
+#include "gtkbinlayout.h"
#include "gtkframe.h"
#include "gtklabel.h"
#include "gtkmarshalers.h"
@@ -145,37 +146,6 @@ gtk_statusbar_dispose (GObject *object)
}
static void
-gtk_statusbar_measure (GtkWidget *widget,
- GtkOrientation orientation,
- int for_size,
- int *minimum,
- int *natural,
- int *minimum_baseline,
- int *natural_baseline)
-{
- GtkStatusbarPrivate *priv = gtk_statusbar_get_instance_private (GTK_STATUSBAR (widget));
-
- gtk_widget_measure (priv->frame, orientation, for_size,
- minimum, natural,
- minimum_baseline, natural_baseline);
-}
-
-static void
-gtk_statusbar_size_allocate (GtkWidget *widget,
- int width,
- int height,
- int baseline)
-{
- GtkStatusbarPrivate *priv = gtk_statusbar_get_instance_private (GTK_STATUSBAR (widget));
-
- gtk_widget_size_allocate (priv->frame,
- &(GtkAllocation) {
- 0, 0,
- width, height
- }, baseline);
-}
-
-static void
gtk_statusbar_class_init (GtkStatusbarClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
@@ -183,8 +153,6 @@ gtk_statusbar_class_init (GtkStatusbarClass *class)
object_class->dispose = gtk_statusbar_dispose;
- widget_class->measure = gtk_statusbar_measure;
- widget_class->size_allocate = gtk_statusbar_size_allocate;
widget_class->destroy = gtk_statusbar_destroy;
class->text_pushed = gtk_statusbar_update;
@@ -236,6 +204,7 @@ gtk_statusbar_class_init (GtkStatusbarClass *class)
gtk_widget_class_bind_template_child_private (widget_class, GtkStatusbar, label);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_STATUSBAR_ACCESSIBLE);
+ gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("statusbar"));
}