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/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 74cb9b6bb..7b0ae0b06 100644 --- a/client/images/images.qrc +++ b/client/images/images.qrc @@ -22,7 +22,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 529ea2902..7ea79dc3a 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 @@ -2924,14 +2914,6 @@ Additional licenses and components SmartIDDialog - - SIGN - SIGN - - - CANCEL - CANCEL - Personal code Personal code @@ -2966,12 +2948,10 @@ Additional licenses and components Cancel - accessible Cancel Sign - accessible Sign diff --git a/client/translations/et.ts b/client/translations/et.ts index 542c9dfef..96a31dd9f 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 @@ -2924,14 +2914,6 @@ Täiendavad litsentsid ja komponendid SmartIDDialog - - SIGN - ALLKIRJASTA - - - CANCEL - KATKESTA - Personal code Isikukood @@ -2966,12 +2948,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 93c9afc45..e5f41ec17 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 Подписать @@ -2925,14 +2915,6 @@ Additional licenses and components SmartIDDialog - - SIGN - ПОДПИСАТЬ - - - CANCEL - ОТМЕНА - Personal code Личный код @@ -2967,12 +2949,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(); });