From 01a3a6c81a6f22661656e7fddd251d204f53b901 Mon Sep 17 00:00:00 2001
From: dustinface <35775977+xdustinface@users.noreply.github.com>
Date: Sun, 13 Sep 2020 00:48:23 +0200
Subject: [PATCH] qt: Finetune ModalOverlay (#3699)
* qt: Align warning icon in ModalOverlay properly with the text
* qt: Center form layout in modaloverlay
---
src/qt/forms/modaloverlay.ui | 8 ++++----
src/qt/modaloverlay.cpp | 2 +-
src/qt/res/css/general.css | 7 +++----
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/qt/forms/modaloverlay.ui b/src/qt/forms/modaloverlay.ui
index fd32f8c901..b2e6a3a01f 100644
--- a/src/qt/forms/modaloverlay.ui
+++ b/src/qt/forms/modaloverlay.ui
@@ -79,10 +79,7 @@
0
-
-
-
- false
-
+
@@ -172,6 +169,9 @@
QFormLayout::FieldsStayAtSizeHint
+
+ Qt::AlignHCenter|Qt::AlignTop
+
6
diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp
index 746dc701b1..b09afbe2f6 100644
--- a/src/qt/modaloverlay.cpp
+++ b/src/qt/modaloverlay.cpp
@@ -31,7 +31,7 @@ foreverHidden(false)
ui->labelEstimatedTimeLeft,
}, GUIUtil::FontWeight::Bold);
- GUIUtil::setIcon(ui->warningIcon, "warning", GUIUtil::ThemedColor::ORANGE, QSize(48, 48));
+ ui->warningIcon->setPixmap(GUIUtil::getIcon("warning", GUIUtil::ThemedColor::ORANGE).pixmap(48, 48));
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(closeClicked()));
if (parent) {
diff --git a/src/qt/res/css/general.css b/src/qt/res/css/general.css
index e7b22b6dd8..949d347657 100644
--- a/src/qt/res/css/general.css
+++ b/src/qt/res/css/general.css
@@ -1231,11 +1231,10 @@ QWidget#bgWidget { /* The frame overlaying the overview-page */
padding-right: 10px;
}
-QWidget#bgWidget .QPushButton#warningIcon {
+QWidget#bgWidget .QLabel#warningIcon {
background-color: #00000000;
- width: 64px;
- height: 64px;
- padding: 5px;
+ margin-left: 10px;
+ margin-right: 10px;
}
QWidget#contentWidget { /* The actual content with the text/buttons/etc... */