Make min/max tab width configurable
This commit is contained in:
parent
7b2961f23e
commit
c3816b2820
@ -299,6 +299,14 @@ DATA = OrderedDict([
|
||||
('wrap',
|
||||
SettingValue(types.Bool(), 'true'),
|
||||
"Whether to wrap when changing tabs."),
|
||||
|
||||
('min-tab-width',
|
||||
SettingValue(types.Int(), '100'),
|
||||
"The minimum width of a tab."),
|
||||
|
||||
('max-tab-width',
|
||||
SettingValue(types.Int(), '200'),
|
||||
"The maximum width of a tab."),
|
||||
)),
|
||||
|
||||
('webkit', sect.KeyValue(
|
||||
|
@ -45,7 +45,8 @@ def get_stylesheet(template):
|
||||
_colordict = ColorDict(config.section('colors'))
|
||||
if _fontdict is None:
|
||||
_fontdict = FontDict(config.section('fonts'))
|
||||
return template.strip().format(color=_colordict, font=_fontdict)
|
||||
return template.strip().format(color=_colordict, font=_fontdict,
|
||||
config=config.instance())
|
||||
|
||||
|
||||
def set_register_stylesheet(obj):
|
||||
|
@ -49,8 +49,8 @@ class TabWidget(QTabWidget):
|
||||
{color[tab.fg]}
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-right: 2px solid {color[tab.seperator]};
|
||||
min-width: 100px;
|
||||
max-width: 200px;
|
||||
min-width: {config[tabbar][min-tab-width]}px;
|
||||
max-width: {config[tabbar][max-tab-width]}px;
|
||||
}}
|
||||
|
||||
QTabBar::tab:selected {{
|
||||
|
Loading…
Reference in New Issue
Block a user