forked from M-Labs/artiq
dashboard: compute initial experiment window size from font metrics
This commit is contained in:
parent
ae914d2611
commit
b3b0e19d21
|
@ -200,7 +200,8 @@ class _ExperimentDock(QtWidgets.QMdiSubWindow):
|
||||||
|
|
||||||
def __init__(self, manager, expurl):
|
def __init__(self, manager, expurl):
|
||||||
QtWidgets.QMdiSubWindow.__init__(self)
|
QtWidgets.QMdiSubWindow.__init__(self)
|
||||||
self.resize(800, 600)
|
qfm = QtGui.QFontMetrics(self.font())
|
||||||
|
self.resize(90*qfm.averageCharWidth(), 30*qfm.lineSpacing())
|
||||||
self.setWindowTitle(expurl)
|
self.setWindowTitle(expurl)
|
||||||
self.setWindowIcon(QtWidgets.QApplication.style().standardIcon(
|
self.setWindowIcon(QtWidgets.QApplication.style().standardIcon(
|
||||||
QtWidgets.QStyle.SP_FileDialogContentsView))
|
QtWidgets.QStyle.SP_FileDialogContentsView))
|
||||||
|
|
Loading…
Reference in New Issue