Skip to content

Commit

Permalink
dashboard: compute initial experiment window size from font metrics
Browse files Browse the repository at this point in the history
sbourdeauducq committed Jun 19, 2016
1 parent ae914d2 commit b3b0e19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion artiq/dashboard/experiments.py
Original file line number Diff line number Diff line change
@@ -200,7 +200,8 @@ class _ExperimentDock(QtWidgets.QMdiSubWindow):

def __init__(self, manager, expurl):
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.setWindowIcon(QtWidgets.QApplication.style().standardIcon(
QtWidgets.QStyle.SP_FileDialogContentsView))

0 comments on commit b3b0e19

Please sign in to comment.