tabwidget: Fix ...-width in minimumTabSizeHint.

See #283.
This commit is contained in:
Florian Bruhin 2014-12-10 14:34:45 +01:00
parent 92b9dc08f4
commit ef12bde654

View File

@ -180,7 +180,7 @@ class TabBar(QTabBar):
indicator_width += config.get('tabs', 'indicator-space') indicator_width += config.get('tabs', 'indicator-space')
padding_width = self.style().pixelMetric(PM_TabBarPadding, None, self) padding_width = self.style().pixelMetric(PM_TabBarPadding, None, self)
height = self.fontMetrics().height() height = self.fontMetrics().height()
width = (self.fontMetrics().size(0, '\u2026').width() + width = (self.fontMetrics().width('\u2026') +
icon_size.width() + padding_count * padding_width + icon_size.width() + padding_count * padding_width +
indicator_width) indicator_width)
return QSize(width, height) return QSize(width, height)