Redesign About dialog to show environment info
This commit is contained in:
parent
e30eb7d6fa
commit
19ec28a95e
@ -311,7 +311,7 @@ de = {
|
|||||||
#About dialog - TODO: Translate
|
#About dialog - TODO: Translate
|
||||||
"about-menu-label": u"&About Syncplay",
|
"about-menu-label": u"&About Syncplay",
|
||||||
"about-dialog-title": u"About Syncplay",
|
"about-dialog-title": u"About Syncplay",
|
||||||
"about-dialog-release": u"Version {} release {} on {}",
|
"about-dialog-release": u"Version {} release {}",
|
||||||
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
||||||
"about-dialog-license-button": u"License",
|
"about-dialog-license-button": u"License",
|
||||||
"about-dialog-dependencies": u"Dependencies",
|
"about-dialog-dependencies": u"Dependencies",
|
||||||
|
|||||||
@ -316,7 +316,7 @@ en = {
|
|||||||
#About dialog
|
#About dialog
|
||||||
"about-menu-label": u"&About Syncplay",
|
"about-menu-label": u"&About Syncplay",
|
||||||
"about-dialog-title": u"About Syncplay",
|
"about-dialog-title": u"About Syncplay",
|
||||||
"about-dialog-release": u"Version {} release {} on {}",
|
"about-dialog-release": u"Version {} release {}",
|
||||||
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
||||||
"about-dialog-license-button": u"License",
|
"about-dialog-license-button": u"License",
|
||||||
"about-dialog-dependencies": u"Dependencies",
|
"about-dialog-dependencies": u"Dependencies",
|
||||||
|
|||||||
@ -316,7 +316,7 @@ it = {
|
|||||||
#About dialog
|
#About dialog
|
||||||
"about-menu-label": u"&Informazioni su Syncplay",
|
"about-menu-label": u"&Informazioni su Syncplay",
|
||||||
"about-dialog-title": u"Informazioni su Syncplay",
|
"about-dialog-title": u"Informazioni su Syncplay",
|
||||||
"about-dialog-release": u"Versione {} release {} con {}",
|
"about-dialog-release": u"Versione {} release {}",
|
||||||
"about-dialog-license-text" : u"Rilasciato sotto Apache License, Version 2.0",
|
"about-dialog-license-text" : u"Rilasciato sotto Apache License, Version 2.0",
|
||||||
"about-dialog-license-button": u"Licenza",
|
"about-dialog-license-button": u"Licenza",
|
||||||
"about-dialog-dependencies": u"Dipendenze",
|
"about-dialog-dependencies": u"Dipendenze",
|
||||||
|
|||||||
@ -319,7 +319,7 @@ ru = {
|
|||||||
#About dialog - TODO: Translate
|
#About dialog - TODO: Translate
|
||||||
"about-menu-label": u"&About Syncplay",
|
"about-menu-label": u"&About Syncplay",
|
||||||
"about-dialog-title": u"About Syncplay",
|
"about-dialog-title": u"About Syncplay",
|
||||||
"about-dialog-release": u"Version {} release {} on {}",
|
"about-dialog-release": u"Version {} release {}",
|
||||||
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
||||||
"about-dialog-license-button": u"License",
|
"about-dialog-license-button": u"License",
|
||||||
"about-dialog-dependencies": u"Dependencies",
|
"about-dialog-dependencies": u"Dependencies",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
from syncplay.vendor import Qt
|
from syncplay.vendor import Qt
|
||||||
from syncplay.vendor.Qt import QtWidgets, QtGui, __binding__, __binding_version__, IsPySide, IsPySide2
|
from syncplay.vendor.Qt import QtWidgets, QtGui, __binding__, __binding_version__, __qt_version__, IsPySide, IsPySide2
|
||||||
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine, QDateTime
|
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine, QDateTime
|
||||||
|
from platform import python_version
|
||||||
if IsPySide2:
|
if IsPySide2:
|
||||||
from PySide2.QtCore import QStandardPaths
|
from PySide2.QtCore import QStandardPaths
|
||||||
from syncplay import utils, constants, version, release_number
|
from syncplay import utils, constants, version, release_number
|
||||||
@ -106,33 +107,35 @@ class AboutDialog(QtWidgets.QDialog):
|
|||||||
super(AboutDialog, self).__init__(parent)
|
super(AboutDialog, self).__init__(parent)
|
||||||
if isMacOS():
|
if isMacOS():
|
||||||
self.setWindowTitle("")
|
self.setWindowTitle("")
|
||||||
|
self.setWindowFlags(Qt.Dialog | Qt.WindowTitleHint | Qt.WindowCloseButtonHint | Qt.CustomizeWindowHint)
|
||||||
else:
|
else:
|
||||||
self.setWindowTitle(getMessage("about-dialog-title"))
|
self.setWindowTitle(getMessage("about-dialog-title"))
|
||||||
if isWindows():
|
if isWindows():
|
||||||
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)
|
||||||
nameLabel = QtWidgets.QLabel("<center><strong>Syncplay</strong></center>")
|
nameLabel = QtWidgets.QLabel("<center><strong>Syncplay</strong></center>")
|
||||||
nameLabel.setFont(QtGui.QFont("Helvetica", 20))
|
nameLabel.setFont(QtGui.QFont("Helvetica", 18))
|
||||||
linkLabel = QtWidgets.QLabel("<center><a href=\"https://syncplay.pl\">syncplay.pl</a></center>")
|
linkLabel = QtWidgets.QLabel("<center><a href=\"https://syncplay.pl\">syncplay.pl</a></center>")
|
||||||
linkLabel.setOpenExternalLinks(True)
|
linkLabel.setOpenExternalLinks(True)
|
||||||
versionLabel = QtWidgets.QLabel("<center>" + getMessage("about-dialog-release").format(version, release_number, __binding__) + "</center>")
|
versionLabel = QtWidgets.QLabel("<p><center>" + getMessage("about-dialog-release").format(version, release_number) + "<br />Python " + python_version() + " - " + __binding__ + " " + __binding_version__ + " - Qt " + __qt_version__ + "</center></p>")
|
||||||
licenseLabel = QtWidgets.QLabel("<center><p>Copyright © 2017 Syncplay</p><p>" + getMessage("about-dialog-license-text") + "</p></center>")
|
licenseLabel = QtWidgets.QLabel("<center><p>Copyright © 2012–2018 Syncplay</p><p>" + getMessage("about-dialog-license-text") + "</p></center>")
|
||||||
aboutIconPixmap = QtGui.QPixmap(resourcespath + u"syncplay.png")
|
aboutIconPixmap = QtGui.QPixmap(resourcespath + u"syncplay.png")
|
||||||
aboutIconLabel = QtWidgets.QLabel()
|
aboutIconLabel = QtWidgets.QLabel()
|
||||||
aboutIconLabel.setPixmap(aboutIconPixmap.scaled(120, 120, Qt.KeepAspectRatio))
|
aboutIconLabel.setPixmap(aboutIconPixmap.scaled(65, 65, Qt.KeepAspectRatio))
|
||||||
aboutLayout = QtWidgets.QGridLayout()
|
aboutLayout = QtWidgets.QGridLayout()
|
||||||
aboutLayout.addWidget(aboutIconLabel, 0, 0, 4, 2)
|
aboutLayout.addWidget(aboutIconLabel, 0, 0, 3, 4, Qt.AlignHCenter)
|
||||||
aboutLayout.addWidget(nameLabel, 0, 2, 1, 2)
|
aboutLayout.addWidget(nameLabel, 3, 0, 1, 4)
|
||||||
aboutLayout.addWidget(linkLabel, 1, 2, 1, 2)
|
aboutLayout.addWidget(linkLabel, 4, 0, 1, 4)
|
||||||
aboutLayout.addWidget(versionLabel, 2, 2, 1, 2)
|
aboutLayout.addWidget(versionLabel, 5, 0, 1, 4)
|
||||||
aboutLayout.addWidget(licenseLabel, 3, 2, 1, 2)
|
aboutLayout.addWidget(licenseLabel, 6, 0, 1, 4)
|
||||||
licenseButton = QtWidgets.QPushButton(getMessage("about-dialog-license-button"))
|
licenseButton = QtWidgets.QPushButton(getMessage("about-dialog-license-button"))
|
||||||
licenseButton.setAutoDefault(False)
|
licenseButton.setAutoDefault(False)
|
||||||
licenseButton.clicked.connect(self.openLicense)
|
licenseButton.clicked.connect(self.openLicense)
|
||||||
aboutLayout.addWidget(licenseButton, 4, 2)
|
aboutLayout.addWidget(licenseButton, 7, 0, 1, 2)
|
||||||
dependenciesButton = QtWidgets.QPushButton(getMessage("about-dialog-dependencies"))
|
dependenciesButton = QtWidgets.QPushButton(getMessage("about-dialog-dependencies"))
|
||||||
dependenciesButton.setAutoDefault(False)
|
dependenciesButton.setAutoDefault(False)
|
||||||
dependenciesButton.clicked.connect(self.openDependencies)
|
dependenciesButton.clicked.connect(self.openDependencies)
|
||||||
aboutLayout.addWidget(dependenciesButton, 4, 3)
|
aboutLayout.addWidget(dependenciesButton, 7, 2, 1, 2)
|
||||||
|
aboutLayout.setVerticalSpacing(10)
|
||||||
aboutLayout.setSizeConstraint(QtWidgets.QLayout.SetFixedSize)
|
aboutLayout.setSizeConstraint(QtWidgets.QLayout.SetFixedSize)
|
||||||
self.setSizeGripEnabled(False)
|
self.setSizeGripEnabled(False)
|
||||||
self.setLayout(aboutLayout)
|
self.setLayout(aboutLayout)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user