From 4d8aa75c8b4f2eda4c67767a35842430670f09cd Mon Sep 17 00:00:00 2001 From: "Nicholas H.Tollervey" Date: Mon, 10 Feb 2020 14:12:24 +0000 Subject: [PATCH 1/2] Update login screen to latest design. --- securedrop_client/gui/widgets.py | 9 +- .../resources/images/login_bg.svg | 270 +++++++++++++----- 2 files changed, 205 insertions(+), 74 deletions(-) diff --git a/securedrop_client/gui/widgets.py b/securedrop_client/gui/widgets.py index 1eb7e40ff..62797c0b6 100644 --- a/securedrop_client/gui/widgets.py +++ b/securedrop_client/gui/widgets.py @@ -33,6 +33,7 @@ QToolButton, QSizePolicy, QPlainTextEdit, QStatusBar, QGraphicsDropShadowEffect, QPushButton, \ QDialogButtonBox +from securedrop_client import __version__ as sd_version from securedrop_client.db import DraftReply, Source, Message, File, Reply, User from securedrop_client.storage import source_exists from securedrop_client.export import ExportStatus, ExportError @@ -1378,6 +1379,7 @@ class LoginDialog(QDialog): border-radius: 0px; height: 30px; margin: 0px 0px 0px 0px; + padding-left: 5px; } ''' @@ -1459,6 +1461,10 @@ def __init__(self, parent): application_version = QWidget() application_version_layout = QHBoxLayout() application_version.setLayout(application_version_layout) + application_version_label = QLabel(_("Workstation app v") + sd_version) + application_version_label.setAlignment(Qt.AlignHCenter) + application_version_label.setStyleSheet("QLabel {color: #2A319D;}") + application_version_layout.addWidget(application_version_label) # Add widgets layout.addWidget(self.error_bar) @@ -1507,6 +1513,7 @@ def error(self, message): Ensures the passed in message is displayed as an error message. """ self.setDisabled(False) + self.submit.setText(_("SIGN IN")) self.error_bar.set_message(html.escape(message)) def validate(self): @@ -1541,7 +1548,7 @@ def validate(self): self.setDisabled(False) self.error(_('Please use only numerals for the two-factor code.')) return - + self.submit.setText(_("SIGNING IN")) self.controller.login(username, password, tfa_token) else: self.setDisabled(False) diff --git a/securedrop_client/resources/images/login_bg.svg b/securedrop_client/resources/images/login_bg.svg index d21b05d84..e3dfec345 100644 --- a/securedrop_client/resources/images/login_bg.svg +++ b/securedrop_client/resources/images/login_bg.svg @@ -1,75 +1,199 @@ - - - ••• HuzzahAlt - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + image/svg+xml + + LoginBasse + + + + + + LoginBasse + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + + From 1f7b49a949209d4a744038879c7be8725fc90eea Mon Sep 17 00:00:00 2001 From: "Nicholas H.Tollervey" Date: Tue, 3 Mar 2020 16:39:41 +0000 Subject: [PATCH 2/2] Fixes login screen background issue. Adjust version colour to originally specified. --- securedrop_client/gui/widgets.py | 2 +- .../resources/images/login_bg.svg | 232 ++++-------------- 2 files changed, 45 insertions(+), 189 deletions(-) diff --git a/securedrop_client/gui/widgets.py b/securedrop_client/gui/widgets.py index 62797c0b6..22028711c 100644 --- a/securedrop_client/gui/widgets.py +++ b/securedrop_client/gui/widgets.py @@ -1463,7 +1463,7 @@ def __init__(self, parent): application_version.setLayout(application_version_layout) application_version_label = QLabel(_("Workstation app v") + sd_version) application_version_label.setAlignment(Qt.AlignHCenter) - application_version_label.setStyleSheet("QLabel {color: #2A319D;}") + application_version_label.setStyleSheet("QLabel {color: #9fddff;}") application_version_layout.addWidget(application_version_label) # Add widgets diff --git a/securedrop_client/resources/images/login_bg.svg b/securedrop_client/resources/images/login_bg.svg index e3dfec345..7b73ae5e1 100644 --- a/securedrop_client/resources/images/login_bg.svg +++ b/securedrop_client/resources/images/login_bg.svg @@ -1,197 +1,53 @@ - - - - - - image/svg+xml - - LoginBasse - - - - - - LoginBasse - Created with Sketch. - - - - + + + + + - + + + + + + + - - - - - - - - - - - - - - - - - - - + LoginBasse-OHYOUWILLWORK + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - - - - - - - + + + + + + + +