Skip to content

Commit

Permalink
Bring back autohide feature
Browse files Browse the repository at this point in the history
Bring back autohide feature from elementary#832
  • Loading branch information
BorisNA committed Dec 23, 2024
1 parent b6ef92a commit 6ee9be1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Widgets/TerminalView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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 <value value="1" nick="Hide When Single Tab"/>
expand_tabs = false,
inverted = true,
start_action_widget = new_tab_button,
Expand Down

0 comments on commit 6ee9be1

Please sign in to comment.