1
0
Fork 0
mirror of synced 2024-06-28 11:11:15 +12:00

MainTabBar: Set font proportionally to current size

This commit is contained in:
Stelios Tsampas 2021-12-04 17:15:35 +02:00
parent 75d46a6370
commit 1afd52da0d
No known key found for this signature in database
GPG key ID: 2FAEBF7B5BE5FD7C

View file

@ -1,5 +1,4 @@
from PyQt5.QtCore import QSize
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QTabBar, QToolButton
from qtawesome import icon
@ -9,7 +8,10 @@ class MainTabBar(QTabBar):
super(MainTabBar, self).__init__()
self._expanded = expanded
self.setObjectName("MainTabBar")
self.setFont(QFont("Arial", 13))
font = self.font()
font.setPointSize(font.pointSize()+2)
font.setBold(True)
self.setFont(font)
# self.setContentsMargins(0,10,0,10)
def tabSizeHint(self, index):