[gnome-panel] applet-frame: do not add orientation style class
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] applet-frame: do not add orientation style class
- Date: Fri, 30 Apr 2021 22:54:20 +0000 (UTC)
commit 8a579ea7656d90ef4459ff9f76e185fac1e8fc56
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Apr 29 14:40:11 2021 +0300
applet-frame: do not add orientation style class
It is enough to have orientation class on toplevel.
gnome-panel/panel-applet-frame.c | 17 -----------------
1 file changed, 17 deletions(-)
---
diff --git a/gnome-panel/panel-applet-frame.c b/gnome-panel/panel-applet-frame.c
index 7b9321fdd..16f5ebf4d 100644
--- a/gnome-panel/panel-applet-frame.c
+++ b/gnome-panel/panel-applet-frame.c
@@ -619,16 +619,11 @@ panel_applet_frame_class_init (PanelAppletFrameClass *klass)
static void
panel_applet_frame_init (PanelAppletFrame *frame)
{
- GtkStyleContext *context;
-
frame->priv = panel_applet_frame_get_instance_private (frame);
frame->priv->panel = NULL;
frame->priv->orientation = PANEL_ORIENTATION_TOP;
frame->priv->applet_info = NULL;
-
- context = gtk_widget_get_style_context (GTK_WIDGET (frame));
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_HORIZONTAL);
}
static void
@@ -752,23 +747,11 @@ void
panel_applet_frame_change_orientation (PanelAppletFrame *frame,
PanelOrientation orientation)
{
- GtkStyleContext *context;
-
if (orientation == frame->priv->orientation)
return;
frame->priv->orientation = orientation;
- context = gtk_widget_get_style_context (GTK_WIDGET (frame));
- if (orientation & PANEL_HORIZONTAL_MASK) {
- 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_reset_style (GTK_WIDGET (frame));
-
frame_change_orientation (frame, orientation);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]