Skip to content

Commit

Permalink
fix a thing
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce committed Jan 9, 2023
1 parent 1c21bcc commit 52a78ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/Widgets/NavigationRail.vala
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@

var button_child_label = new Gtk.Label ("");
this._stack_pages.get_item (position).bind_property ("title", button_child_label, "label", SYNC_CREATE);
if (button.active) {
this._stack_pages.select_item (position, true);
if (((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name.contains ("-symbolic")) {
((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name = ((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name.replace ("-filled","");
((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name = ((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name.replace ("-symbolic","-filled-symbolic");
} else {
((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name = ((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name.replace ("-filled","");
((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name = ((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name + "-filled-symbolic";
}
} else {
((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name = ((Gtk.StackPage)this._stack_pages.get_item (position)).icon_name.replace ("-filled","");
}

var button_child = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
button_child.append (button_child_image);
Expand Down

0 comments on commit 52a78ee

Please sign in to comment.