diff --git a/src/View/Sidebar/SidebarWindow.vala b/src/View/Sidebar/SidebarWindow.vala index 40d783095..84f383799 100644 --- a/src/View/Sidebar/SidebarWindow.vala +++ b/src/View/Sidebar/SidebarWindow.vala @@ -7,6 +7,7 @@ public class Sidebar.SidebarWindow : Gtk.Box, Files.SidebarInterface { + public Hdy.HeaderBar headerbar; private Gtk.ScrolledWindow scrolled_window; private BookmarkListBox bookmark_listbox; private DeviceListBox device_listbox; @@ -23,6 +24,15 @@ public class Sidebar.SidebarWindow : Gtk.Box, Files.SidebarInterface { } construct { + orientation = Gtk.Orientation.VERTICAL; + get_style_context ().add_class (Gtk.STYLE_CLASS_SIDEBAR); + + headerbar = new Hdy.HeaderBar () { + show_close_button = true + }; + headerbar.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT); + add (headerbar); + bookmark_listbox = new BookmarkListBox (this); device_listbox = new DeviceListBox (this); network_listbox = new NetworkListBox (this); diff --git a/src/View/Window.vala b/src/View/Window.vala index 2c9eaddf0..3111e407b 100644 --- a/src/View/Window.vala +++ b/src/View/Window.vala @@ -87,7 +87,7 @@ public class Files.View.Window : Hdy.ApplicationWindow { public Hdy.TabView tab_view; public Hdy.TabBar tab_bar; private Gtk.Paned lside_pane; - public SidebarInterface sidebar; + public Sidebar.SidebarWindow sidebar; private Chrome.ButtonWithMenu button_forward; private Chrome.ButtonWithMenu button_back; private Chrome.LocationBar? location_bar; @@ -217,7 +217,7 @@ public class Files.View.Window : Hdy.ApplicationWindow { }; headerbar = new Hdy.HeaderBar () { - show_close_button = false, + show_close_button = true, custom_title = new Gtk.Label (null) }; headerbar.pack_start (button_back); @@ -274,6 +274,10 @@ public class Files.View.Window : Hdy.ApplicationWindow { lside_pane.show_all (); add (lside_pane); + var header_group = new Hdy.HeaderGroup (); + header_group.add_header_bar (sidebar.headerbar); + header_group.add_header_bar (headerbar); + /** Apply preferences */ var prefs = Files.Preferences.get_default (); // Bound to settings schema by Application get_action ("show-hidden").set_state (prefs.show_hidden_files);