Fix styles for progress dialogs, shutdown window and text selection (#3212)

* Override text selection background color for all text widgets

Otherwie it might become unusable with some system themes

* Fix progress dialogs styling

* Fix shutdown window styling
This commit is contained in:
UdjinM6 2019-11-21 18:02:43 +03:00 committed by GitHub
parent df372ec5f9
commit d475f17bc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 0 deletions

View File

@ -1499,6 +1499,7 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress)
if (nProgress == 0)
{
progressDialog = new QProgressDialog(title, "", 0, 100);
progressDialog->setStyleSheet(GUIUtil::loadStyleSheet());
progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(0);
progressDialog->setCancelButton(0);

View File

@ -107,6 +107,10 @@ font-size:12px;
background-color:#f2f2f2;
}
QWidget { /* override text selection background color for all text widgets */
selection-background-color: #999;
}
/*******************************************************/
QPushButton { /* Global Button Style */
@ -380,10 +384,20 @@ color:#333;
/* DIALOG BOXES */
.QProgressDialog {
background-color: #F8F6F6;
}
QDialog QWidget { /* Remove Annoying Focus Rectangle */
outline: 0;
}
/* SHUTDOWN WINDOW */
QWidget#ShutdownWindow {
background-color: #F8F6F6;
}
/*******************************************************/
/* FILE MENU */

View File

@ -107,6 +107,10 @@ font-size:12px;
background-color:#f2f2f2;
}
QWidget { /* override text selection background color for all text widgets */
selection-background-color: #999;
}
/*******************************************************/
QPushButton { /* Global Button Style */
@ -380,10 +384,20 @@ color:#333;
/* DIALOG BOXES */
.QProgressDialog {
background-color: #F8F6F6;
}
QDialog QWidget { /* Remove Annoying Focus Rectangle */
outline: 0;
}
/* SHUTDOWN WINDOW */
QWidget#ShutdownWindow {
background-color: #F8F6F6;
}
/*******************************************************/
/* FILE MENU */

View File

@ -14,6 +14,7 @@
#include "bitcoingui.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "intro.h"
#include "paymentrequestplus.h"
#include "guiutil.h"
@ -199,6 +200,11 @@ void HelpMessageDialog::on_okButton_accepted()
ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f):
QWidget(parent, f)
{
setObjectName("ShutdownWindow");
/* Open CSS when configured */
this->setStyleSheet(GUIUtil::loadStyleSheet());
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(new QLabel(
tr("%1 is shutting down...").arg(tr(PACKAGE_NAME)) + "<br /><br />" +

View File

@ -366,6 +366,7 @@ void WalletView::showProgress(const QString &title, int nProgress)
if (nProgress == 0)
{
progressDialog = new QProgressDialog(title, "", 0, 100);
progressDialog->setStyleSheet(GUIUtil::loadStyleSheet());
progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(0);
progressDialog->setCancelButton(0);