About dialog: attempt Hi-DPI scaling of the logo

This commit is contained in:
Alberto Sottile 2019-05-06 18:26:22 +02:00 committed by albertosottile
parent fbe9f3a9ac
commit 819e6b6cae
4 changed files with 5 additions and 3 deletions

View File

@ -688,7 +688,8 @@ guiIcons = [
'resources/shield_edit.png',
'resources/shield_add.png',
'resources/email_go.png',
'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng'
'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng',
'resources/syncplayAbout.png', 'resources/syncplayAbout@2x.png'
]
guiIcons = ['syncplay/' + s for s in guiIcons]

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -137,9 +137,10 @@ class AboutDialog(QtWidgets.QDialog):
licenseLabel = QtWidgets.QLabel(
"<center><p>Copyright &copy; 2012&ndash;2019 Syncplay</p><p>" +
getMessage("about-dialog-license-text") + "</p></center>")
aboutIconPixmap = QtGui.QPixmap(resourcespath + "syncplay.png")
aboutIcon = QtGui.QIcon()
aboutIcon.addFile(resourcespath + "syncplayAbout.png")
aboutIconLabel = QtWidgets.QLabel()
aboutIconLabel.setPixmap(aboutIconPixmap.scaled(65, 65, Qt.KeepAspectRatio))
aboutIconLabel.setPixmap(aboutIcon.pixmap(64, 64))
aboutLayout = QtWidgets.QGridLayout()
aboutLayout.addWidget(aboutIconLabel, 0, 0, 3, 4, Qt.AlignHCenter)
aboutLayout.addWidget(nameLabel, 3, 0, 1, 4)