startTLS: set lock button appearance on macOS

This commit is contained in:
Alberto Sottile 2019-02-15 15:17:57 +01:00
parent 466e8533d6
commit 3695c31ec7

View File

@ -1250,6 +1250,14 @@ class MainWindow(QtWidgets.QMainWindow):
self.listTreeView.customContextMenuRequested.connect(self.openRoomMenu) self.listTreeView.customContextMenuRequested.connect(self.openRoomMenu)
window.listlabel = QtWidgets.QLabel(getMessage("userlist-heading-label")) window.listlabel = QtWidgets.QLabel(getMessage("userlist-heading-label"))
window.listlabel.setMinimumHeight(27) window.listlabel.setMinimumHeight(27)
if isMacOS:
window.sslButton = QtWidgets.QPushButton(QtGui.QPixmap(resourcespath + 'green_lock.png').scaled(14, 14),"")
window.sslButton.setVisible(False)
window.sslButton.setFixedHeight(21)
window.sslButton.setFixedWidth(21)
window.sslButton.setMinimumSize(21, 21)
window.sslButton.setStyleSheet("QPushButton:!hover{border: 1px solid gray;} QPushButton:hover{border:2px solid black;}")
else:
window.sslButton = QtWidgets.QPushButton(QtGui.QPixmap(resourcespath + 'green_lock.png'),"") window.sslButton = QtWidgets.QPushButton(QtGui.QPixmap(resourcespath + 'green_lock.png'),"")
window.sslButton.setVisible(False) window.sslButton.setVisible(False)
window.sslButton.setFixedHeight(27) window.sslButton.setFixedHeight(27)
@ -1532,11 +1540,12 @@ class MainWindow(QtWidgets.QMainWindow):
@needsClient @needsClient
def openSSLDetails(self): def openSSLDetails(self):
QtWidgets.QMessageBox.information( boxReturn = QtWidgets.QMessageBox.information(
self, self,
getMessage("ssl-information-title"), getMessage("ssl-information-title"),
"[{}]\n{}".format(getMessage("ssl-information-title"),self.getSSLInformation()) "[{}]\n{}".format(getMessage("ssl-information-title"),self.getSSLInformation())
) )
if(boxReturn): self.sslButton.setDown(False)
def openAbout(self): def openAbout(self):