Show HdyViewSwitcherBar only on primary view

This commit is contained in:
Bleak Grey 2020-06-20 13:39:09 +03:00
parent 67c4a1f049
commit a3d8577206
1 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,8 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
[GtkChild]
protected Hdy.ViewSwitcherTitle timeline_switcher;
[GtkChild]
protected Hdy.ViewSwitcherBar switcher_navbar;
[GtkChild]
protected Widgets.AccountsButton accounts_button;
Views.Base? last_view = null;
@ -132,7 +134,7 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
void update_header () {
bool primary_mode = get_visible_id () == 0;
timeline_switcher.sensitive = primary_mode;
switcher_navbar.visible = timeline_switcher.sensitive = primary_mode;
timeline_switcher.opacity = primary_mode ? 1 : 0; //Prevent HeaderBar height jitter
compose_button.visible = primary_mode;
back_button.visible = !primary_mode;