Added permanent (count-independent) tab hide according to perm-hide variable.
This commit is contained in:
parent
3c21d5986e
commit
52afa1a479
@ -360,6 +360,10 @@ DATA = collections.OrderedDict([
|
||||
SettingValue(typ.Bool(), 'false'),
|
||||
"Hide the tabbar if only one tab is open."),
|
||||
|
||||
('perm-hide',
|
||||
SettingValue(typ.Bool(), 'false'),
|
||||
"Hide permanently."),
|
||||
|
||||
('wrap',
|
||||
SettingValue(typ.Bool(), 'true'),
|
||||
"Whether to wrap when changing tabs."),
|
||||
|
@ -106,7 +106,8 @@ class TabBar(QTabBar):
|
||||
def autohide(self):
|
||||
"""Auto-hide the tabbar if needed."""
|
||||
auto_hide = config.get('tabs', 'auto-hide')
|
||||
if auto_hide and self.count() == 1:
|
||||
perm_hide = config.get('tabs', 'perm-hide')
|
||||
if perm_hide or auto_hide and self.count() == 1:
|
||||
self.hide()
|
||||
else:
|
||||
self.show()
|
||||
|
Loading…
Reference in New Issue
Block a user