From 46533c336736bf57045c0e2d281fd75ea7c55279 Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Fri, 9 Mar 2018 02:02:31 -0500 Subject: [PATCH] Fix pinned tabs being too small in extreme situations --- qutebrowser/mainwindow/tabwidget.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 965e5b219..8261492a9 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -477,7 +477,7 @@ class TabBar(QTabBar): Args: index: The index of the tab to get a size hint for. ellipsis: Whether to use ellipsis to calculate width - instead of the tab's text. + instead of the tab's text. Forced to true for pinned tabs. Return: A QSize of the smallest tab size we can make. """ @@ -489,6 +489,11 @@ class TabBar(QTabBar): else: icon_width = min(icon.actualSize(self.iconSize()).width(), self.iconSize().width()) + icon_padding + + pinned = self._tab_pinned(index) + if pinned: + # Never consider ellipsis an option for pinned tabs + ellipsis = False return self._minimum_tab_size_hint_helper(self.tabText(index), icon_width, ellipsis)