diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 13ff2156b..163b879f0 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -231,7 +231,7 @@ |<>|How to behave when the close mouse button is pressed on the tab bar. |<>|Scaling factor for favicons in the tab bar. |<>|Show favicons in the tab bar. -|<>|Padding (in pixels) for tab indicators. +|<>|Padding (in pixels) for tab indicators. |<>|How to behave when the last tab is closed. |<>|Switch between tabs using the mouse wheel. |<>|Position of new tabs opened from another tab. @@ -245,8 +245,8 @@ |<>|Alignment of the text inside of tabs. |<>|Format to use for the tab title. |<>|Format to use for the tab title for pinned tabs. The same placeholders like for `tabs.title.format` are defined. -|<>|Width (in pixels or as percentage of the window) of the tab bar if it's vertical. -|<>|Width (in pixels) of the progress indicator (0 to disable). +|<>|Width (in pixels or as percentage of the window) of the tab bar if it's vertical. +|<>|Width (in pixels) of the progress indicator (0 to disable). |<>|Wrap when changing tabs. |<>|What search to start when something else than a URL is entered. |<>|Page to open if :open -t/-b/-w is used without URL. diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 1a9af49f6..64f8633cb 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1197,13 +1197,16 @@ tabs.favicons.show: desc: Show favicons in the tab bar. tabs.indicator_padding: + renamed: tabs.indicator.padding + +tabs.indicator.padding: default: top: 2 bottom: 2 left: 0 right: 4 type: Padding - desc: Padding (in pixels) for tab indicators. + desc: Padding for tab indicators tabs.last_close: default: ignore @@ -1330,6 +1333,9 @@ tabs.title.format_pinned: like for `tabs.title.format` are defined. tabs.width.bar: + renamed: tabs.width + +tabs.width: default: 20% type: name: PercOrInt @@ -1340,11 +1346,14 @@ tabs.width.bar: it's vertical." tabs.width.indicator: + renamed: tabs.indicator.width + +tabs.indicator.width: default: 3 type: name: Int minval: 0 - desc: Width (in pixels) of the progress indicator (0 to disable). + desc: Width of the progress indicator (0 to disable). tabs.width.pinned: deleted: true diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 4da38092e..e80327238 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -353,9 +353,9 @@ class TabBar(QTabBar): self.update() # Clear _minimum_tab_size_hint_helper cache when appropriate - if option in ["tabs.indicator_padding", + if option in ["tabs.indicator.padding", "tabs.padding", - "tabs.width.indicator"]: + "tabs.indicator.width"]: self._minimum_tab_size_hint_helper.cache_clear() def _on_show_switching_delay_changed(self): @@ -508,8 +508,8 @@ class TabBar(QTabBar): text_width = min(_text_to_width(text), _text_to_width(tab_text)) padding = config.val.tabs.padding - indicator_width = config.val.tabs.width.indicator - indicator_padding = config.val.tabs.indicator_padding + indicator_width = config.val.tabs.indicator.width + indicator_padding = config.val.tabs.indicator.padding padding_h = padding.left + padding.right # Only add padding if indicator exists if indicator_width != 0: @@ -550,7 +550,7 @@ class TabBar(QTabBar): minimum_size = self.minimumTabSizeHint(index) height = minimum_size.height() if self.vertical: - confwidth = str(config.val.tabs.width.bar) + confwidth = str(config.val.tabs.width) if confwidth.endswith('%'): main_window = objreg.get('main-window', scope='window', window=self._win_id) @@ -826,7 +826,7 @@ class TabBarStyle(QCommonStyle): A Layout object with two QRects. """ padding = config.val.tabs.padding - indicator_padding = config.val.tabs.indicator_padding + indicator_padding = config.val.tabs.indicator.padding text_rect = QRect(opt.rect) if not text_rect.isValid(): @@ -837,7 +837,7 @@ class TabBarStyle(QCommonStyle): text_rect.adjust(padding.left, padding.top, -padding.right, -padding.bottom) - indicator_width = config.val.tabs.width.indicator + indicator_width = config.val.tabs.indicator.width if indicator_width == 0: indicator_rect = QRect() else: