Adjust the tabWidget font size relative to the base app font
This commit is contained in:
parent
ec1b05ee90
commit
0ccbf6832f
|
@ -61,7 +61,8 @@ class Ui_MainWindow(object):
|
||||||
self.tabWidget.setMinimumSize(QtCore.QSize(0, 0))
|
self.tabWidget.setMinimumSize(QtCore.QSize(0, 0))
|
||||||
self.tabWidget.setBaseSize(QtCore.QSize(0, 0))
|
self.tabWidget.setBaseSize(QtCore.QSize(0, 0))
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(9)
|
base_size = QtGui.QApplication.instance().font().pointSize()
|
||||||
|
font.setPointSize(int(base_size * 0.75))
|
||||||
self.tabWidget.setFont(font)
|
self.tabWidget.setFont(font)
|
||||||
self.tabWidget.setTabPosition(QtGui.QTabWidget.North)
|
self.tabWidget.setTabPosition(QtGui.QTabWidget.North)
|
||||||
self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded)
|
self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded)
|
||||||
|
|
Reference in New Issue
Block a user