Add About window on macOS
This commit is contained in:
parent
89b4df7a4a
commit
1db4d7adfc
@ -409,7 +409,7 @@ class ConfigurationGetter(object):
|
|||||||
qt5reactor.install()
|
qt5reactor.install()
|
||||||
if sys.platform.startswith('darwin'):
|
if sys.platform.startswith('darwin'):
|
||||||
import appnope
|
import appnope
|
||||||
appnope.nope()
|
appnope.nope()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print getMessage("unable-import-gui-error")
|
print getMessage("unable-import-gui-error")
|
||||||
self._config['noGui'] = True
|
self._config['noGui'] = True
|
||||||
|
|||||||
@ -1358,8 +1358,15 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
window.mainLayout.setMenuBar(window.menuBar)
|
window.mainLayout.setMenuBar(window.menuBar)
|
||||||
|
|
||||||
def openAbout(self):
|
def openAbout(self):
|
||||||
AboutMsgBox = QtGui.QMessageBox.about(self,"Syncplay","Syncplay v" + version)
|
#AboutMsgBox = QtWidgets.QMessageBox.about(self,"Syncplay","Syncplay v" + version)
|
||||||
|
AboutMsgBox = QtWidgets.QMessageBox(self)
|
||||||
|
AboutMsgBox.setText("<center>Syncplay<br><small><a href=\"http://syncplay.pl\">syncplay.pl</a></center>")
|
||||||
|
AboutMsgBox.setInformativeText("<center>Version v" + version + "<p>Copyright © 2017 Syncplay</p><p>Licensed under the Apache License, Version 2.0</p></center>")
|
||||||
|
AboutIcon = QtGui.QPixmap(self.resourcespath + u"syncplay.png")
|
||||||
|
AboutMsgBox.setIconPixmap(AboutIcon.scaled(120, 120))
|
||||||
|
AboutMsgBox.setModal(True)
|
||||||
|
AboutMsgBox.exec_()
|
||||||
|
|
||||||
def addMainFrame(self, window):
|
def addMainFrame(self, window):
|
||||||
window.mainFrame = QtWidgets.QFrame()
|
window.mainFrame = QtWidgets.QFrame()
|
||||||
window.mainFrame.setLineWidth(0)
|
window.mainFrame.setLineWidth(0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user