From 4dc63ad9174bb9bc0a99a7ba59ffb09a69616d8a Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 21 May 2024 09:33:15 +0300 Subject: [PATCH] Update SmartID/MobileID/PinUnblock/RoleAddress dialogs with new UI guidlines IB-7965 Signed-off-by: Raul Metsma --- client/dialogs/MobileDialog.cpp | 30 +- client/dialogs/MobileDialog.ui | 424 +++++++----- client/dialogs/PinUnblock.cpp | 61 +- client/dialogs/PinUnblock.h | 2 - client/dialogs/PinUnblock.ui | 647 +++++++----------- client/dialogs/RoleAddressDialog.cpp | 13 - client/dialogs/RoleAddressDialog.ui | 500 ++++++-------- client/dialogs/SmartIDDialog.cpp | 21 +- client/dialogs/SmartIDDialog.ui | 425 ++++++------ client/images/icon_checkbox.svg | 4 + client/images/icon_checkbox_active.svg | 4 + client/images/icon_checkbox_check.svg | 5 + client/images/icon_checkbox_check_active.svg | 5 + .../images/icon_checkbox_check_disabled.svg | 5 + client/images/icon_checkbox_check_hover.svg | 18 + client/images/icon_checkbox_disabled.svg | 4 + client/images/icon_checkbox_hover.svg | 17 + client/images/images.qrc | 8 + client/translations/en.ts | 71 +- client/translations/et.ts | 73 +- client/translations/ru.ts | 71 +- client/widgets/ComboBox.cpp | 17 +- 22 files changed, 1066 insertions(+), 1359 deletions(-) create mode 100644 client/images/icon_checkbox.svg create mode 100644 client/images/icon_checkbox_active.svg create mode 100644 client/images/icon_checkbox_check.svg create mode 100644 client/images/icon_checkbox_check_active.svg create mode 100644 client/images/icon_checkbox_check_disabled.svg create mode 100644 client/images/icon_checkbox_check_hover.svg create mode 100644 client/images/icon_checkbox_disabled.svg create mode 100644 client/images/icon_checkbox_hover.svg diff --git a/client/dialogs/MobileDialog.cpp b/client/dialogs/MobileDialog.cpp index 00dc68c6a..eb3da4cb0 100644 --- a/client/dialogs/MobileDialog.cpp +++ b/client/dialogs/MobileDialog.cpp @@ -22,43 +22,31 @@ #include "IKValidator.h" #include "Settings.h" -#include "Styles.h" #include "effects/Overlay.h" -MobileDialog::MobileDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::MobileDialog) +MobileDialog::MobileDialog(QWidget *parent) + : QDialog(parent) + , ui(new Ui::MobileDialog) { static const QStringList countryCodes {QStringLiteral("372"), QStringLiteral("370")}; new Overlay(this); + ui->setupUi(this); setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint); - setFixedSize(size()); #ifdef Q_OS_WIN - ui->buttonLayout->setDirection(QBoxLayout::RightToLeft); + ui->layoutButton->setDirection(QBoxLayout::RightToLeft); #endif - QFont condensed = Styles::font(Styles::Condensed, 14); - QFont regularFont = Styles::font(Styles::Regular, 14); - ui->labelNameId->setFont(Styles::font(Styles::Regular, 16, QFont::DemiBold)); - ui->labelPhone->setFont(regularFont); - ui->labelCode->setFont(regularFont); - ui->errorCode->setFont(regularFont); - ui->errorPhone->setFont(regularFont); - ui->phoneNo->setFont(regularFont); - ui->idCode->setFont(regularFont); - ui->cbRemember->setFont(regularFont); - ui->sign->setFont(condensed); - ui->cancel->setFont(condensed); - // Mobile ui->idCode->setValidator(new NumberValidator(ui->idCode)); ui->idCode->setText(Settings::MOBILEID_CODE); ui->idCode->setAttribute(Qt::WA_MacShowFocusRect, false); + ui->errorCode->hide(); ui->phoneNo->setValidator(new NumberValidator(ui->phoneNo)); ui->phoneNo->setText(Settings::MOBILEID_NUMBER.value(countryCodes[0])); ui->phoneNo->setAttribute(Qt::WA_MacShowFocusRect, false); ui->phoneNo->setFocus(); + ui->errorPhone->hide(); ui->cbRemember->setChecked(Settings::MOBILEID_REMEMBER); ui->cbRemember->setAttribute(Qt::WA_MacShowFocusRect, false); auto saveSettings = [this] { @@ -68,9 +56,9 @@ MobileDialog::MobileDialog(QWidget *parent) : Settings::MOBILEID_NUMBER = checked ? ui->phoneNo->text() : QString(); }; auto setError = [](QLineEdit *input, QLabel *error, const QString &msg) { - input->setStyleSheet(msg.isEmpty() ? QString() :QStringLiteral("border-color: #c53e3e")); - error->setFocusPolicy(msg.isEmpty() ? Qt::NoFocus : Qt::TabFocus); + input->setStyleSheet(msg.isEmpty() ? QString() : QStringLiteral("border-color: #BE7884")); error->setText(msg); + error->setHidden(msg.isEmpty()); }; connect(ui->idCode, &QLineEdit::returnPressed, ui->sign, &QPushButton::click); connect(ui->idCode, &QLineEdit::textEdited, this, saveSettings); diff --git a/client/dialogs/MobileDialog.ui b/client/dialogs/MobileDialog.ui index 16f252047..f012209bd 100644 --- a/client/dialogs/MobileDialog.ui +++ b/client/dialogs/MobileDialog.ui @@ -9,8 +9,8 @@ 0 0 - 382 - 301 + 430 + 477 @@ -18,93 +18,156 @@ QWidget { +font-family: Roboto, Helvetica; +font-size: 14px; +} +#MobileDialog { background-color: #FFFFFF; -color: #000000; -border-radius: 2px; +border-radius: 4px; +} +#label { +color: #003168; +font-size: 20px; +font-weight: 700; } #labelCode, #labelPhone { -color: #353739 +color: #607496; +font-weight: 500; } #errorCode, #errorPhone { -color: #c53e3e +color: #AD2A45; +} +QLineEdit, QComboBox { +padding: 10px 14px; +border: 1px solid #C4CBD8; +border-radius: 4px; +color: #07142A; +placeholder-text-color: #607496; +font-size: 16px; +} +QComboBox QWidget#popup { +background-color: transparent; +} +QComboBox QWidget#content { +border: 1px solid #C4CBD8; +border-radius: 4px; +background-color: #FFFFFF; +} +QComboBox QPushButton { +margin: 3px; +padding: 0px 12px 0px 4px; +border: 0px; +color: #07142A; +text-align: left; +font-weight: normal; +font-size: 16px; +qproperty-iconSize: 14px 9px; +qproperty-layoutDirection: RightToLeft; } -QLineEdit { -padding: 0px 10px; -border: 1px solid #8E969D; -border-radius: 2px; +QComboBox QPushButton#selected { +qproperty-icon: url(:/images/arrow_up.svg); +} +QComboBox QPushButton:hover#selected { +qproperty-icon: url(:/images/arrow_up_white.svg); +} +QComboBox::drop-down { +background-color: #FFFFFF; +width: 25px; +} +QComboBox::down-arrow { +image: url(:/images/arrow_down.svg); +} +QComboBox::down-arrow:on { +top: 1px; +left: 1px; } QCheckBox { -color: #353739; -min-height: 31px; -spacing: 5px; +spacing: 8px; +color: #07142A; +border: none; /*Workaround for right padding*/ } QCheckBox:disabled { -color: #727679; +color: #C4CBD8; } QCheckBox::indicator { -width: 14px; -height: 14px; +width: 16px; +height: 16px; } QCheckBox::indicator:unchecked { -image: url(:/images/icon_checkbox.png); +image: url(:/images/icon_checkbox.svg); +} +QCheckBox::indicator:unchecked:hover { +image: url(:/images/icon_checkbox_active.svg); +} +QCheckBox::indicator:unchecked:disabled { +image: url(:/images/icon_checkbox_disabled.svg); } QCheckBox::indicator:checked { -image: url(:/images/icon_checkbox_check.png); +image: url(:/images/icon_checkbox_check.svg); +} +QCheckBox::indicator:checked:hover { +image: url(:/images/icon_checkbox_check_active.svg); +} +QCheckBox::indicator:checked:disabled { +image: url(:/images/icon_checkbox_check_disabled.svg); } QPushButton { -border-radius: 2px; -border: none; -color: #ffffff; -background-color: #981E32; +padding: 0px 12px; +border-radius: 4px; +border: 1px solid #AD2A45; +color: #AD2A45; +font-weight: 700; } -QPushButton:pressed { -background-color: #F24A66; +QPushButton:hover { +background-color: #F5EBED; } -QPushButton:hover:!pressed { -background-color: #CD2541; +QPushButton:pressed { +background-color: #E1C1C6; } -QPushButton::default { -background-color: #006EB5; +QPushButton:default { +color: #ffffff; +background-color: #2F70B6; } -QPushButton::default:pressed { -background-color: #41B6E6; +QPushButton:default:hover { +background-color: #2B66A6; } -QPushButton::default:hover:!pressed { -background-color: #008DCF; +QPushButton:default:pressed { +background-color: #215081; } -QPushButton::default:disabled { -background-color: #BEDBED; +QPushButton:default:disabled { +background-color: #2F70B6; } - + - 0 + 40 + + + QLayout::SetFixedSize - 30 + 40 - 30 + 32 - 30 + 40 - 30 + 32 - - - - 14 - + + + + 350 + 0 + Qt::TabFocus - - color: #041E42; - Enter your phone number to sign with mobile-ID @@ -117,167 +180,167 @@ background-color: #BEDBED; - - - Qt::Vertical - - - - 20 - 8 - - - - - - - - - Roboto Condensed - 12 - - - - Country code and phone number - - - phoneNo - - - - - - - - 0 - 34 - - - - 37254321 - - - - - - - - 12 - - - - - - - - - Roboto Condensed - 12 - - - - Personal code - - - idCode - - - - - - - - 0 - 34 - - - - 47101010033 - - - - - - - - 12 - - - - - - - - Remember me - - - - - - - Qt::Vertical - - - - 20 - 8 - + + + 24 - + + + + 6 + + + + + + 0 + 20 + + + + Country code and phone number + + + phoneNo + + + + + + + + 0 + 40 + + + + 37254321 + + + + + + + + 0 + 20 + + + + + + + + + + 6 + + + + + + 0 + 20 + + + + Personal code + + + idCode + + + + + + + + 0 + 40 + + + + 47101010033 + + + + + + + + 0 + 20 + + + + + + + + + + + 0 + 17 + + + + Remember me + + + + - + - 40 + 0 - 0 - 30 + 100 + 40 - - - 14 - - PointingHandCursor - - Cancel - - CANCEL + Cancel false + + + + Qt::Horizontal + + + + 40 + 20 + + + + - 0 - 30 + 100 + 40 - - - 14 - - PointingHandCursor - - Sign - - SIGN + Sign true @@ -289,11 +352,6 @@ background-color: #BEDBED; - - CheckBox - QCheckBox -
widgets/CheckBox.h
-
LineEdit QLineEdit diff --git a/client/dialogs/PinUnblock.cpp b/client/dialogs/PinUnblock.cpp index 11eea3444..af9780643 100644 --- a/client/dialogs/PinUnblock.cpp +++ b/client/dialogs/PinUnblock.cpp @@ -20,7 +20,6 @@ #include "PinUnblock.h" #include "ui_PinUnblock.h" -#include "Styles.h" #include "effects/Overlay.h" #include @@ -40,24 +39,11 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t list.first()->setFocus(); for(QLineEdit *w: list) w->setAttribute(Qt::WA_MacShowFocusRect, false); + ui->errorPuk->hide(); + ui->errorPin->hide(); + ui->errorRepeat->hide(); new Overlay(this); - QFont condensed14 = Styles::font(Styles::Condensed, 14); - QFont condensed12 = Styles::font(Styles::Condensed, 12); - QFont regular14 = Styles::font(Styles::Regular, 14); - QFont regular12 = Styles::font(Styles::Regular, 12); - ui->errorPuk->setFont(regular12); - ui->errorPin->setFont(regular12); - ui->errorRepeat->setFont(regular12); - ui->labelPuk->setFont(condensed12); - ui->labelPin->setFont(condensed12); - ui->labelRepeat->setFont(condensed12); - ui->labelNameId->setFont(Styles::font(Styles::Regular, 20, QFont::DemiBold)); - ui->cancel->setFont(condensed14); - ui->change->setFont(condensed14); - for(QLabel *text: findChildren(QRegularExpression(QStringLiteral("line\\d_[text,bullet]")))) - text->setFont(regular14); - auto pattern = [](QSmartCardData::PinType type) { return QStringLiteral("^\\d{%1,12}$").arg(QSmartCardData::minPinLen(type)); }; @@ -68,8 +54,8 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t switch(mode) { case PinUnblock::UnBlockPinWithPuk: - ui->labelNameId->setText(tr("%1 unblocking").arg(QSmartCardData::typeString(type))); - ui->change->setText(tr("UNBLOCK")); + ui->label->setText(tr("%1 unblocking").arg(QSmartCardData::typeString(type))); + ui->change->setText(tr("Unblock")); regexpValidateCode.setPattern(pattern(QSmartCardData::PukType)); ui->line1_text->setText(tr("To unblock the certificate you have to enter the PUK code.")); ui->line2_text->setText(tr("You can find your PUK code inside the ID-card codes envelope.")); @@ -78,7 +64,7 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t "the Police and Border Guard Board service center to obtain new PIN codes.")); break; case PinUnblock::ChangePinWithPuk: - ui->labelNameId->setText(tr("%1 code change").arg(QSmartCardData::typeString(type))); + ui->label->setText(tr("%1 code change").arg(QSmartCardData::typeString(type))); regexpValidateCode.setPattern(pattern(QSmartCardData::PukType)); ui->line1_text->setText(type == QSmartCardData::Pin2Type ? tr("PIN2 code is used to digitally sign documents.") @@ -87,8 +73,8 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t ui->line3_text->setText(tr("PUK code is written in the envelope, that is given with the ID-card.")); break; case PinUnblock::PinChange: - ui->labelNameId->setText(tr("%1 code change").arg(QSmartCardData::typeString(type))); - ui->labelPuk->setText(tr("VALID %1 CODE").arg(QSmartCardData::typeString(type))); + ui->label->setText(tr("%1 code change").arg(QSmartCardData::typeString(type))); + ui->labelPuk->setText(tr("Valid %1 code").arg(QSmartCardData::typeString(type))); regexpValidateCode.setPattern(pattern(type)); if(type == QSmartCardData::PukType) { @@ -107,23 +93,17 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t type == QSmartCardData::Pin2Type ? tr("digital signing") : tr("verify identification")) ); } - setWindowTitle(ui->labelNameId->text()); - ui->labelPin->setText(tr("NEW %1 CODE").arg(QSmartCardData::typeString(type))); - ui->labelRepeat->setText(tr("NEW %1 CODE AGAIN").arg(QSmartCardData::typeString(type))); - ui->pin->setAccessibleName(ui->labelPin->text().toLower()); + setWindowTitle(ui->label->text()); + ui->labelPin->setText(tr("New %1 code").arg(QSmartCardData::typeString(type))); + ui->labelRepeat->setText(tr("Repeat new %1 code").arg(QSmartCardData::typeString(type))); ui->pin->setValidator(new QRegularExpressionValidator(regexpNewCode, ui->pin)); - ui->repeat->setAccessibleName(ui->labelRepeat->text().toLower()); ui->repeat->setValidator(new QRegularExpressionValidator(regexpNewCode, ui->repeat)); - ui->puk->setAccessibleName(ui->labelPuk->text().toLower()); ui->puk->setValidator(new QRegularExpressionValidator(regexpValidateCode, ui->puk)); - ui->change->setAccessibleName(ui->change->text().toLower()); - if(leftAttempts == 3) - ui->errorPuk->clear(); - else if(mode == PinUnblock::PinChange) - ui->errorPuk->setText(tr("Remaining attempts: %1").arg(leftAttempts)); - else - ui->errorPuk->setText(tr("PUK remaining attempts: %1").arg(leftAttempts)); + if(leftAttempts < 3) + ui->errorPuk->setText(mode == PinUnblock::PinChange ? + tr("Remaining attempts: %1").arg(leftAttempts) : + tr("PUK remaining attempts: %1").arg(leftAttempts)); for(int i = 1; i < 4; i++) { @@ -134,9 +114,10 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t bullet->setHidden(isHidden); } auto setError = [](QLineEdit *input, QLabel *error, const QString &msg) { - input->setStyleSheet(msg.isEmpty() ? QString() :QStringLiteral("border-color: #c53e3e")); + input->setStyleSheet(msg.isEmpty() ? QString() : QStringLiteral("border-color: #BE7884")); error->setFocusPolicy(msg.isEmpty() ? Qt::NoFocus : Qt::TabFocus); error->setText(msg); + error->setHidden(msg.isEmpty()); }; connect(ui->cancel, &QPushButton::clicked, this, &PinUnblock::reject); connect(this, &PinUnblock::finished, this, &PinUnblock::close); @@ -160,9 +141,9 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t ui->puk->setStyleSheet({}); ui->pin->setStyleSheet({}); ui->repeat->setStyleSheet({}); - ui->errorPuk->clear(); - ui->errorPin->clear(); - ui->errorRepeat->clear(); + ui->errorPuk->hide(); + ui->errorPin->hide(); + ui->errorRepeat->hide(); auto pinError = [](auto type) { return tr("%1 length has to be between %2 and 12") @@ -209,8 +190,6 @@ PinUnblock::PinUnblock(WorkMode mode, QWidget *parent, QSmartCardData::PinType t tr("New %1 codes doesn't match").arg(QSmartCardData::typeString(type))); accept(); }); - adjustSize(); - setFixedSize(size()); } PinUnblock::~PinUnblock() diff --git a/client/dialogs/PinUnblock.h b/client/dialogs/PinUnblock.h index 3f82eb443..e2c053f47 100644 --- a/client/dialogs/PinUnblock.h +++ b/client/dialogs/PinUnblock.h @@ -46,7 +46,5 @@ class PinUnblock final : public QDialog QString newCodeText() const; private: - bool validatePin(QSmartCardData::PinType type, WorkMode mode); - Ui::PinUnblock *ui; }; diff --git a/client/dialogs/PinUnblock.ui b/client/dialogs/PinUnblock.ui index 8deb034a6..a1c7c9ec5 100644 --- a/client/dialogs/PinUnblock.ui +++ b/client/dialogs/PinUnblock.ui @@ -9,62 +9,96 @@ 0 0 - 460 - 446 + 430 + 570 - QDialog { - border-radius: 2px; - background-color: #FFFFFF; + QWidget { +font-family: Roboto, Helvetica; +font-size: 14px; } -QLabel { - color: #353739; +#PinUnblock { +background-color: #FFFFFF; +border-radius: 4px; +} +#label { +color: #003168; +font-size: 20px; +font-weight: 700; +} +#labelPuk, #labelPin, #labelRepeat { +color: #607496; +font-weight: 500; +} +#errorPuk, #errorPin, #errorRepeat { +color: #AD2A45; } QLineEdit { - border: 1px solid #8E969D; - border-radius: 2px; - padding: 0px 10px; - background-color: #ffffff; - font-size: 16px; - color: #000000; - font-weight: 400; - line-height: 14px; +padding: 10px 14px; +border: 1px solid #C4CBD8; +border-radius: 4px; +color: #07142A; +placeholder-text-color: #607496; +font-size: 16px; +} +QPushButton { +padding: 0px 12px; +border-radius: 4px; +border: 1px solid #AD2A45; +color: #AD2A45; +font-weight: 700; +} +QPushButton:hover { +background-color: #F5EBED; +} +QPushButton:pressed { +background-color: #E1C1C6; +} +QPushButton:default { +color: #ffffff; +background-color: #2F70B6; +} +QPushButton:default:hover { +background-color: #2B66A6; +} +QPushButton:default:pressed { +background-color: #215081; +} +QPushButton:default:disabled { +background-color: #2F70B6; } - 10 + 40 + + + QLayout::SetFixedSize - 30 + 40 - 26 + 32 - 30 + 40 - 26 + 32 - - - - Roboto - 20 - false - + + + + 350 + 0 + Qt::TabFocus - - border: none; -color: #041E42; -line-height: 24px; - %1 code change @@ -74,302 +108,182 @@ line-height: 24px; - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 15 - 0 - - - - - 15 - 16777215 - - - - &bull; - - - Qt::RichText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - Roboto - 14 - false - - - - Qt::TabFocus - - - Qt::RichText - - - true - - - true - - - - - - - - 15 - 0 - - - - - 15 - 16777215 - - - - &bull; - - - Qt::RichText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - Roboto - 14 - false - - - - Qt::TabFocus - - - Qt::RichText - - - true - - - true - - - - - - - - 15 - 0 - - - - - 15 - 16777215 - - - - &bull; - - - Qt::RichText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - Roboto - 14 - false - - - - Qt::TabFocus - - - Qt::RichText - - - true - - - true - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 7 - - - - - - + - 2 + 24 - + - 2 - - - 60 - - - 60 + 0 - - - - - 12 - + + + + + 15 + 0 + - - Valid puk code + + + 15 + 16777215 + - VALID PUK CODE + &bull; - - puk + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - 0 - 0 - + + + + Qt::TabFocus + + + Qt::RichText + + + true + + + true + + + + - 0 - 34 + 15 + 0 - 16777215 + 15 16777215 - - Qt::LeftToRight + + &bull; + + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Qt::TabFocus + + + Qt::RichText + + + true + + + true + + + + + + + + 15 + 0 + + + + + 15 + 16777215 + - + &bull; - - QLineEdit::Password + + Qt::RichText - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Qt::TabFocus + + + Qt::RichText + + + true + + + true - - - - 12 - - - - color: #c53e3e - - - Qt::AlignCenter + + + 6 - + + + + Current PUK code + + + puk + + + + + + + + 0 + 40 + + + + QLineEdit::Password + + + + + + + - -
- - - - 2 - - + - 2 - - - 60 - - - 60 + 6 - - - 12 - - - NEW %1 CODE + New %1 code pin @@ -378,22 +292,10 @@ line-height: 24px; - - - 0 - 0 - - 0 - 32 - - - - - 16777215 - 16777215 + 40 @@ -401,50 +303,20 @@ line-height: 24px; + + + - - - - 12 - - - - color: #c53e3e - - - Qt::AlignCenter - - - - - - - - - 2 - - - + - 2 - - - 60 - - - 60 + 6 - - - 12 - - - NEW %1 CODE AGAIN + Repeat new %1 code repeat @@ -456,7 +328,7 @@ line-height: 24px; 0 - 34 + 40 @@ -464,120 +336,63 @@ line-height: 24px; + + + - - - - - 12 - - - - color: #c53e3e - - - Qt::AlignCenter - - - - 40 - - - 60 - - 0 - - 60 - - 120 - 34 + 100 + 40 - - - Roboto Condensed - 14 - - PointingHandCursor - - Cancel - - - QPushButton { - border-radius: 2px; - border: none; - color: #ffffff; - background-color: #981E32; - } - QPushButton:pressed { - background-color: #F24A66; - } - QPushButton:hover:!pressed { - background-color: #CD2541; - } - - CANCEL + Cancel false + + + + Qt::Horizontal + + + + 40 + 20 + + + + - 120 - 34 + 100 + 40 - - - Roboto Condensed - 14 - - PointingHandCursor - - Unblock - - - QPushButton { - border-radius: 2px; - border: none; - color: #ffffff; - background-color: #006EB5; - } - QPushButton:pressed { - background-color: #41B6E6; - } - QPushButton:hover:!pressed { - background-color: #008DCF; - } - QPushButton:disabled { - background-color: #BEDBED; - } - - CHANGE + Unblock true diff --git a/client/dialogs/RoleAddressDialog.cpp b/client/dialogs/RoleAddressDialog.cpp index 9b6256c47..28568fa59 100644 --- a/client/dialogs/RoleAddressDialog.cpp +++ b/client/dialogs/RoleAddressDialog.cpp @@ -21,7 +21,6 @@ #include "ui_RoleAddressDialog.h" #include "Settings.h" -#include "Styles.h" #include "effects/Overlay.h" #include @@ -33,9 +32,6 @@ RoleAddressDialog::RoleAddressDialog(QWidget *parent) : QDialog(parent) , d(new Private) { - const QFont regularFont = Styles::font(Styles::Regular, 14); - const QFont condensed = Styles::font(Styles::Condensed, 14); - d->setupUi(this); #if defined (Q_OS_WIN) d->horizontalLayout->setDirection(QBoxLayout::RightToLeft); @@ -45,15 +41,7 @@ RoleAddressDialog::RoleAddressDialog(QWidget *parent) w->setAttribute(Qt::WA_MacShowFocusRect, false); connect( d->cancel, &QPushButton::clicked, this, &RoleAddressDialog::reject ); - d->cancel->setFont(condensed); - connect( d->sign, &QPushButton::clicked, this, &RoleAddressDialog::accept ); - d->sign->setFont(condensed); - - for(auto *label: findChildren()) - label->setFont(regularFont); - - d->title->setFont(Styles::font(Styles::Regular, 16, QFont::DemiBold)); auto list = findChildren(); if(!list.isEmpty()) @@ -66,7 +54,6 @@ RoleAddressDialog::RoleAddressDialog(QWidget *parent) completer->setCompletionMode(QCompleter::PopupCompletion); completer->setCaseSensitivity(Qt::CaseInsensitive); line->setText(QStringList(s).value(0)); - line->setFont(regularFont); line->setCompleter(completer); connect(line, &QLineEdit::editingFinished, this, [line, s = std::move(s)] { QStringList list = s; diff --git a/client/dialogs/RoleAddressDialog.ui b/client/dialogs/RoleAddressDialog.ui index 1f5bdf47c..06291ce58 100644 --- a/client/dialogs/RoleAddressDialog.ui +++ b/client/dialogs/RoleAddressDialog.ui @@ -9,76 +9,96 @@ 0 0 - 444 - 452 + 430 + 614 QWidget { - color: #000000; - background-color: #FFFFFF; +font-family: Roboto, Helvetica; +font-size: 14px; } -QWidget#RoleAddressDialog { - border-radius: 2px; - border: none; +#RoleAddressDialog { +background-color: #FFFFFF; +border-radius: 4px; +} +#label { +color: #003168; +font-size: 20px; +font-weight: 700; +} +#RoleLabel, #CityLabel, #StateLabel, #CountryLabel, #ZipLabel { +color: #607496; +font-weight: 500; +} +#errorCode, #errorCountry { +color: #AD2A45; +} +QLineEdit { +padding: 10px 14px; +border: 1px solid #C4CBD8; +border-radius: 4px; +color: #07142A; +placeholder-text-color: #607496; +font-size: 16px; } QPushButton { - border-radius: 2px; - border: none; - color: #ffffff; - background-color: #006EB5; - height: 34px; - width: 120px; +padding: 0px 12px; +border-radius: 4px; +border: 1px solid #AD2A45; +color: #AD2A45; +font-weight: 700; } -QPushButton:pressed { - background-color: #41B6E6; +QPushButton:hover { +background-color: #F5EBED; } -QPushButton:hover:!pressed { - background-color: #008DCF; +QPushButton:pressed { +background-color: #E1C1C6; } -QPushButton:disabled { - background-color: #BEDBED; +QPushButton:default { +color: #ffffff; +background-color: #2F70B6; } -QLineEdit { - border: 1px solid #8E969D; - border-radius: 2px; - background-color: #FFFFFF; +QPushButton:default:hover { +background-color: #2B66A6; } -QLabel { - margin-top:8px; - margin-bottom:2px; +QPushButton:default:pressed { +background-color: #215081; } - +QPushButton:default:disabled { +background-color: #2F70B6; +} - 0 + 40 + + + QLayout::SetFixedSize - 25 + 40 - 16 + 32 - 25 + 40 - 16 + 32 - - - - 18 - + + + + 350 + 0 + Qt::TabFocus - - margin:0px; color: #041E42; - Enter your role and address info @@ -88,276 +108,194 @@ QLabel { - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 15 - - - - - - - - - 0 - 0 - - - - Role / resolution - - - Role - - - - - - - - 0 - 34 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 15 - - - - - - - - - 0 - 0 - - - - City - - - City - - - - - - - - 0 - 34 - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - State - - - State - - - - - - - - 0 - 34 - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Country - - - Country - - - - - - - - 0 - 34 - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Zip - - - Zip - - - - - - - - 0 - 34 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 25 - + + + 24 - + + + + 6 + + + + + Role / resolution + + + Role + + + + + + + + 0 + 40 + + + + + + + + + + 6 + + + + + City + + + City + + + + + + + + 0 + 40 + + + + + + + + + + 6 + + + + + State + + + State + + + + + + + + 0 + 40 + + + + + + + + + + 6 + + + + + Country + + + Country + + + + + + + + 0 + 40 + + + + + + + + + + 6 + + + + + Zip + + + Zip + + + + + + + + 0 + 40 + + + + + + + - + - 6 - - - 25 - - - 25 + 0 - - - 0 - 0 - - - 0 - 34 + 100 + 40 PointingHandCursor - + Cancel - - QPushButton { - border-radius: 2px; - border: none; - color: #ffffff; - background-color: #981E32; -} -QPushButton:pressed { - background-color: #F24A66; -} -QPushButton:hover:!pressed { - background-color: #CD2541; -} -QPushButton:disabled { - background-color: #BEDBED; -} + + + + + + Qt::Horizontal - - CANCEL + + + 40 + 20 + - + - - - 0 - 0 - - - 0 - 34 + 100 + 40 PointingHandCursor - - Sign - - SIGN + Sign true diff --git a/client/dialogs/SmartIDDialog.cpp b/client/dialogs/SmartIDDialog.cpp index 8ea8aec9a..29e531a00 100644 --- a/client/dialogs/SmartIDDialog.cpp +++ b/client/dialogs/SmartIDDialog.cpp @@ -22,7 +22,6 @@ #include "IKValidator.h" #include "Settings.h" -#include "Styles.h" #include "effects/Overlay.h" SmartIDDialog::SmartIDDialog(QWidget *parent) @@ -34,26 +33,14 @@ SmartIDDialog::SmartIDDialog(QWidget *parent) ui->setupUi(this); setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint); - setFixedSize(size()); #ifdef Q_OS_WIN - ui->buttonLayout->setDirection(QBoxLayout::RightToLeft); + ui->layoutButton->setDirection(QBoxLayout::RightToLeft); #endif - QFont condensed = Styles::font(Styles::Condensed, 14); - QFont regularFont = Styles::font(Styles::Regular, 14); - ui->labelNameId->setFont(Styles::font(Styles::Regular, 16, QFont::DemiBold)); - ui->labelCode->setFont(regularFont); - ui->labelCountry->setFont(regularFont); - ui->errorCode->setFont(regularFont); - ui->errorCountry->setFont(regularFont); - ui->idCode->setFont(regularFont); ui->idCode->setAttribute(Qt::WA_MacShowFocusRect, false); ui->idCode->setFocus(); - ui->idCountry->setFont(regularFont); - ui->cbRemember->setFont(regularFont); ui->cbRemember->setAttribute(Qt::WA_MacShowFocusRect, false); - ui->sign->setFont(condensed); - ui->cancel->setFont(condensed); + ui->errorCode->hide(); auto *ik = new NumberValidator(ui->idCode); ui->idCode->setValidator(Settings::SMARTID_COUNTRY == EE ? ik : nullptr); @@ -69,9 +56,9 @@ SmartIDDialog::SmartIDDialog(QWidget *parent) Settings::SMARTID_COUNTRY = checked ? country() : EE; }; auto setError = [](QLineEdit *input, QLabel *error, const QString &msg) { - input->setStyleSheet(msg.isEmpty() ? QString() :QStringLiteral("border-color: #c53e3e")); - error->setFocusPolicy(msg.isEmpty() ? Qt::NoFocus : Qt::TabFocus); + input->setStyleSheet(msg.isEmpty() ? QString() : QStringLiteral("border-color: #BE7884")); error->setText(msg); + error->setHidden(msg.isEmpty()); }; connect(ui->idCode, &QLineEdit::returnPressed, ui->sign, &QPushButton::click); connect(ui->idCode, &QLineEdit::textEdited, this, saveSettings); diff --git a/client/dialogs/SmartIDDialog.ui b/client/dialogs/SmartIDDialog.ui index 2d8ed51c0..fcb642080 100644 --- a/client/dialogs/SmartIDDialog.ui +++ b/client/dialogs/SmartIDDialog.ui @@ -9,8 +9,8 @@ 0 0 - 382 - 301 + 430 + 451 @@ -18,45 +18,55 @@ QWidget { +font-family: Roboto, Helvetica; +font-size: 14px; +} +#SmartIDDialog { background-color: #FFFFFF; -color: #000000; -border-radius: 2px; +border-radius: 4px; } -QLineEdit, QComboBox { -padding: 0px 10px; -border: 1px solid #8E969D; -border-radius: 2px; +#label { +color: #003168; +font-size: 20px; +font-weight: 700; } #labelCode, #labelCountry { -color: #353739 +color: #607496; +font-weight: 500; } #errorCode, #errorCountry { -color: #c53e3e +color: #AD2A45; +} +QLineEdit, QComboBox { +padding: 10px 14px; +border: 1px solid #C4CBD8; +border-radius: 4px; +color: #07142A; +placeholder-text-color: #607496; +font-size: 16px; } QComboBox QWidget#popup { background-color: transparent; } QComboBox QWidget#content { -border: 1px solid #8E969D; -border-radius: 2px; +border: 1px solid #C4CBD8; +border-radius: 4px; background-color: #FFFFFF; } QComboBox QPushButton { margin: 3px; -padding: 0px 8px 0px 4px; +padding: 0px 12px 0px 4px; border: 0px; -color: #353739; +color: #07142A; text-align: left; +font-weight: normal; +font-size: 16px; qproperty-iconSize: 14px 9px; qproperty-layoutDirection: RightToLeft; } QComboBox QPushButton#selected { qproperty-icon: url(:/images/arrow_up.svg); } -QComboBox QPushButton:hover { -background-color: #006EB5; -color: #FFFFFF; -} QComboBox QPushButton:hover#selected { qproperty-icon: url(:/images/arrow_up_white.svg); } @@ -72,52 +82,92 @@ top: 1px; left: 1px; } QCheckBox { -min-height: 31px; -spacing: 5px; +spacing: 8px; +color: #07142A; +border: none; /*Workaround for right padding*/ } QCheckBox:disabled { -color: #727679; +color: #C4CBD8; } QCheckBox::indicator { -width: 14px; -height: 14px; +width: 16px; +height: 16px; } QCheckBox::indicator:unchecked { -image: url(:/images/icon_checkbox.png); +image: url(:/images/icon_checkbox.svg); +} +QCheckBox::indicator:unchecked:hover { +image: url(:/images/icon_checkbox_active.svg); +} +QCheckBox::indicator:unchecked:disabled { +image: url(:/images/icon_checkbox_disabled.svg); } QCheckBox::indicator:checked { -image: url(:/images/icon_checkbox_check.png); +image: url(:/images/icon_checkbox_check.svg); +} +QCheckBox::indicator:checked:hover { +image: url(:/images/icon_checkbox_check_active.svg); +} +QCheckBox::indicator:checked:disabled { +image: url(:/images/icon_checkbox_check_disabled.svg); +} +QPushButton { +padding: 0px 12px; +border-radius: 4px; +border: 1px solid #AD2A45; +color: #AD2A45; +font-weight: 700; +} +QPushButton:hover { +background-color: #F5EBED; +} +QPushButton:pressed { +background-color: #E1C1C6; +} +QPushButton:default { +color: #ffffff; +background-color: #2F70B6; +} +QPushButton:default:hover { +background-color: #2B66A6; +} +QPushButton:default:pressed { +background-color: #215081; +} +QPushButton:default:disabled { +background-color: #2F70B6; } - 0 + 40 + + + QLayout::SetFixedSize - 30 + 40 - 30 + 32 - 30 + 40 - 30 + 32 - - - - 14 - + + + + 350 + 0 + Qt::TabFocus - - color: #041E42; - Enter your personal code to sign with Smart-ID @@ -130,211 +180,169 @@ image: url(:/images/icon_checkbox_check.png); - - - Qt::Vertical - - - - 0 - 8 - - - - - - - - - 12 - - - - Country - - - idCountry - - - - - - - - 0 - 34 - + + + 24 - - Estonia - + + + 6 + + + + + + 0 + 20 + + + + Country + + + idCountry + + + + + + + + 0 + 40 + + + + + Estonia + + + + + Lithuania + + + + + Latvia + + + + + - - Lithuania - + + + 6 + + + + + + 0 + 20 + + + + Personal code + + + idCode + + + + + + + + 0 + 40 + + + + 47101010033 + + + + + + + + 0 + 20 + + + + + - - Latvia - + + + + 0 + 17 + + + + Remember me + + - - - - - - - 12 - - - - - - - - - 12 - - - - Personal code - - - idCode - - - - - - - - 0 - 34 - - - - 47101010033 - - - - - - - - 12 - - - - - - - - color: #353739; - - - Remember me - - - - - - - Qt::Vertical - - - - 0 - 8 - - - + - + - 40 + 0 - 0 - 30 + 100 + 40 - - - 14 - - PointingHandCursor - - Cancel - - - QPushButton { - border-radius: 2px; - border: none; - color: #ffffff; - background-color: #981E32; -} -QPushButton:pressed { - background-color: #F24A66; -} -QPushButton:hover:!pressed { - background-color: #CD2541; -} - - CANCEL + Cancel false + + + + Qt::Horizontal + + + + 40 + 20 + + + + - 0 - 30 + 100 + 40 - - - 14 - - PointingHandCursor - - Sign - - - QPushButton { - border-radius: 2px; - border: none; - color: #ffffff; - background-color: #006EB5; -} -QPushButton:pressed { - background-color: #41B6E6; -} -QPushButton:hover:!pressed { - background-color: #008DCF; -} -QPushButton:disabled { - background-color: #BEDBED; -} - - SIGN + Sign true @@ -346,11 +354,6 @@ QPushButton:disabled { - - CheckBox - QCheckBox -
widgets/CheckBox.h
-
ComboBox QComboBox diff --git a/client/images/icon_checkbox.svg b/client/images/icon_checkbox.svg new file mode 100644 index 000000000..088f31987 --- /dev/null +++ b/client/images/icon_checkbox.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/images/icon_checkbox_active.svg b/client/images/icon_checkbox_active.svg new file mode 100644 index 000000000..516706d62 --- /dev/null +++ b/client/images/icon_checkbox_active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/images/icon_checkbox_check.svg b/client/images/icon_checkbox_check.svg new file mode 100644 index 000000000..335d68293 --- /dev/null +++ b/client/images/icon_checkbox_check.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/client/images/icon_checkbox_check_active.svg b/client/images/icon_checkbox_check_active.svg new file mode 100644 index 000000000..43f1611a8 --- /dev/null +++ b/client/images/icon_checkbox_check_active.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/client/images/icon_checkbox_check_disabled.svg b/client/images/icon_checkbox_check_disabled.svg new file mode 100644 index 000000000..8df404e41 --- /dev/null +++ b/client/images/icon_checkbox_check_disabled.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/client/images/icon_checkbox_check_hover.svg b/client/images/icon_checkbox_check_hover.svg new file mode 100644 index 000000000..06bc690a1 --- /dev/null +++ b/client/images/icon_checkbox_check_hover.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/client/images/icon_checkbox_disabled.svg b/client/images/icon_checkbox_disabled.svg new file mode 100644 index 000000000..20ec252cf --- /dev/null +++ b/client/images/icon_checkbox_disabled.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/images/icon_checkbox_hover.svg b/client/images/icon_checkbox_hover.svg new file mode 100644 index 000000000..1dd1846b6 --- /dev/null +++ b/client/images/icon_checkbox_hover.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/client/images/images.qrc b/client/images/images.qrc index e8ce1056d..35dd37656 100644 --- a/client/images/images.qrc +++ b/client/images/images.qrc @@ -21,7 +21,15 @@ icon_Allkiri.svg icon_check.svg icon_checkbox.png + icon_checkbox.svg + icon_checkbox_active.svg + icon_checkbox_disabled.svg + icon_checkbox_hover.svg icon_checkbox_check.png + icon_checkbox_check.svg + icon_checkbox_check_active.svg + icon_checkbox_check_disabled.svg + icon_checkbox_check_hover.svg icon_digitempel.svg icon_download_hover.svg icon_download.svg diff --git a/client/translations/en.ts b/client/translations/en.ts index e5145be27..6e83d109a 100644 --- a/client/translations/en.ts +++ b/client/translations/en.ts @@ -1670,14 +1670,6 @@ ID-CARD Remember me Remember me - - CANCEL - CANCEL - - - SIGN - SIGN - Personal code is not valid Personal code is not valid @@ -1688,12 +1680,10 @@ ID-CARD Cancel - accessible Cancel Sign - accessible Sign @@ -1962,18 +1952,6 @@ and enter Smart-ID PIN2-code. PinUnblock - - VALID PUK CODE - CURRENT PUK CODE - - - CANCEL - CANCEL - - - UNBLOCK - UNBLOCK - PIN2 code is used to digitally sign documents. PIN2 code is used to digitally sign documents. @@ -1990,22 +1968,6 @@ and enter Smart-ID PIN2-code. %1 code change Change %1 code - - VALID %1 CODE - CURRENT %1 CODE - - - CHANGE - CHANGE - - - NEW %1 CODE - NEW %1 CODE - - - NEW %1 CODE AGAIN - REPEAT NEW %1 CODE - PUK remaining attempts: %1 PUK remaining attempts:%1 @@ -2040,19 +2002,12 @@ and enter Smart-ID PIN2-code. Cancel - accessible Cancel Unblock - accessible Unblock - - Valid puk code - accessible - Valid puk code - PUK code is used for unblocking the certificates, when PIN1 or PIN2 has been entered 3 times incorrectly. PUK code is used for unblocking the certificates, when PIN1 or PIN2 has been entered 3 times incorrectly. @@ -2109,6 +2064,22 @@ and enter Smart-ID PIN2-code. %1 length has to be between %2 and 12 %1 length has to be between %2 and 12 + + Valid %1 code + Valid %1 code + + + New %1 code + New %1 code + + + Repeat new %1 code + Repeat new %1 code + + + Current PUK code + Current PUK code + PrintSheet @@ -2924,14 +2895,6 @@ Additional licenses and components SmartIDDialog - - SIGN - SIGN - - - CANCEL - CANCEL - Personal code Personal code @@ -2966,12 +2929,10 @@ Additional licenses and components Cancel - accessible Cancel Sign - accessible Sign diff --git a/client/translations/et.ts b/client/translations/et.ts index 6acb2bfda..54b708fa5 100644 --- a/client/translations/et.ts +++ b/client/translations/et.ts @@ -1664,20 +1664,12 @@ ID-KAARDIGA MobileDialog Enter your phone number to sign with mobile-ID - <b>Sisesta oma telefoninumber mobiil-IDga<br/>allkirjastamiseks</b> + <b>Sisesta oma telefoninumber<br/>mobiil-IDga allkirjastamiseks</b> Remember me Pea mind meeles - - CANCEL - KATKESTA - - - SIGN - ALLKIRJASTA - Personal code is not valid Isikukood pole kehtiv @@ -1688,12 +1680,10 @@ ID-KAARDIGA Cancel - accessible Katkesta Sign - accessible Allkirjastan @@ -1962,18 +1952,6 @@ ja sisesta nutiseadmes Smart-ID PIN2-kood. PinUnblock - - VALID PUK CODE - KEHTIV PUK-KOOD - - - CANCEL - KATKESTA - - - UNBLOCK - BLOKEERI LAHTI - PIN2 code is used to digitally sign documents. PIN2-koodi kasutatakse digitaalallkirja andmiseks. @@ -1990,22 +1968,6 @@ ja sisesta nutiseadmes Smart-ID PIN2-kood. %1 code change %1-koodi vahetus - - VALID %1 CODE - KEHTIV %1-KOOD - - - CHANGE - MUUDA - - - NEW %1 CODE - UUS %1-KOOD - - - NEW %1 CODE AGAIN - UUS %1-KOOD UUESTI - PUK remaining attempts: %1 PUK katseid jäänud: %1 @@ -2040,19 +2002,12 @@ ja sisesta nutiseadmes Smart-ID PIN2-kood. Cancel - accessible Katkesta Unblock - accessible Blokeeri lahti - - Valid puk code - accessible - Kehtiv puk kood - PUK code is used for unblocking the certificates, when PIN1 or PIN2 has been entered 3 times incorrectly. PUK-koodi abil saab tühistada sertifikaadi blokeeringu, kui PIN1- või PIN2-koodi on 3 korda järjest valesti sisestatud. @@ -2109,6 +2064,22 @@ ja sisesta nutiseadmes Smart-ID PIN2-kood. %1 length has to be between %2 and 12 %1-koodi pikkus peab olema %2-12 numbrit + + Valid %1 code + Kehtiv %1-kood + + + New %1 code + Uus %1-kood + + + Repeat new %1 code + Uus %1-kood uuesti + + + Current PUK code + Kehtiv PUK-kood + PrintSheet @@ -2924,14 +2895,6 @@ Täiendavad litsentsid ja komponendid SmartIDDialog - - SIGN - ALLKIRJASTA - - - CANCEL - KATKESTA - Personal code Isikukood @@ -2966,12 +2929,10 @@ Täiendavad litsentsid ja komponendid Cancel - accessible Katkesta Sign - accessible Allkirjastan diff --git a/client/translations/ru.ts b/client/translations/ru.ts index a356c3514..b2c2b6d7d 100644 --- a/client/translations/ru.ts +++ b/client/translations/ru.ts @@ -1671,14 +1671,6 @@ ID-КАРТОЙ Remember me Запомнить меня - - CANCEL - ОТМЕНА - - - SIGN - ПОДПИСЬ - Personal code is not valid Личный код недействителен @@ -1689,12 +1681,10 @@ ID-КАРТОЙ Cancel - accessible Отмена Sign - accessible Подписать @@ -1963,18 +1953,6 @@ and enter Smart-ID PIN2-code. PinUnblock - - VALID PUK CODE - ДЕЙСТВУЮЩИЙ PUK-КОД - - - CANCEL - ОТМЕНИТЬ - - - UNBLOCK - РАЗБЛОКИРОВАТЬ - PIN2 code is used to digitally sign documents. PIN2-код используется для дигитальной подписи. @@ -1991,22 +1969,6 @@ and enter Smart-ID PIN2-code. %1 code change Замена %1-кода - - VALID %1 CODE - ДЕЙСТВУЮЩИЙ %1-КОД - - - CHANGE - ПОМЕНЯТЬ - - - NEW %1 CODE - НОВЫЙ %1-КОД - - - NEW %1 CODE AGAIN - НОВЫЙ %1-КОД ЗАНОВО - PUK remaining attempts: %1 PUK оставшиеся попытки: %1 @@ -2041,19 +2003,12 @@ and enter Smart-ID PIN2-code. Cancel - accessible Отмена Unblock - accessible Разблокировать - - Valid puk code - accessible - Действующий puk код - PUK code is used for unblocking the certificates, when PIN1 or PIN2 has been entered 3 times incorrectly. PUK-код - это код, разблокирующий заблокированные сертификаты, если код PIN1 или PIN2 был введён неверно 3 раза подряд. @@ -2110,6 +2065,22 @@ and enter Smart-ID PIN2-code. %1 length has to be between %2 and 12 Длина %1 должна быть %2-12 номера + + Valid %1 code + Действующий %1-код + + + New %1 code + Новый %1-код + + + Repeat new %1 code + Новый %1-код заново + + + Current PUK code + Действующий PUK-код + PrintSheet @@ -2925,14 +2896,6 @@ Additional licenses and components SmartIDDialog - - SIGN - ПОДПИСАТЬ - - - CANCEL - ОТМЕНА - Personal code Личный код @@ -2967,12 +2930,10 @@ Additional licenses and components Cancel - accessible Отмена Sign - accessible Подписать diff --git a/client/widgets/ComboBox.cpp b/client/widgets/ComboBox.cpp index 5204bedc7..0496492d6 100644 --- a/client/widgets/ComboBox.cpp +++ b/client/widgets/ComboBox.cpp @@ -28,31 +28,32 @@ ComboBox::ComboBox(QWidget *parent) void ComboBox::hidePopup() { - if(QWidget *popup = findChild(QStringLiteral("popup"))) + if(auto *popup = findChild(QStringLiteral("popup"))) popup->deleteLater(); } void ComboBox::showPopup() { - QWidget *popup = new QWidget(this); + auto *popup = new QWidget(this); popup->setObjectName(QStringLiteral("popup")); - popup->setWindowFlags(Qt::Popup); + popup->setAttribute(Qt::WA_TranslucentBackground); + popup->setWindowFlags(Qt::Popup|Qt::FramelessWindowHint); popup->setMinimumWidth(width()); - popup->move(parentWidget()->mapToGlobal(geometry().topLeft())); + popup->move(mapToGlobal(QPoint())); - QVBoxLayout *c = new QVBoxLayout(popup); + auto *c = new QVBoxLayout(popup); c->setContentsMargins(0, 0, 0, 0); c->setSpacing(0); - QWidget *content = new QWidget(popup); + auto *content = new QWidget(popup); content->setObjectName(QStringLiteral("content")); c->addWidget(content); - QVBoxLayout *l = new QVBoxLayout(content); + auto *l = new QVBoxLayout(content); l->setContentsMargins(0, 0, 0, 0); l->setSpacing(0); auto addWidget = [=](const QString &text, int index) { - QPushButton *b = new QPushButton(text, content); + auto *b = new QPushButton(text, content); b->setFont(font()); b->setMinimumHeight(minimumHeight()); connect(b, &QPushButton::clicked, this, [this, index]{ setCurrentIndex(index); hidePopup(); });