diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index f2fe79a1d..adbcdfa90 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1411,11 +1411,14 @@ tabs.min_width: type: name: Int minval: -1 + maxval: maxint desc: >- - Minimum width (in pixels) of tabs (-1 to use text contents for min width). + Minimum width (in pixels) of tabs (-1 to use min text contents size for min width). This setting only applies when tabs are horizontal. + This setting does not apply to pinned tabs, unless `tabs.pinned.shrink` is False. + tabs.width.indicator: renamed: tabs.indicator.width diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 6605380be..5274ee768 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -359,7 +359,8 @@ class TabBar(QTabBar): if option in ["tabs.indicator.padding", "tabs.padding", "tabs.indicator.width", - "tabs.min_width"]: + "tabs.min_width", + "tabs.pinned.shrink"]: self._minimum_tab_size_hint_helper.cache_clear() def _on_show_switching_delay_changed(self): @@ -529,7 +530,8 @@ class TabBar(QTabBar): width = (text_width + icon_width + padding_h + indicator_width) min_width = config.val.tabs.min_width - if not pinned and not self.vertical and min_width > 0: + if (not self.vertical and min_width > 0 and + not pinned or not config.val.tabs.pinned.shrink): width = max(min_width, width) return QSize(width, height)