From f242fc5cd79808fb374ec3130a4e7b36f7acc83e Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Fri, 10 Nov 2017 23:20:02 -0500 Subject: [PATCH] Add setting to avoid shrinking pinned tabs --- qutebrowser/config/configdata.yml | 5 +++++ qutebrowser/mainwindow/tabwidget.py | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index e8581563b..21bc9140e 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1358,6 +1358,11 @@ tabs.indicator.padding: tabs.width.pinned: deleted: true +tabs.pinned.shrink: + default: true + type: Bool + desc: Shrink pinned tabs down to their contents. + tabs.wrap: default: true type: Bool diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index e80327238..409d825ec 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -565,8 +565,12 @@ class TabBar(QTabBar): # want to ensure it's valid in this special case. return QSize() else: - pinned = self._tab_pinned(index) - pinned_count, pinned_width = self._pinned_statistics() + if config.val.tabs.pinned.shrink: + pinned = self._tab_pinned(index) + pinned_count, pinned_width = self._pinned_statistics() + else: + pinned = False + pinned_count, pinned_width = (0, 0) no_pinned_count = self.count() - pinned_count no_pinned_width = self.width() - pinned_width