[gtk+/wip/baedert/drawing: 5/142] frame: Fix copy&paste bug in shadow-type handling



commit 6ca851f5a97c3cc3fc171b9a7f6d87b158300aeb
Author: Timm Bäder <mail baedert org>
Date:   Fri May 5 11:51:06 2017 +0200

    frame: Fix copy&paste bug in shadow-type handling
    
    If the given shadow_type is none NONE, we have to remove the .flat style
    class of course, not add it.

 gtk/gtkframe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 28c12a5..2779900 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -586,8 +586,8 @@ gtk_frame_set_shadow_type (GtkFrame      *frame,
         gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (frame)),
                                      GTK_STYLE_CLASS_FLAT);
       else
-        gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (frame)),
-                                     GTK_STYLE_CLASS_FLAT);
+        gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (frame)),
+                                        GTK_STYLE_CLASS_FLAT);
 
       g_object_notify_by_pspec (G_OBJECT (frame), frame_props[PROP_SHADOW_TYPE]);
     }


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