[gnome-panel] widget: do not add orientation style class



commit 85b8124a3e59246ae73e26ae5ae7d903439c0bd3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Apr 29 14:45:50 2021 +0300

    widget: do not add orientation style class
    
    It is enough to have orientation class on toplevel.

 gnome-panel/panel-widget.c | 15 ---------------
 1 file changed, 15 deletions(-)
---
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index 2e4522971..f39212728 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -1591,7 +1591,6 @@ panel_widget_dispose (GObject *obj)
 static void
 panel_widget_init (PanelWidget *panel)
 {
-       GtkStyleContext *context;
        GtkWidget *widget = (GtkWidget *) panel;
 
        gtk_widget_set_events (
@@ -1609,9 +1608,6 @@ panel_widget_init (PanelWidget *panel)
        panel->applets_hints = NULL;
        panel->applets_using_hint = NULL;
 
-       context = gtk_widget_get_style_context (widget);
-       gtk_style_context_add_class (context, GTK_STYLE_CLASS_HORIZONTAL);
-
        panels = g_slist_append (panels, panel);
 }
 
@@ -2420,19 +2416,8 @@ void
 panel_widget_set_orientation (PanelWidget    *panel_widget,
                              GtkOrientation  orientation)
 {
-       GtkStyleContext *context;
-
        panel_widget->orient = orientation;
 
-       context = gtk_widget_get_style_context (GTK_WIDGET (panel_widget));
-       if (orientation == GTK_ORIENTATION_HORIZONTAL) {
-               gtk_style_context_add_class (context, GTK_STYLE_CLASS_HORIZONTAL);
-               gtk_style_context_remove_class (context, GTK_STYLE_CLASS_VERTICAL);
-       } else {
-               gtk_style_context_add_class (context, GTK_STYLE_CLASS_VERTICAL);
-               gtk_style_context_remove_class (context, GTK_STYLE_CLASS_HORIZONTAL);
-       }
-
        gtk_widget_queue_resize (GTK_WIDGET (panel_widget));
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]