use QStringLiteral for constants

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
Rolf Eike Beer 2019-04-01 23:15:23 +02:00 committed by Dirk Hohndel
parent c4c8094e32
commit ee0acb0d40
3 changed files with 18 additions and 15 deletions

View file

@ -154,20 +154,20 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.scrollArea_2->viewport()->setPalette(p);
// GroupBoxes in Gnome3 looks like I'v drawn them...
static const QString gnomeCss(
static const QString gnomeCss = QStringLiteral(
"QGroupBox {"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
" stop: 0 #E0E0E0, stop: 1 #FFFFFF);"
" border: 2px solid gray;"
" border-radius: 5px;"
" margin-top: 1ex;"
"background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
"stop: 0 #E0E0E0, stop: 1 #FFFFFF);"
"border: 2px solid gray;"
"border-radius: 5px;"
"margin-top: 1ex;"
"}"
"QGroupBox::title {"
" subcontrol-origin: margin;"
" subcontrol-position: top center;"
" padding: 0 3px;"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
" stop: 0 #E0E0E0, stop: 1 #FFFFFF);"
"subcontrol-origin: margin;"
"subcontrol-position: top center;"
"padding: 0 3px;"
"background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
"stop: 0 #E0E0E0, stop: 1 #FFFFFF);"
"}");
Q_FOREACH (QGroupBox *box, findChildren<QGroupBox *>()) {
box->setStyleSheet(gnomeCss);