tab *-hide -> tab hide-*
This commit is contained in:
parent
335f72a93f
commit
ef5412f596
@ -209,6 +209,8 @@ class ConfigManager(QObject):
|
|||||||
('colors', 'tab.indicator.stop'): 'tabs.indicator.stop',
|
('colors', 'tab.indicator.stop'): 'tabs.indicator.stop',
|
||||||
('colors', 'tab.indicator.error'): 'tabs.indicator.error',
|
('colors', 'tab.indicator.error'): 'tabs.indicator.error',
|
||||||
('colors', 'tab.indicator.system'): 'tabs.indicator.system',
|
('colors', 'tab.indicator.system'): 'tabs.indicator.system',
|
||||||
|
('tabs', 'always-hide'): 'hide-always',
|
||||||
|
('tabs', 'auto-hide'): 'hide-auto',
|
||||||
}
|
}
|
||||||
DELETED_OPTIONS = [
|
DELETED_OPTIONS = [
|
||||||
('colors', 'tab.seperator'),
|
('colors', 'tab.seperator'),
|
||||||
|
@ -356,11 +356,11 @@ DATA = collections.OrderedDict([
|
|||||||
SettingValue(typ.LastClose(), 'ignore'),
|
SettingValue(typ.LastClose(), 'ignore'),
|
||||||
"Behaviour when the last tab is closed."),
|
"Behaviour when the last tab is closed."),
|
||||||
|
|
||||||
('auto-hide',
|
('hide-auto',
|
||||||
SettingValue(typ.Bool(), 'false'),
|
SettingValue(typ.Bool(), 'false'),
|
||||||
"Hide the tabbar if only one tab is open."),
|
"Hide the tabbar if only one tab is open."),
|
||||||
|
|
||||||
('always-hide',
|
('hide-always',
|
||||||
SettingValue(typ.Bool(), 'false'),
|
SettingValue(typ.Bool(), 'false'),
|
||||||
"Always hide the tabbar."),
|
"Always hide the tabbar."),
|
||||||
|
|
||||||
|
@ -102,12 +102,12 @@ class TabBar(QTabBar):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return utils.get_repr(self, count=self.count())
|
return utils.get_repr(self, count=self.count())
|
||||||
|
|
||||||
@config.change_filter('tabs', 'auto-hide')
|
@config.change_filter('tabs', 'hide-auto')
|
||||||
def autohide(self):
|
def autohide(self):
|
||||||
"""Auto-hide the tabbar if needed."""
|
"""Auto-hide the tabbar if needed."""
|
||||||
auto_hide = config.get('tabs', 'auto-hide')
|
hide_auto = config.get('tabs', 'hide-auto')
|
||||||
always_hide = config.get('tabs', 'always-hide')
|
hide_always = config.get('tabs', 'hide-always')
|
||||||
if always_hide or auto_hide and self.count() == 1:
|
if hide_always or hide_auto and self.count() == 1:
|
||||||
self.hide()
|
self.hide()
|
||||||
else:
|
else:
|
||||||
self.show()
|
self.show()
|
||||||
|
Loading…
Reference in New Issue
Block a user