Always show icons for pinned tabs
This commit is contained in:
parent
68fa381a3c
commit
cf5168c849
@ -350,6 +350,15 @@ class TabWidget(QTabWidget):
|
|||||||
if config.val.tabs.tabs_are_windows:
|
if config.val.tabs.tabs_are_windows:
|
||||||
self.window().setWindowIcon(self.window().windowIcon())
|
self.window().setWindowIcon(self.window().windowIcon())
|
||||||
|
|
||||||
|
def setTabIcon(self, idx: int, icon: QIcon):
|
||||||
|
"""Add overrides for setting tab icon sometimes when it is empty."""
|
||||||
|
tab = self.widget(idx)
|
||||||
|
if (icon.isNull() and
|
||||||
|
config.cache['tabs.favicons.show'] != 'never' and
|
||||||
|
tab is not None and tab.data.pinned):
|
||||||
|
icon = self.style().standardIcon(QStyle.SP_FileIcon)
|
||||||
|
super().setTabIcon(idx, icon)
|
||||||
|
|
||||||
|
|
||||||
class TabBar(QTabBar):
|
class TabBar(QTabBar):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user