@@ -37,7 +37,7 @@ def get_argparser():
37
37
class MainWindow (QtWidgets .QMainWindow ):
38
38
def __init__ (self , server ):
39
39
QtWidgets .QMainWindow .__init__ (self )
40
- icon = QtGui .QIcon (os .path .join (artiq_dir , "gui" , "icon.png " ))
40
+ icon = QtGui .QIcon (os .path .join (artiq_dir , "gui" , "logo.svg " ))
41
41
self .setWindowIcon (icon )
42
42
self .setWindowTitle ("ARTIQ - {}" .format (server ))
43
43
self .exit_request = asyncio .Event ()
@@ -56,6 +56,19 @@ def restore_state(self, state):
56
56
self .restoreState (QtCore .QByteArray (state ["state" ]))
57
57
58
58
59
+ class MdiArea (QtWidgets .QMdiArea ):
60
+ def __init__ (self ):
61
+ QtWidgets .QMdiArea .__init__ (self )
62
+ self .pixmap = QtGui .QPixmap (os .path .join (artiq_dir , "gui" , "logo.svg" ))
63
+
64
+ def paintEvent (self , event ):
65
+ QtWidgets .QMdiArea .paintEvent (self , event )
66
+ painter = QtGui .QPainter (self .viewport ())
67
+ x = (self .width () - self .pixmap .width ())// 2
68
+ y = (self .height () - self .pixmap .height ())// 2
69
+ painter .drawPixmap (x , y , self .pixmap )
70
+
71
+
59
72
def main ():
60
73
# initialize application
61
74
args = get_argparser ().parse_args ()
@@ -93,7 +106,7 @@ def main():
93
106
status_bar = QtWidgets .QStatusBar ()
94
107
status_bar .showMessage ("Connected to {}" .format (args .server ))
95
108
main_window .setStatusBar (status_bar )
96
- mdi_area = QtWidgets . QMdiArea ()
109
+ mdi_area = MdiArea ()
97
110
mdi_area .setHorizontalScrollBarPolicy (QtCore .Qt .ScrollBarAsNeeded )
98
111
mdi_area .setVerticalScrollBarPolicy (QtCore .Qt .ScrollBarAsNeeded )
99
112
main_window .setCentralWidget (mdi_area )
0 commit comments