Fix ellipsis on pinned tabs with index > 10

See #3209
This commit is contained in:
Jay Kamat 2017-10-27 17:20:55 -04:00
parent 97d719b179
commit 2a4163b2c7
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -455,7 +455,7 @@ class TabBar(QTabBar):
"""
icon = self.tabIcon(index)
extent = self.style().pixelMetric(QStyle.PM_TabBarIconSize, None, self)
if not icon:
if icon.isNull():
icon_width = 0
else:
icon_width = icon.actualSize(QSize(extent, extent)).width()