[gtk+] shortcutlabel: Use a label directly



commit 6a97b2563bbae4024d15e1439364601558fdea9c
Author: Timm Bäder <mail baedert org>
Date:   Sat Jan 9 17:15:29 2016 +0100

    shortcutlabel: Use a label directly
    
    We can everything we need without the frame around it now.

 gtk/gtkshortcutlabel.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c
index 5cb7f06..a62641a 100644
--- a/gtk/gtkshortcutlabel.c
+++ b/gtk/gtkshortcutlabel.c
@@ -248,26 +248,20 @@ display_shortcut (GtkContainer    *self,
   keys = get_labels (key, modifier, &n_mods);
   for (i = 0; keys[i]; i++)
     {
-      GtkWidget *frame;
       GtkWidget *disp;
 
       if (i > 0)
         gtk_container_add (self, dim_label ("+"));
 
-      frame = gtk_frame_new (NULL);
-      gtk_style_context_add_class (gtk_widget_get_style_context (frame), "keycap");
-      gtk_widget_show (frame);
-
-      gtk_container_add (self, frame);
-
+      disp = gtk_label_new (keys[i]);
       if (i < n_mods)
-        gtk_widget_set_size_request (frame, 50, -1);
+        gtk_widget_set_size_request (disp, 50, -1);
 
-      disp = gtk_label_new (keys[i]);
+      gtk_style_context_add_class (gtk_widget_get_style_context (disp), "keycap");
       gtk_label_set_use_markup (GTK_LABEL (disp), TRUE);
 
       gtk_widget_show (disp);
-      gtk_container_add (GTK_CONTAINER (frame), disp);
+      gtk_container_add (self, disp);
     }
   g_strfreev (keys);
 }


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