X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fmainwindow.py;h=c5e0183358b5900424a82b9f20a120d8d85e8631;hp=620b000f3f6a5d3d551eb4fe40497241033f487a;hb=ceec62613fb82f1a96fe18a6ed9d69dec50cd3c8;hpb=96d786458551cb101e9ccd046e98cd03e331345e diff --git a/sface/mainwindow.py b/sface/mainwindow.py index 620b000..c5e0183 100644 --- a/sface/mainwindow.py +++ b/sface/mainwindow.py @@ -13,8 +13,9 @@ from sface.screens.mainscreen import MainScreen from sface.screens.helpscreen import HelpScreen # depending on the platform.. +# could probably use Qt's resource system but looks overkill for just one file... def locate_image_file (filename): - for dir in [ '/usr/share' ] : + for dir in [ '/usr/share', '/Applications/sface.app/Contents/Resources/sface' ] : for suffix in ['png','jpg']: attempt=os.path.join(dir,'images',"%s.%s"%(filename,suffix)) if os.path.isfile(attempt) : return attempt @@ -27,7 +28,7 @@ class Nav(QWidget): self.title = QLabel("", self) scene=QGraphicsScene() - pixmap = QPixmap(locate_image_file('graphic-sfa.png')) + pixmap = QPixmap(locate_image_file('graphic-sfa64')) logolabel=QLabel("",self) logolabel.setPixmap(pixmap) self.main = QLabel("", self) @@ -43,7 +44,9 @@ class Nav(QWidget): hlayout.addWidget(logolabel) hlayout.addWidget(self.title) hlayout.addStretch() - hlayout.addWidget(QLabel("Go to: ", self)) + gotolabel=QLabel("Go to: ", self) + gotolabel.setAlignment(Qt.AlignRight) + hlayout.addWidget(gotolabel) hlayout.addWidget(self.main) hlayout.addWidget(self.config) hlayout.addWidget(self.help)