diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2015-02-19 14:57:35 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-10-27 17:02:38 +0100 |
commit | bedfb6dadf87ce5f5eee84c706c0246901f755c8 (patch) | |
tree | 5b084d0d28b1cf06fcd075a3b53f9da5c8cf89a1 /src/toggle-box.vala | |
parent | 4bfa70ab27d3bdd524e9ec97f914c918cd2f4729 (diff) | |
download | arctica-greeter-bedfb6dadf87ce5f5eee84c706c0246901f755c8.tar.gz arctica-greeter-bedfb6dadf87ce5f5eee84c706c0246901f755c8.tar.bz2 arctica-greeter-bedfb6dadf87ce5f5eee84c706c0246901f755c8.zip |
Add class name for toggle button
Ported to ArcticaGreeter: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'src/toggle-box.vala')
-rw-r--r-- | src/toggle-box.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/toggle-box.vala b/src/toggle-box.vala index f93cdea..f1ef8b3 100644 --- a/src/toggle-box.vala +++ b/src/toggle-box.vala @@ -66,15 +66,20 @@ public class ToggleBox : Gtk.Box private void select (Gtk.Button button) { if (selected_button != null) + { selected_button.relief = Gtk.ReliefStyle.NONE; + selected_button.get_style_context ().remove_class ("selected"); + } selected_button = button; selected_button.relief = Gtk.ReliefStyle.NORMAL; + selected_button.get_style_context ().add_class ("selected"); selected_key = selected_button.get_data<string> ("toggle-list-key"); } private Gtk.Button make_button (string key, string name_in, Gdk.Pixbuf? icon) { var item = new FlatButton (); + item.get_style_context ().add_class ("toggle-button"); item.relief = Gtk.ReliefStyle.NONE; item.clicked.connect (button_clicked_cb); |