diff --git a/client/MainWindow.ui b/client/MainWindow.ui
index 71f9becb8..412cd41ae 100644
--- a/client/MainWindow.ui
+++ b/client/MainWindow.ui
@@ -98,7 +98,8 @@ QToolButton:checked {
background-color: #ffffff;
color: #003168;
}
-#version {
+#version, #version:pressed {
+border: none;
color: #BFD3E8;
font-family: Roboto, Helvetica;
font-size: 10px;
diff --git a/client/dialogs/MobileDialog.cpp b/client/dialogs/MobileDialog.cpp
index 00dc68c6a..9492836bf 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);
#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..7e29d64bf 100644
--- a/client/dialogs/MobileDialog.ui
+++ b/client/dialogs/MobileDialog.ui
@@ -3,14 +3,14 @@
MobileDialog
- Qt::WindowModal
+ Qt::WindowModality::WindowModal
0
0
- 382
- 301
+ 430
+ 481
@@ -18,98 +18,125 @@
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: #07142A;
}
#errorCode, #errorPhone {
-color: #c53e3e
+color: #AD2A45;
}
QLineEdit {
-padding: 0px 10px;
-border: 1px solid #8E969D;
-border-radius: 2px;
+padding: 10px 14px;
+border: 1px solid #C4CBD8;
+border-radius: 4px;
+color: #07142A;
+placeholder-text-color: #607496;
+font-size: 16px;
}
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: 12px 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;
+border-color: #2F70B6;
+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::SizeConstraint::SetFixedSize
- 30
+ 40
- 30
+ 32
- 30
+ 40
- 30
+ 32
-
-
-
-
- 14
-
+
+
+
+ 350
+ 0
+
- Qt::TabFocus
-
-
- color: #041E42;
+ Qt::FocusPolicy::TabFocus
Enter your phone number to sign with mobile-ID
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
true
@@ -117,140 +144,117 @@ 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
-
-
-
-
- -
-
+
- 40
+ 24
-
-
+
+
+ 6
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+ Country code and phone number
+
+
+ phoneNo
+
+
+
+ -
+
+
+ 37254321
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+
+
+ -
+
+
+ 6
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+ Personal code
+
+
+ idCode
+
+
+
+ -
+
+
+ 47101010033
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+
+
+ -
+
0
- 30
+ 17
-
-
- 14
-
+
+ Remember me
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
PointingHandCursor
-
- Cancel
-
- CANCEL
+ Cancel
false
@@ -258,26 +262,25 @@ background-color: #BEDBED;
-
-
-
+
+
+ Qt::Orientation::Horizontal
+
+
- 0
- 30
+ 40
+ 20
-
-
- 14
-
-
+
+
+ -
+
PointingHandCursor
-
- Sign
-
- SIGN
+ Sign
true
@@ -289,11 +292,6 @@ background-color: #BEDBED;
-
- CheckBox
- QCheckBox
-
-
LineEdit
QLineEdit
diff --git a/client/dialogs/MobileProgress.cpp b/client/dialogs/MobileProgress.cpp
index 6bed69173..aee2e5a3e 100644
--- a/client/dialogs/MobileProgress.cpp
+++ b/client/dialogs/MobileProgress.cpp
@@ -23,7 +23,6 @@
#include "Application.h"
#include "CheckConnection.h"
#include "Settings.h"
-#include "Styles.h"
#include "Utils.h"
#include "dialogs/WarningDialog.h"
@@ -70,12 +69,7 @@ MobileProgress::MobileProgress(QWidget *parent)
QFile::exists(QStringLiteral("%1/%2.log").arg(QDir::tempPath(), QApplication::applicationName())));
d->setWindowFlags(Qt::Dialog|Qt::CustomizeWindowHint);
d->setupUi(d);
- d->move(parent->geometry().center() - d->geometry().center());
d->code->setBuddy(d->signProgressBar);
- d->code->setFont(Styles::font(Styles::Regular, 48));
- d->info->setFont(Styles::font(Styles::Regular, 14));
- d->controlCode->setFont(d->info->font());
- d->signProgressBar->setFont(d->info->font());
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
const auto styleSheet = R"(QProgressBar {
background-color: #d3d3d3;
@@ -92,7 +86,6 @@ background-color: #007aff;
})";
d->signProgressBar->setStyleSheet(styleSheet);
#endif
- d->cancel->setFont(Styles::font(Styles::Condensed, 14));
QObject::connect(d->cancel, &QPushButton::clicked, d, &QDialog::reject);
d->statusTimer = new QTimeLine(d->signProgressBar->maximum() * 1000, d);
@@ -269,9 +262,8 @@ std::vector MobileProgress::sign(const std::string &method, const
throw Exception(__FILE__, __LINE__, "Unsupported digest method");
d->code->setText(QStringLiteral("%1").arg((digest.front() >> 2) << 7 | (digest.back() & 0x7F), 4, 10, QChar('0')));
- d->info->setText(tr("Make sure control code matches with one in phone screen\n"
- "and enter mobile-ID PIN2-code."));
- d->code->setAccessibleName(QStringLiteral("%1 %2. %3").arg(d->controlCode->text(), d->code->text(), d->info->text()));
+ d->info->setText(tr("Make sure control code matches with one in phone screen and enter mobile-ID PIN2-code."));
+ d->code->setAccessibleName(QStringLiteral("%1 %2. %3").arg(d->label->text(), d->code->text(), d->info->text()));
QByteArray data = QJsonDocument(QJsonObject::fromVariantHash({
{"relyingPartyUUID", d->UUID.isEmpty() ? QStringLiteral("00000000-0000-0000-0000-000000000000") : d->UUID},
diff --git a/client/dialogs/MobileProgress.ui b/client/dialogs/MobileProgress.ui
index 2656f2e3f..a043f8025 100644
--- a/client/dialogs/MobileProgress.ui
+++ b/client/dialogs/MobileProgress.ui
@@ -3,176 +3,248 @@
MobileProgress
- Qt::WindowModal
+ Qt::WindowModality::WindowModal
0
0
- 450
- 250
+ 432
+ 322
-
-
- 450
- 250
-
-
- background-color: #FFFFFF;
+ QWidget {
+font-family: Roboto, Helvetica;
+font-size: 14px;
+}
+#MobileProgress {
+background-color: #FFFFFF;
+border-radius: 4px;
+}
+#code {
+color: #003168;
+font-size: 32px;
+font-weight: 700;
+}
+#label, #info {
+color: #07142A;
+}
+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;
+}
+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 {
+spacing: 8px;
+color: #07142A;
+border: none; /*Workaround for right padding*/
+}
+QCheckBox:disabled {
+color: #C4CBD8;
+}
+QCheckBox::indicator {
+width: 16px;
+height: 16px;
+}
+QCheckBox::indicator:unchecked {
+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.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: 12px 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;
+border-color: #2F70B6;
+background-color: #2F70B6;
+}
+QPushButton:default:hover {
+background-color: #2B66A6;
+}
+QPushButton:default:pressed {
+background-color: #215081;
+}
+QPushButton:default:disabled {
+background-color: #2F70B6;
+}
-
+
- 6
+ 30
+
+
+ QLayout::SizeConstraint::SetFixedSize
- 12
+ 40
- 24
+ 32
- 12
+ 40
- 24
+ 32
-
-
-
- color: #353739;
-
-
- Control code:
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
- 14
- 75
- true
-
-
-
- Qt::TabFocus
-
-
- color: #041E42;
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- color: #353739;
-
-
- Qt::AlignCenter
+
+
+ 24
-
- true
-
-
- true
-
-
-
- -
-
-
-
+
- 390
- 40
-
-
-
-
- 390
- 40
+ 350
+ 0
-
- 75
-
-
- 0
+
+ Control code:
- Qt::AlignCenter
-
-
- false
-
-
- %v sec
+ Qt::AlignmentFlag::AlignCenter
-
-
- -
-
-
-
-
-
- 120
- 30
-
-
-
-
- 120
- 30
-
+
+
+ Qt::FocusPolicy::TabFocus
-
-
- 14
-
+
+ 1234
-
- PointingHandCursor
+
+ Qt::AlignmentFlag::AlignCenter
-
- Cancel
+
+
+ -
+
+
+ Make sure control code matches with one in phone screen and enter mobile-ID PIN2-code.
-
- QPushButton {
- border-radius: 2px;
- border: none;
- color: #ffffff;
- background-color: #981E32;
-}
-QPushButton:pressed {
- background-color: #F24A66;
-}
-QPushButton:hover:!pressed {
- background-color: #CD2541;
-}
+
+ Qt::AlignmentFlag::AlignCenter
-
- CANCEL
+
+ true
-
- false
+
+ true
+ -
+
+
-
+
+
+
+ 0
+ 40
+
+
+
+ 75
+
+
+ 0
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+ false
+
+
+ %v sec
+
+
+
+
+
+ -
+
+
+ PointingHandCursor
+
+
+ Cancel
+
+
+ false
+
+
+
diff --git a/client/dialogs/PinPopup.cpp b/client/dialogs/PinPopup.cpp
index a869ffb17..e1f779904 100644
--- a/client/dialogs/PinPopup.cpp
+++ b/client/dialogs/PinPopup.cpp
@@ -19,25 +19,22 @@
#include "PinPopup.h"
#include "ui_PinPopup.h"
-#include "Styles.h"
#include "SslCertificate.h"
#include "effects/Overlay.h"
#include
#include
-#include
#include
#include
#include
#include
PinPopup::PinPopup(PinFlags flags, const SslCertificate &c, TokenFlags count, QWidget *parent)
- : PinPopup(flags, c.toString(c.showCN() ? QStringLiteral("CN, serialNumber") : QStringLiteral("GN SN, serialNumber")), count, parent)
+ : PinPopup(flags, c.toString(c.showCN() ? QStringLiteral("CN, serialNumber") : QStringLiteral("GN SN, serialNumber")), count, parent)
{
if(c.type() & SslCertificate::TempelType)
{
- regexp.setPattern(QStringLiteral("^.{4,}$"));
- ui->pin->setValidator(new QRegularExpressionValidator(regexp, ui->pin));
+ regexp->setRegularExpression(QRegularExpression(QStringLiteral("^.{4,}$")));
ui->pin->setMaxLength(32767);
}
}
@@ -48,50 +45,45 @@ PinPopup::PinPopup(PinFlags flags, const QString &title, TokenFlags count, QWidg
{
ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint);
+#ifdef Q_OS_WIN
+ ui->buttonLayout->setDirection(QBoxLayout::RightToLeft);
+#endif
for(QLineEdit *w: findChildren())
w->setAttribute(Qt::WA_MacShowFocusRect, false);
+ ui->pin->setValidator(regexp = new QRegularExpressionValidator(ui->pin));
new Overlay(this);
- ui->labelNameId->setFont(Styles::font(Styles::Regular, 20, QFont::DemiBold));
- ui->label->setFont(Styles::font(Styles::Regular, 14));
- ui->ok->setFont(Styles::font(Styles::Condensed, 14));
- ui->cancel->setFont(ui->ok->font());
-
connect( ui->ok, &QPushButton::clicked, this, &PinPopup::accept );
connect( ui->cancel, &QPushButton::clicked, this, &PinPopup::reject );
connect( this, &PinPopup::finished, this, &PinPopup::close );
connect(ui->pin, &QLineEdit::returnPressed, ui->ok, &QPushButton::click);
- if(text.isEmpty())
+ if(!text.isEmpty())
+ ui->labelPin->hide();
+ else if( flags & Pin2Type )
{
- if(count & PinFinalTry)
- text += QStringLiteral("%1
").arg(tr("PIN will be locked next failed attempt"));
- else if(count & PinCountLow)
- text += QStringLiteral("%1
").arg(tr("PIN has been entered incorrectly at least once"));
-
- if( flags & Pin2Type )
- {
- QString t = flags & PinpadFlag ?
- tr("For using sign certificate enter PIN2 at the reader") :
- tr("For using sign certificate enter PIN2");
- text += tr("Selected action requires sign certificate.") + QLatin1String("
") + t;
- setPinLen(5);
- }
- else
- {
- QString t = flags & PinpadFlag ?
- tr("For using authentication certificate enter PIN1 at the reader") :
- tr("For using authentication certificate enter PIN1");
- text += tr("Selected action requires authentication certificate.") + QLatin1String("
") + t;
- setPinLen(4);
- }
+ text = tr("Selected action requires sign certificate.");
+ ui->labelPin->setText(flags & PinpadFlag ?
+ tr("For using sign certificate enter PIN2 at the reader") :
+ tr("For using sign certificate enter PIN2"));
+ setPinLen(5);
}
- ui->labelNameId->setText(QStringLiteral("%1").arg(title));
- ui->label->setText( text );
-
- QTextDocument doc;
- doc.setHtml(ui->labelNameId->text() + "\n" + ui->label->text());
- ui->pin->setAccessibleName(doc.toPlainText());
+ else
+ {
+ text = tr("Selected action requires authentication certificate.");
+ ui->labelPin->setText(flags & PinpadFlag ?
+ tr("For using authentication certificate enter PIN1 at the reader") :
+ tr("For using authentication certificate enter PIN1"));
+ setPinLen(4);
+ }
+ ui->label->setText(title);
+ ui->text->setText(text);
+ if(count & PinFinalTry)
+ ui->errorPin->setText(tr("PIN will be locked next failed attempt"));
+ else if(count & PinCountLow)
+ ui->errorPin->setText(tr("PIN has been entered incorrectly at least once"));
+ else
+ ui->errorPin->hide();
if(flags & PinpadChangeFlag)
{
@@ -101,7 +93,7 @@ PinPopup::PinPopup(PinFlags flags, const QString &title, TokenFlags count, QWidg
auto *movie = new QSvgWidget(QStringLiteral(":/images/wait.svg"), this);
movie->setFixedSize(ui->pin->size().height(), ui->pin->size().height());
movie->show();
- ui->PinPopupLayout->addWidget(movie, 0, Qt::AlignCenter);
+ ui->layoutContent->addWidget(movie, 0, Qt::AlignCenter);
}
if( flags & PinpadFlag )
{
@@ -114,7 +106,7 @@ PinPopup::PinPopup(PinFlags flags, const QString &title, TokenFlags count, QWidg
progress->setTextVisible( false );
progress->resize( 200, 30 );
progress->move( 153, 122 );
- ui->PinPopupLayout->addWidget(progress);
+ ui->layoutContent->addWidget(progress);
auto *statusTimer = new QTimeLine(progress->maximum() * 1000, this);
statusTimer->setEasingCurve(QEasingCurve::Linear);
statusTimer->setFrameRange( progress->maximum(), progress->minimum() );
@@ -124,15 +116,13 @@ PinPopup::PinPopup(PinFlags flags, const QString &title, TokenFlags count, QWidg
else
{
ui->pin->setFocus();
- ui->pin->setValidator(new QRegularExpressionValidator(regexp, ui->pin));
ui->pin->setMaxLength( 12 );
connect(ui->pin, &QLineEdit::textEdited, this, [&](const QString &text) {
- ui->ok->setEnabled(regexp.match(text).hasMatch());
+ ui->ok->setEnabled(regexp->regularExpression().match(text).hasMatch());
});
- ui->label->setBuddy( ui->pin );
+ ui->text->setBuddy( ui->pin );
ui->ok->setDisabled(true);
}
- adjustSize();
}
PinPopup::~PinPopup()
@@ -142,8 +132,8 @@ PinPopup::~PinPopup()
void PinPopup::setPinLen(unsigned long minLen, unsigned long maxLen)
{
- QString charPattern = regexp.pattern().startsWith(QLatin1String("^.")) ? QStringLiteral(".") : QStringLiteral("\\d");
- regexp.setPattern(QStringLiteral("^%1{%2,%3}$").arg(charPattern).arg(minLen).arg(maxLen));
+ QString charPattern = regexp->regularExpression().pattern().startsWith(QLatin1String("^.")) ? QStringLiteral(".") : QStringLiteral("\\d");
+ regexp->setRegularExpression(QRegularExpression(QStringLiteral("^%1{%2,%3}$").arg(charPattern).arg(minLen).arg(maxLen)));
}
QString PinPopup::pin() const { return ui->pin->text(); }
diff --git a/client/dialogs/PinPopup.h b/client/dialogs/PinPopup.h
index 01aa979af..cfcb2b88b 100644
--- a/client/dialogs/PinPopup.h
+++ b/client/dialogs/PinPopup.h
@@ -23,12 +23,11 @@
#include "WaitDialog.h"
-#include
-
namespace Ui {
class PinPopup;
}
+class QRegularExpressionValidator;
class SslCertificate;
class PinPopup final : public QDialog
@@ -67,7 +66,7 @@ class PinPopup final : public QDialog
private:
Ui::PinPopup *ui;
- QRegularExpression regexp;
+ QRegularExpressionValidator *regexp {};
WaitDialogHider hider;
};
diff --git a/client/dialogs/PinPopup.ui b/client/dialogs/PinPopup.ui
index 784c2fcd7..a4f254fe0 100644
--- a/client/dialogs/PinPopup.ui
+++ b/client/dialogs/PinPopup.ui
@@ -3,180 +3,207 @@
PinPopup
- Qt::WindowModal
+ Qt::WindowModality::WindowModal
0
0
- 495
- 220
+ 430
+ 348
- QDialog {
-border-radius: 2px;
+ QWidget {
+font-family: Roboto, Helvetica;
+font-size: 14px;
+}
+#PinPopup {
background-color: #FFFFFF;
+border-radius: 4px;
+}
+#label {
+color: #003168;
+font-size: 20px;
+font-weight: 700;
+}
+#labelPin {
+color: #07142A;
+}
+#errorPin {
+color: #AD2A45;
+}
+QLineEdit {
+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;
+border-color: #2F70B6;
+background-color: #2F70B6;
+}
+QPushButton:default:hover {
+background-color: #2B66A6;
+}
+QPushButton:default:pressed {
+background-color: #215081;
+}
+QPushButton:default:disabled {
+background-color: #2F70B6;
}
-
+
- 20
+ 40
+
+
+ QLayout::SizeConstraint::SetFixedSize
- 20
+ 40
- 10
+ 32
- 20
+ 40
- 30
+ 32
-
-
+
- 0
- 24
+ 350
+ 0
-
-
- 14
-
-
- Qt::TabFocus
-
-
- color: #041E42; border: none;
+ Qt::FocusPolicy::TabFocus
<b>Mari Maasikas,</b> 48405050123
- Qt::AlignCenter
-
-
-
- -
-
-
- Qt::TabFocus
-
-
- color: #000000;
-line-height: 15px;
-border: none;
-
-
- You need to use a personal identification certificate for the selected activity. Enter PIN1 to use the certificate
-
-
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
true
-
- pin
-
- -
-
-
-
- 141
- 30
-
-
-
-
- 11
-
-
-
- QLineEdit
-{
-padding: 0px 10px;
-border: 1px solid #8E969D;
-border-radius: 2px;
-background-color: #ffffff;
-color: #000000;
-line-height: 9px;
-text-align: center;
-}
-
-
- QLineEdit::Password
-
-
- Qt::AlignCenter
+
-
+
+
+ 24
-
+ -
+
+
+ Qt::FocusPolicy::TabFocus
+
+
+ You need to use a personal identification certificate for the selected activity.
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+ true
+
+
+
+ -
+
+
+ 6
+
+
-
+
+
+ Enter PIN1 to use the certificate
+
+
+ pin
+
+
+
+ -
+
+
+ QLineEdit::EchoMode::Password
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+
+
+
-
- 15
-
-
- 100
-
-
- 100
+ 0
-
- 120
- 32
-
-
-
-
- 120
- 16777215
+ 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::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
-
@@ -184,37 +211,12 @@ QPushButton:hover:!pressed {
- 120
- 32
+ 100
+ 40
-
-
- 120
- 16777215
-
-
-
-
- 14
-
-
-
- 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;
-}
+
+ PointingHandCursor
OK
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..a59f540a7 100644
--- a/client/dialogs/PinUnblock.ui
+++ b/client/dialogs/PinUnblock.ui
@@ -3,373 +3,281 @@
PinUnblock
- Qt::WindowModal
+ Qt::WindowModality::WindowModal
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: #07142A;
+}
+#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: 12px 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;
+border-color: #2F70B6;
+background-color: #2F70B6;
+}
+QPushButton:default:hover {
+background-color: #2B66A6;
+}
+QPushButton:default:pressed {
+background-color: #215081;
+}
+QPushButton:default:disabled {
+background-color: #2F70B6;
}
- 10
+ 40
+
+
+ QLayout::SizeConstraint::SetFixedSize
- 30
+ 40
- 26
+ 32
- 30
+ 40
- 26
+ 32
-
-
-
-
- Roboto
- 20
- false
-
+
+
+
+ 350
+ 0
+
- Qt::TabFocus
-
-
- border: none;
-color: #041E42;
-line-height: 24px;
+ Qt::FocusPolicy::TabFocus
%1 code change
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
+
- 0
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- 15
- 0
-
-
-
-
- 15
- 16777215
-
-
-
- •
-
-
- Qt::RichText
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
-
-
- -
-
-
-
- Roboto
- 14
- false
-
-
-
- Qt::TabFocus
-
-
- Qt::RichText
-
-
- true
-
-
- true
-
-
-
- -
-
-
-
- 15
- 0
-
-
-
-
- 15
- 16777215
-
-
-
- •
-
-
- Qt::RichText
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
-
-
- -
-
-
-
- Roboto
- 14
- false
-
-
-
- Qt::TabFocus
-
-
- Qt::RichText
-
-
- true
-
-
- true
-
-
-
- -
-
-
-
- 15
- 0
-
-
-
-
- 15
- 16777215
-
-
-
- •
-
-
- 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
+ 0
-
- 60
-
-
-
-
-
-
- 12
-
+
-
+
+
+
+ 15
+ 0
+
-
- Valid puk code
+
+
+ 15
+ 16777215
+
- VALID PUK CODE
+ •
-
- puk
+
+ Qt::TextFormat::RichText
+
+
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
- -
-
-
-
- 0
- 0
-
+
-
+
+
+ Qt::FocusPolicy::TabFocus
+
+
+ Qt::TextFormat::RichText
+
+ true
+
+
+ true
+
+
+
+ -
+
- 0
- 34
+ 15
+ 0
- 16777215
+ 15
16777215
-
- Qt::LeftToRight
+
+ •
+
+
+ Qt::TextFormat::RichText
+
+
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
+
+
+
+ -
+
+
+ Qt::FocusPolicy::TabFocus
+
+
+ Qt::TextFormat::RichText
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+
+ 15
+ 0
+
+
+
+
+ 15
+ 16777215
+
-
+ •
-
- QLineEdit::Password
+
+ Qt::TextFormat::RichText
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
+
+
+
+ -
+
+
+ Qt::FocusPolicy::TabFocus
+
+
+ Qt::TextFormat::RichText
+
+
+ true
+
+
+ true
-
-
-
-
- 12
-
-
-
- color: #c53e3e
-
-
- Qt::AlignCenter
+
+
+ 6
-
+
-
+
+
+ Current PUK code
+
+
+ puk
+
+
+
+ -
+
+
+ QLineEdit::EchoMode::Password
+
+
+
+ -
+
+
+
-
-
- -
-
-
- 2
-
-
-
+
- 2
-
-
- 60
-
-
- 60
+ 6
-
-
-
- 12
-
-
- NEW %1 CODE
+ New %1 code
pin
@@ -378,73 +286,25 @@ line-height: 24px;
-
-
-
- 0
- 0
-
-
-
-
- 0
- 32
-
-
-
-
- 16777215
- 16777215
-
-
- QLineEdit::Password
+ QLineEdit::EchoMode::Password
+ -
+
+
-
-
-
-
- 12
-
-
-
- color: #c53e3e
-
-
- Qt::AlignCenter
-
-
-
-
-
- -
-
-
- 2
-
-
-
-
+
- 2
-
-
- 60
-
-
- 60
+ 6
-
-
-
- 12
-
-
- NEW %1 CODE AGAIN
+ Repeat new %1 code
repeat
@@ -453,86 +313,30 @@ line-height: 24px;
-
-
-
- 0
- 34
-
-
- QLineEdit::Password
+ QLineEdit::EchoMode::Password
+ -
+
+
- -
-
-
-
- 12
-
-
-
- color: #c53e3e
-
-
- Qt::AlignCenter
-
-
-
-
- 40
-
-
- 60
-
-
0
-
- 60
-
-
-
-
- 120
- 34
-
-
-
-
- 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
@@ -540,44 +344,25 @@ line-height: 24px;
-
-
-
+
+
+ Qt::Orientation::Horizontal
+
+
- 120
- 34
+ 40
+ 20
-
-
- 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..362e31a2b 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,27 +32,16 @@ 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);
+ d->buttonLayout->setDirection(QBoxLayout::RightToLeft);
#endif
setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint);
for(QLineEdit *w: findChildren())
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..4d32b2331 100644
--- a/client/dialogs/RoleAddressDialog.ui
+++ b/client/dialogs/RoleAddressDialog.ui
@@ -3,361 +3,252 @@
RoleAddressDialog
- Qt::WindowModal
+ Qt::WindowModality::WindowModal
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: #07142A;
+}
+#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: 12px 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;
+border-color: #2F70B6;
+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::SizeConstraint::SetFixedSize
- 25
+ 40
- 16
+ 32
- 25
+ 40
- 16
+ 32
-
-
-
-
- 18
-
-
-
- Qt::TabFocus
-
-
- margin:0px; color: #041E42;
-
-
- Enter your role and address info
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 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
+ 350
0
-
- State
-
-
- State
-
-
-
- -
-
-
-
- 0
- 34
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
- Country
-
-
- Country
-
-
-
- -
-
-
-
- 0
- 34
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
+
+ Qt::FocusPolicy::TabFocus
- Zip
-
-
- Zip
+ Enter your role and address info
-
-
- -
-
-
-
- 0
- 34
-
+
+ Qt::AlignmentFlag::AlignCenter
-
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 25
-
+
+
+ 24
-
+
-
+
+
+ 6
+
+
-
+
+
+ Role / resolution
+
+
+ Role
+
+
+
+ -
+
+
+
+
+ -
+
+
+ 6
+
+
-
+
+
+ City
+
+
+ City
+
+
+
+ -
+
+
+
+
+ -
+
+
+ 6
+
+
-
+
+
+ State
+
+
+ State
+
+
+
+ -
+
+
+
+
+ -
+
+
+ 6
+
+
-
+
+
+ Country
+
+
+ Country
+
+
+
+ -
+
+
+
+
+ -
+
+
+ 6
+
+
-
+
+
+ Zip
+
+
+ Zip
+
+
+
+ -
+
+
+
+
+
-
-
+
- 6
-
-
- 25
-
-
- 25
+ 0
-
-
-
- 0
- 0
-
-
-
-
- 0
- 34
-
-
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;
-}
-
- CANCEL
+ Cancel
-
-
-
-
- 0
- 0
-
+
+
+ Qt::Orientation::Horizontal
-
+
- 0
- 34
+ 40
+ 20
+
+
+ -
+
PointingHandCursor
-
- Sign
-
- SIGN
+ Sign
true
diff --git a/client/dialogs/SmartIDDialog.cpp b/client/dialogs/SmartIDDialog.cpp
index 8ea8aec9a..9f6f79422 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);
#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..00691b4d4 100644
--- a/client/dialogs/SmartIDDialog.ui
+++ b/client/dialogs/SmartIDDialog.ui
@@ -3,14 +3,14 @@
SmartIDDialog
- Qt::WindowModal
+ Qt::WindowModality::WindowModal
0
0
- 382
- 301
+ 430
+ 455
@@ -18,45 +18,54 @@
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: #07142A;
}
#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,57 +81,98 @@ 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: 12px 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;
+border-color: #2F70B6;
+background-color: #2F70B6;
+}
+QPushButton:default:hover {
+background-color: #2B66A6;
+}
+QPushButton:default:pressed {
+background-color: #215081;
+}
+QPushButton:default:disabled {
+background-color: #2F70B6;
}
- 0
+ 40
+
+
+ QLayout::SizeConstraint::SetFixedSize
- 30
+ 40
- 30
+ 32
- 30
+ 40
- 30
+ 32
-
-
-
-
- 14
-
+
+
+
+ 350
+ 0
+
- Qt::TabFocus
-
-
- color: #041E42;
+ Qt::FocusPolicy::TabFocus
Enter your personal code to sign with Smart-ID
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
true
@@ -130,167 +180,119 @@ image: url(:/images/icon_checkbox_check.png);
-
-
-
- Qt::Vertical
-
-
-
- 0
- 8
-
-
-
-
- -
-
-
-
- 12
-
-
-
- Country
-
-
- idCountry
-
-
-
- -
-
-
-
- 0
- 34
-
+
+
+ 24
-
-
- Estonia
-
+
+
+ 6
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+ Country
+
+
+ idCountry
+
+
+
+ -
+
+
-
+
+ Estonia
+
+
+ -
+
+ Lithuania
+
+
+ -
+
+ Latvia
+
+
+
+
+
-
-
- Lithuania
-
+
+
+ 6
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+ Personal code
+
+
+ idCode
+
+
+
+ -
+
+
+ 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
-
-
-
-
- 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
@@ -298,43 +300,25 @@ QPushButton:hover:!pressed {
-
-
-
+
+
+ Qt::Orientation::Horizontal
+
+
- 0
- 30
+ 40
+ 20
-
-
- 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 +330,6 @@ QPushButton:disabled {
-
- CheckBox
- QCheckBox
-
-
ComboBox
QComboBox
diff --git a/client/dialogs/SmartIDProgress.cpp b/client/dialogs/SmartIDProgress.cpp
index 72b5a0287..da2070fa8 100644
--- a/client/dialogs/SmartIDProgress.cpp
+++ b/client/dialogs/SmartIDProgress.cpp
@@ -23,7 +23,6 @@
#include "Application.h"
#include "CheckConnection.h"
#include "Settings.h"
-#include "Styles.h"
#include "Utils.h"
#include "dialogs/WarningDialog.h"
@@ -82,13 +81,8 @@ SmartIDProgress::SmartIDProgress(QWidget *parent)
QFile::exists(QStringLiteral("%1/%2.log").arg(QDir::tempPath(), QApplication::applicationName())));
d->setWindowFlags(Qt::Dialog|Qt::CustomizeWindowHint);
d->setupUi(d);
- d->move(parent->geometry().center() - d->geometry().center());
d->signProgressBar->setMaximum(100);
d->code->setBuddy(d->signProgressBar);
- d->code->setFont(Styles::font(Styles::Regular, 48));
- d->info->setFont(Styles::font(Styles::Regular, 14));
- d->controlCode->setFont(d->info->font());
- d->signProgressBar->setFont(d->info->font());
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
const auto styleSheet = R"(QProgressBar {
background-color: #d3d3d3;;
@@ -105,7 +99,6 @@ background-color: #007aff;
})";
d->signProgressBar->setStyleSheet(styleSheet);
#endif
- d->cancel->setFont(Styles::font(Styles::Condensed, 14));
QObject::connect(d->cancel, &QPushButton::clicked, d, &QDialog::reject);
d->statusTimer = new QTimeLine(d->signProgressBar->maximum() * 1000, d);
@@ -293,9 +286,8 @@ std::vector SmartIDProgress::sign(const std::string &method, cons
QByteArray codeDiest = QCryptographicHash::hash(QByteArray::fromRawData((const char*)digest.data(), int(digest.size())), QCryptographicHash::Sha256);
uint code = codeDiest.right(2).toHex().toUInt(nullptr, 16) % 10000;
d->code->setText(QStringLiteral("%1").arg(code, 4, 10, QChar('0')));
- d->info->setText(tr("Make sure control code matches with one in phone screen\n"
- "and enter Smart-ID PIN2-code."));
- d->code->setAccessibleName(QStringLiteral("%1 %2. %3").arg(d->controlCode->text(), d->code->text(), d->info->text()));
+ d->info->setText(tr("Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code."));
+ d->code->setAccessibleName(QStringLiteral("%1 %2. %3").arg(d->label->text(), d->code->text(), d->info->text()));
QJsonObject req{
{"relyingPartyUUID", (d->UUID.isEmpty() ? QStringLiteral("00000000-0000-0000-0000-000000000000") : d->UUID)},
diff --git a/client/images/icon_checkbox.svg b/client/images/icon_checkbox.svg
new file mode 100644
index 000000000..6e829018b
--- /dev/null
+++ b/client/images/icon_checkbox.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/client/images/icon_checkbox_active.svg b/client/images/icon_checkbox_active.svg
new file mode 100644
index 000000000..1a8502a09
--- /dev/null
+++ b/client/images/icon_checkbox_active.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/client/images/icon_checkbox_check.svg b/client/images/icon_checkbox_check.svg
new file mode 100644
index 000000000..415584681
--- /dev/null
+++ b/client/images/icon_checkbox_check.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/client/images/icon_checkbox_check_active.svg b/client/images/icon_checkbox_check_active.svg
new file mode 100644
index 000000000..f57a7f857
--- /dev/null
+++ b/client/images/icon_checkbox_check_active.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/client/images/icon_checkbox_check_disabled.svg b/client/images/icon_checkbox_check_disabled.svg
new file mode 100644
index 000000000..2d172f2a5
--- /dev/null
+++ b/client/images/icon_checkbox_check_disabled.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/client/images/icon_checkbox_check_hover.svg b/client/images/icon_checkbox_check_hover.svg
new file mode 100644
index 000000000..a9a4b757f
--- /dev/null
+++ b/client/images/icon_checkbox_check_hover.svg
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/client/images/icon_checkbox_disabled.svg b/client/images/icon_checkbox_disabled.svg
new file mode 100644
index 000000000..6e829018b
--- /dev/null
+++ b/client/images/icon_checkbox_disabled.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
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 0896546be..a349a92c3 100644
--- a/client/translations/en.ts
+++ b/client/translations/en.ts
@@ -1666,14 +1666,6 @@ ID-CARD
Remember me
Remember me
-
- CANCEL
- CANCEL
-
-
- SIGN
- SIGN
-
Personal code is not valid
Personal code is not valid
@@ -1684,12 +1676,10 @@ ID-CARD
Cancel
- accessible
Cancel
Sign
- accessible
Sign
@@ -1711,10 +1701,6 @@ ID-CARD
MobileProgress
-
- CANCEL
- CANCEL
-
Signing in process
Signing in process
@@ -1736,10 +1722,8 @@ ID-CARD
User is not a mobile-ID client
- Make sure control code matches with one in phone screen
-and enter mobile-ID PIN2-code.
- Make sure control code matches with one in phone screen
-and enter mobile-ID PIN2-code.
+ Make sure control code matches with one in phone screen and enter mobile-ID PIN2-code.
+ Make sure control code matches with one in phone screen and enter mobile-ID PIN2-code.
Control code:
@@ -1755,7 +1739,6 @@ and enter mobile-ID PIN2-code.
Cancel
- accessible
Cancel
@@ -1799,10 +1782,8 @@ and enter mobile-ID PIN2-code.
Service result:
- Make sure control code matches with one in phone screen
-and enter Smart-ID PIN2-code.
- Make sure control code matches with one in phone screen
-and enter Smart-ID PIN2-code.
+ Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code.
+ Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code.
Failed to sign container. Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a>
@@ -1910,14 +1891,6 @@ and enter Smart-ID PIN2-code.
PinPopup
-
- You need to use a personal identification certificate for the selected activity. Enter PIN1 to use the certificate
- You need to use a personal identification certificate for the selected activity. Enter PIN1 to use the certificate
-
-
- CANCEL
- CANCEL
-
PIN will be locked next failed attempt
PIN will be locked next failed attempt
@@ -1952,24 +1925,19 @@ and enter Smart-ID PIN2-code.
Cancel
- accessible
Cancel
-
-
- PinUnblock
- VALID PUK CODE
- CURRENT PUK CODE
+ You need to use a personal identification certificate for the selected activity.
+ You need to use a personal identification certificate for the selected activity.
- CANCEL
- CANCEL
-
-
- UNBLOCK
- UNBLOCK
+ Enter PIN1 to use the certificate
+ Enter PIN1 to use the certificate
+
+
+ PinUnblock
PIN2 code is used to digitally sign documents.
PIN2 code is used to digitally sign documents.
@@ -1986,22 +1954,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
@@ -2036,19 +1988,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.
@@ -2105,6 +2050,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
@@ -2323,18 +2284,10 @@ and enter Smart-ID PIN2-code.
Zip
Zip
-
- SIGN
- SIGN
-
Sign
Sign
-
- CANCEL
- CANCEL
-
Cancel
Cancel
@@ -2920,14 +2873,6 @@ Additional licenses and components
SmartIDDialog
-
- SIGN
- SIGN
-
-
- CANCEL
- CANCEL
-
Personal code
Personal code
@@ -2962,12 +2907,10 @@ Additional licenses and components
Cancel
- accessible
Cancel
Sign
- accessible
Sign
diff --git a/client/translations/et.ts b/client/translations/et.ts
index 0e115047a..91ef7c91f 100644
--- a/client/translations/et.ts
+++ b/client/translations/et.ts
@@ -1660,20 +1660,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
@@ -1684,12 +1676,10 @@ ID-KAARDIGA
Cancel
- accessible
Katkesta
Sign
- accessible
Allkirjastan
@@ -1711,10 +1701,6 @@ ID-KAARDIGA
MobileProgress
-
- CANCEL
- KATKESTA
-
Signing in process
Toimub allkirjastamine
@@ -1736,10 +1722,8 @@ ID-KAARDIGA
Kasutaja ei ole mobiil-ID klient
- Make sure control code matches with one in phone screen
-and enter mobile-ID PIN2-code.
- Veendu kontrollkoodi õigsuses
-ja sisesta telefonil mobiil-ID PIN2-kood.
+ Make sure control code matches with one in phone screen and enter mobile-ID PIN2-code.
+ Veendu kontrollkoodi õigsuses ja sisesta telefonil mobiil-ID PIN2-kood.
Control code:
@@ -1755,7 +1739,6 @@ ja sisesta telefonil mobiil-ID PIN2-kood.
Cancel
- accessible
Katkesta
@@ -1799,10 +1782,8 @@ ja sisesta telefonil mobiil-ID PIN2-kood.
Teenuse vastus/tulemus:
- Make sure control code matches with one in phone screen
-and enter Smart-ID PIN2-code.
- Veendu kontrollkoodi õigsuses
-ja sisesta nutiseadmes Smart-ID PIN2-kood.
+ Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code.
+ Veendu kontrollkoodi õigsuses ja sisesta nutiseadmes Smart-ID PIN2-kood.
Failed to sign container. Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a>
@@ -1910,14 +1891,6 @@ ja sisesta nutiseadmes Smart-ID PIN2-kood.
PinPopup
-
- You need to use a personal identification certificate for the selected activity. Enter PIN1 to use the certificate
- Valitud tegevuse jaoks on vaja kasutada isikutuvastuse sertifikaati.<br/>Sertifikaadi kasutamiseks sisesta PIN1
-
-
- CANCEL
- KATKESTA
-
PIN will be locked next failed attempt
Vale koodi sisestamisel PIN lukustub
@@ -1952,24 +1925,19 @@ ja sisesta nutiseadmes Smart-ID PIN2-kood.
Cancel
- accessible
Katkesta
-
-
- PinUnblock
-
- VALID PUK CODE
- KEHTIV PUK-KOOD
-
- CANCEL
- KATKESTA
+ You need to use a personal identification certificate for the selected activity.
+ Valitud tegevuse jaoks on vaja kasutada isikutuvastuse sertifikaati.
- UNBLOCK
- BLOKEERI LAHTI
+ Enter PIN1 to use the certificate
+ Sertifikaadi kasutamiseks sisesta PIN1
+
+
+ PinUnblock
PIN2 code is used to digitally sign documents.
PIN2-koodi kasutatakse digitaalallkirja andmiseks.
@@ -1986,22 +1954,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
@@ -2036,19 +1988,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.
@@ -2105,6 +2050,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
@@ -2323,18 +2284,10 @@ ja sisesta nutiseadmes Smart-ID PIN2-kood.
Zip
Postikood
-
- SIGN
- ALLKIRJASTAN
-
Sign
Allkirjastan
-
- CANCEL
- KATKESTA
-
Cancel
Katkesta
@@ -2920,14 +2873,6 @@ Täiendavad litsentsid ja komponendid
SmartIDDialog
-
- SIGN
- ALLKIRJASTA
-
-
- CANCEL
- KATKESTA
-
Personal code
Isikukood
@@ -2962,12 +2907,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 f45ccb8a0..d8631c195 100644
--- a/client/translations/ru.ts
+++ b/client/translations/ru.ts
@@ -1667,14 +1667,6 @@ ID-КАРТОЙ
Remember me
Запомнить меня
-
- CANCEL
- ОТМЕНА
-
-
- SIGN
- ПОДПИСЬ
-
Personal code is not valid
Личный код недействителен
@@ -1685,12 +1677,10 @@ ID-КАРТОЙ
Cancel
- accessible
Отмена
Sign
- accessible
Подписать
@@ -1712,10 +1702,6 @@ ID-КАРТОЙ
MobileProgress
-
- CANCEL
- ОТМЕНА
-
Signing in process
Подписывание
@@ -1737,10 +1723,8 @@ ID-КАРТОЙ
Пользователь не является клиентом mobiil-ID
- Make sure control code matches with one in phone screen
-and enter mobile-ID PIN2-code.
- Убедитесь в правильности контрольного кодa
-и введите PIN2-код для mobiil-ID.
+ Make sure control code matches with one in phone screen and enter mobile-ID PIN2-code.
+ Убедитесь в правильности контрольного кодaи введите PIN2-код для mobiil-ID.
Control code:
@@ -1756,7 +1740,6 @@ and enter mobile-ID PIN2-code.
Cancel
- accessible
Отмена
@@ -1800,10 +1783,8 @@ and enter mobile-ID PIN2-code.
Ответ/результат услуги:
- Make sure control code matches with one in phone screen
-and enter Smart-ID PIN2-code.
- Убедитесь в правильности контрольного кодa
-и введите PIN2-код для Smart-ID.
+ Make sure control code matches with one in phone screen and enter Smart-ID PIN2-code.
+ Убедитесь в правильности контрольного кодa и введите PIN2-код для Smart-ID.
Failed to sign container. Check your %1 service access settings. <a href="https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/">Additional information</a>
@@ -1911,14 +1892,6 @@ and enter Smart-ID PIN2-code.
PinPopup
-
- You need to use a personal identification certificate for the selected activity. Enter PIN1 to use the certificate
- Для выбранного действия необходима идентификация личности.<br/>Для использования сертификата идентификации введите PIN1
-
-
- CANCEL
- ОТМЕНА
-
PIN will be locked next failed attempt
PIN будет заблокирован при следующей неудачной попытке
@@ -1953,24 +1926,19 @@ and enter Smart-ID PIN2-code.
Cancel
- accessible
Отмена
-
-
- PinUnblock
- VALID PUK CODE
- ДЕЙСТВУЮЩИЙ PUK-КОД
+ You need to use a personal identification certificate for the selected activity.
+ Для выбранного действия необходима идентификация личности.
- CANCEL
- ОТМЕНИТЬ
-
-
- UNBLOCK
- РАЗБЛОКИРОВАТЬ
+ Enter PIN1 to use the certificate
+ Для использования сертификата идентификации введите PIN1
+
+
+ PinUnblock
PIN2 code is used to digitally sign documents.
PIN2-код используется для дигитальной подписи.
@@ -1987,22 +1955,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
@@ -2037,19 +1989,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 раза подряд.
@@ -2106,6 +2051,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
@@ -2324,18 +2285,10 @@ and enter Smart-ID PIN2-code.
Zip
Индекс
-
- SIGN
- ПОДПИСАТЬ
-
Sign
Подписать
-
- CANCEL
- ОТМЕНА
-
Cancel
Отмена
@@ -2921,14 +2874,6 @@ Additional licenses and components
SmartIDDialog
-
- SIGN
- ПОДПИСАТЬ
-
-
- CANCEL
- ОТМЕНА
-
Personal code
Личный код
@@ -2963,12 +2908,10 @@ Additional licenses and components
Cancel
- accessible
Отмена
Sign
- accessible
Подписать
diff --git a/client/widgets/ComboBox.cpp b/client/widgets/ComboBox.cpp
index 5204bedc7..f420924c8 100644
--- a/client/widgets/ComboBox.cpp
+++ b/client/widgets/ComboBox.cpp
@@ -28,33 +28,34 @@ 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());
+ b->setMinimumHeight(height());
connect(b, &QPushButton::clicked, this, [this, index]{ setCurrentIndex(index); hidePopup(); });
l->addWidget(b);
return b;