Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/ui/dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ CertificateButton #warn, CertificateWidget #warn {
color: #F54A67;
}
QLineEdit {
background-color: rgba(255,255,255,0.1);
border-color: #008EEA;
border-color: #909299;
color: #FFFFFF;
}
QLineEdit[warning="true"] {
border-color: #F54A67;
color: #F54A67;
border-color: #FF5C79;
}
QProgressBar {
background-color: rgba(255,255,255,0.1);
Expand All @@ -52,7 +51,7 @@ color: #FFFFFF;
color: white;
}
#pinErrorLabel {
color: #F54A67;
color: #FF5C79;
}
#aboutContent {
border-color: #4E4E53;
Expand Down
64 changes: 13 additions & 51 deletions src/ui/dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,16 @@ CertificateButton #warn, CertificateWidget #warn {
color: #CD2541;
}
QLineEdit {
border: 2px solid #113F8E;
color: #113F8E;
border-radius: 3px;
min-width: 200px;
min-height: 45px;
max-width: 200px;
max-height: 45px;
font-size: 26px;
font-weight: bold;
padding-right: 14px;
padding-left: 14px;
padding-top: 0px;
padding-bottom: 0px;
border: 1px solid #C4CBD8;
color: #607496;
border-radius: 8px;
font-size: 16px;
padding: 10px 14px;
lineedit-password-character: 42;
}
QLineEdit[warning="true"] {
border: 2px solid #CD2541;
color: #CD2541;
border: 1px solid #AD2A45;
color: #07142A;
}
QProgressBar {
height: 30px;
Expand All @@ -132,10 +124,12 @@ color: #003168;
font-weight: bold;
max-height: 20px;
}
#pinTitleLabel, #pinErrorLabel {
max-height: 20px;
#pinTitleLabel {
font-size: 14px;
color: #07142A;
}
#pinErrorLabel {
font-size: 14px;
color: #CD2541;
}
#fatalError {
Expand Down Expand Up @@ -569,29 +563,19 @@ border-radius: 4px;</string>
<item>
<layout class="QVBoxLayout" name="pinLayout">
<property name="spacing">
<number>10</number>
<number>6</number>
</property>
<item>
<widget class="QLabel" name="pinTitleLabel">
<property name="font">
<font>
<family>Roboto</family>
<pointsize>-1</pointsize>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Enter PIN1 for authentication</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="buddy">
<cstring>pinInput</cstring>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<item>
<widget class="QLineEdit" name="pinInput">
<property name="maxLength">
<number>12</number>
Expand All @@ -603,21 +587,12 @@ border-radius: 4px;</string>
</item>
<item>
<widget class="QLabel" name="pinErrorLabel">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="text">
<string notr="true">2 tries left</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
Expand All @@ -640,19 +615,6 @@ border-radius: 4px;</string>
</property>
</widget>
</item>
<item>
<spacer name="pinSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
Expand Down
3 changes: 3 additions & 0 deletions src/ui/images/alert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/ui/images/alert_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/ui/webeiddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ using namespace electronic_id;
class WebEidDialog::Private : public Ui::WebEidDialog
{
public:
observer_ptr<QSvgWidget> pinInputAlert;
observer_ptr<QRegularExpressionValidator> pinInputValidator;
observer_ptr<QTimeLine> pinTimeoutTimer;
observer_ptr<QButtonGroup> selectionGroup;
Expand Down Expand Up @@ -103,6 +104,15 @@ WebEidDialog::WebEidDialog(QWidget* parent) : WebEidUI(parent), ui(new Private)
auto pinInputFont = ui->pinInput->font();
pinInputFont.setLetterSpacing(QFont::AbsoluteSpacing, 2);
ui->pinInput->setFont(pinInputFont);
ui->pinInputAlert = new QSvgWidget(ui->pinInput);
ui->pinInputAlert->load(Application::isDarkTheme() ? u":/images/alert_dark.svg"_s
: u":/images/alert.svg"_s);
ui->pinInputAlert->setFixedSize(20, 20);
ui->pinInputAlert->hide();
auto *pinInputLayout = new QHBoxLayout(ui->pinInput);
pinInputLayout->setContentsMargins(10, 10, 10, 10);
pinInputLayout->setSpacing(0);
pinInputLayout->addWidget(ui->pinInputAlert, 0, Qt::AlignRight);

ui->waitingSpinner->load(Application::isDarkTheme() ? u":/images/wait_dark.svg"_s
: u":/images/wait.svg"_s);
Expand Down Expand Up @@ -701,6 +711,7 @@ void WebEidDialog::showPinInputWarning(bool show)
{
style()->unpolish(ui->pinInput);
ui->pinInput->setProperty("warning", show);
ui->pinInputAlert->setVisible(show);
style()->polish(ui->pinInput);
}

Expand Down
Loading