From 6ee9be189f704e133def6c8157ff41bfaf3253db Mon Sep 17 00:00:00 2001 From: Boris Nazaroff <7961527+BorisNA@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:01:06 +0300 Subject: [PATCH] Bring back autohide feature Bring back autohide feature from #832 --- src/Widgets/TerminalView.vala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Widgets/TerminalView.vala b/src/Widgets/TerminalView.vala index 16d129e8f4..cdd7614745 100644 --- a/src/Widgets/TerminalView.vala +++ b/src/Widgets/TerminalView.vala @@ -10,6 +10,12 @@ public class Terminal.TerminalView : Gtk.Box { URI_LIST } + public enum TabBarBehavior { + ALWAYS = 0, + SINGLE = 1, + NEVER = 2 + } + public signal void new_tab_requested (); public signal void tab_duplicated (Hdy.TabPage page); @@ -71,8 +77,9 @@ public class Terminal.TerminalView : Gtk.Box { use_popover = false, }; + var tab_bar_behavior = (TabBarBehavior)Application.settings.get_enum ("tab-bar-behavior"); tab_bar = new Hdy.TabBar () { - autohide = false, + autohide = (tab_bar_behavior == TabBarBehavior.SINGLE), // This is expand_tabs = false, inverted = true, start_action_widget = new_tab_button,