@@ -24,14 +24,32 @@ public class Tuba.Views.Main : Views.TabbedBase {
2424 // app.main_window.update_selected_home_item ();
2525 // }
2626
27+ private Gtk . Stack title_wrapper_stack;
28+ public bool title_wrapper_stack_visible {
29+ get {
30+ return title_wrapper_stack. visible_child_name == " title" ;
31+ }
32+ set {
33+ title_wrapper_stack. visible_child_name = (value ? " stack" : " title" );
34+ }
35+ }
36+
2737 private void bind () {
28- app. main_window . bind_property (" is-mobile" , search_button, " visible" , GLib . BindingFlags . SYNC_CREATE );
29- app. main_window . bind_property (" is-mobile" , switcher_bar, " visible" , GLib . BindingFlags . SYNC_CREATE );
30- app. main_window . bind_property (" is-mobile" , switcher , " visible" , GLib . BindingFlags . SYNC_CREATE );
38+ app. bind_property (" is-mobile" , search_button, " visible" , GLib . BindingFlags . SYNC_CREATE );
39+ app. bind_property (" is-mobile" , switcher_bar, " visible" , GLib . BindingFlags . SYNC_CREATE );
40+ app. bind_property (" is-mobile" , this , " title-wrapper-stack- visible" , GLib . BindingFlags . SYNC_CREATE );
3141 }
3242
3343 public override void build_header () {
3444 base . build_header ();
45+ header. title_widget = null ;
46+
47+ title_wrapper_stack = new Gtk .Stack ();
48+ title_wrapper_stack. add_named (title_stack, " stack" );
49+ var title_header = new Adw .WindowTitle (label, " " );
50+ bind_property (" label" , title_header, " title" , BindingFlags . SYNC_CREATE );
51+ title_wrapper_stack. add_named (title_header, " title" );
52+ header. title_widget = title_wrapper_stack;
3553
3654 search_button = new Gtk .Button () {
3755 icon_name = " tuba-loupe-large-symbolic" ,
@@ -44,14 +62,14 @@ public class Tuba.Views.Main : Views.TabbedBase {
4462 header.pack_start (sidebar_button );
4563 sidebar_button. icon_name = " tuba-dock-left-symbolic" ;
4664
65+ bind ();
4766 ulong main_window_notify = 0 ;
4867 main_window_notify = app.notify["main-window"].connect (() => {
4968 if (app. main_window == null ) {
5069 sidebar_button. hide ();
5170 return ;
5271 }
5372
54- bind ();
5573 app. main_window. split_view. bind_property (
5674 " collapsed" ,
5775 sidebar_button,
0 commit comments