diff options
author | Timm Bäder <mail@baedert.org> | 2016-01-09 17:15:29 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2016-01-14 16:02:12 +0100 |
commit | 6a97b2563bbae4024d15e1439364601558fdea9c (patch) | |
tree | 2f354fc25e5f8a1bea7212ea4c712a8ad5236eda /gtk/gtkshortcutlabel.c | |
parent | 37bd22c3d9513708c6a04c113d43791ccd063ad6 (diff) | |
download | gtk+-6a97b2563bbae4024d15e1439364601558fdea9c.tar.gz |
shortcutlabel: Use a label directly
We can everything we need without the frame around it now.
Diffstat (limited to 'gtk/gtkshortcutlabel.c')
-rw-r--r-- | gtk/gtkshortcutlabel.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c index 5cb7f06c37..a62641a920 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); } |