Use QFontMetrics instead of QFontInfo.
This commit is contained in:
parent
e1c2250690
commit
58a9677af8
@ -309,7 +309,7 @@ class TabBar(QTabBar):
|
|||||||
def set_font(self):
|
def set_font(self):
|
||||||
"""Set the tab bar font."""
|
"""Set the tab bar font."""
|
||||||
self.setFont(config.get('fonts', 'tabbar'))
|
self.setFont(config.get('fonts', 'tabbar'))
|
||||||
size = self.fontInfo().pixelSize() - 1
|
size = self.fontMetrics().height() - 1
|
||||||
self.setIconSize(QSize(size, size))
|
self.setIconSize(QSize(size, size))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user