From 0020359b8fbb98e225fac9522c2592f7b0fcb133 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 15 Aug 2017 23:03:30 +0200 Subject: [PATCH] stylesheets: fix color settings --- rpcs3/rpcs3qt/settings_dialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index f80eb0505c..48912ddc1f 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -749,6 +749,7 @@ settings_dialog::settings_dialog(std::shared_ptr xSettings, const // colorize preview icons auto addColoredIcon = [&](QPushButton *button, const QColor& color, const QIcon& icon = QIcon(), const QColor& iconColor = QColor()){ QLabel* text = new QLabel(button->text()); + text->setObjectName("color_button"); text->setAlignment(Qt::AlignCenter); text->setAttribute(Qt::WA_TransparentForMouseEvents, true); if (icon.isNull()) @@ -762,7 +763,7 @@ settings_dialog::settings_dialog(std::shared_ptr xSettings, const button->setIcon(gui_settings::colorizedIcon(icon, iconColor, color)); } button->setText(""); - button->setStyleSheet("text-align:left;"); + button->setStyleSheet(styleSheet().append("text-align:left;")); button->setLayout(new QGridLayout); button->layout()->setContentsMargins(0, 0, 0, 0); button->layout()->addWidget(text);