summaryrefslogtreecommitdiff
path: root/gtk/gtklevelbar.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-04-23 17:48:29 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-06-05 20:35:09 +0100
commit6e52ef96a4f3c1812dc8d7ec8698608fbcb951e0 (patch)
tree7220442bebfc34f011bdc5821c289725fbdf8664 /gtk/gtklevelbar.c
parent9606c1eee9faaca7a7822ada3509b27fa98966e7 (diff)
downloadgtk+-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.c16
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;