mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 13:10:08 +00:00
statusbar: Use a bin layout
This commit is contained in:
parent
542b95e7e8
commit
371c325ed1
@ -27,6 +27,7 @@
|
||||
|
||||
#include "gtkstatusbar.h"
|
||||
|
||||
#include "gtkbinlayout.h"
|
||||
#include "gtkframe.h"
|
||||
#include "gtklabel.h"
|
||||
#include "gtkmarshalers.h"
|
||||
@ -144,37 +145,6 @@ gtk_statusbar_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (gtk_statusbar_parent_class)->dispose (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)
|
||||
{
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user