diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-04-23 17:48:29 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-06-05 20:35:09 +0100 |
commit | 6e52ef96a4f3c1812dc8d7ec8698608fbcb951e0 (patch) | |
tree | 7220442bebfc34f011bdc5821c289725fbdf8664 /gtk/gtklevelbar.c | |
parent | 9606c1eee9faaca7a7822ada3509b27fa98966e7 (diff) | |
download | gtk+-6e52ef96a4f3c1812dc8d7ec8698608fbcb951e0.tar.gz |
Move orientable style classes into GtkWidget
It feels slightly wrong to have GtkOrientable operate on widgets, but at
least what happens when an orientable widget changes orientation should
be part of GtkWidget.
This will allow to add more state changes without accessing widget state
from the outside of gtkwidget.c.
Diffstat (limited to 'gtk/gtklevelbar.c')
-rw-r--r-- | gtk/gtklevelbar.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index caafb489f4..d95dba0782 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -122,18 +122,16 @@ #include "gtkbinlayout.h" #include "gtkbuildable.h" #include "gtkbuilderprivate.h" +#include "gtkcssstylepropertyprivate.h" +#include "gtkcssnodeprivate.h" +#include "gtkgizmoprivate.h" #include "gtkintl.h" -#include "gtkorientableprivate.h" #include "gtklevelbar.h" #include "gtkmarshalers.h" -#include "gtkstylecontext.h" +#include "gtkorientable.h" +#include "gtkstylecontextprivate.h" #include "gtktypebuiltins.h" -#include "gtkwidget.h" #include "gtkwidgetprivate.h" -#include "gtkstylecontextprivate.h" -#include "gtkcssstylepropertyprivate.h" -#include "gtkcssnodeprivate.h" -#include "gtkgizmoprivate.h" #include <math.h> #include <stdlib.h> @@ -796,7 +794,7 @@ gtk_level_bar_set_orientation (GtkLevelBar *self, if (self->orientation != orientation) { self->orientation = orientation; - _gtk_orientable_set_style_classes (GTK_ORIENTABLE (self)); + gtk_widget_update_orientation (GTK_WIDGET (self), self->orientation); gtk_widget_queue_resize (GTK_WIDGET (self)); g_object_notify (G_OBJECT (self), "orientation"); } @@ -1012,7 +1010,7 @@ gtk_level_bar_init (GtkLevelBar *self) /* set initial orientation and style classes */ self->orientation = GTK_ORIENTATION_HORIZONTAL; - _gtk_orientable_set_style_classes (GTK_ORIENTABLE (self)); + gtk_widget_update_orientation (GTK_WIDGET (self), self->orientation); self->inverted = FALSE; |