mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-01 12:15:27 -06:00
stylesheets: fix color settings
This commit is contained in:
parent
a0176775ff
commit
0020359b8f
@ -749,6 +749,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> xSettings, const
|
|||||||
// colorize preview icons
|
// colorize preview icons
|
||||||
auto addColoredIcon = [&](QPushButton *button, const QColor& color, const QIcon& icon = QIcon(), const QColor& iconColor = QColor()){
|
auto addColoredIcon = [&](QPushButton *button, const QColor& color, const QIcon& icon = QIcon(), const QColor& iconColor = QColor()){
|
||||||
QLabel* text = new QLabel(button->text());
|
QLabel* text = new QLabel(button->text());
|
||||||
|
text->setObjectName("color_button");
|
||||||
text->setAlignment(Qt::AlignCenter);
|
text->setAlignment(Qt::AlignCenter);
|
||||||
text->setAttribute(Qt::WA_TransparentForMouseEvents, true);
|
text->setAttribute(Qt::WA_TransparentForMouseEvents, true);
|
||||||
if (icon.isNull())
|
if (icon.isNull())
|
||||||
@ -762,7 +763,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> xSettings, const
|
|||||||
button->setIcon(gui_settings::colorizedIcon(icon, iconColor, color));
|
button->setIcon(gui_settings::colorizedIcon(icon, iconColor, color));
|
||||||
}
|
}
|
||||||
button->setText("");
|
button->setText("");
|
||||||
button->setStyleSheet("text-align:left;");
|
button->setStyleSheet(styleSheet().append("text-align:left;"));
|
||||||
button->setLayout(new QGridLayout);
|
button->setLayout(new QGridLayout);
|
||||||
button->layout()->setContentsMargins(0, 0, 0, 0);
|
button->layout()->setContentsMargins(0, 0, 0, 0);
|
||||||
button->layout()->addWidget(text);
|
button->layout()->addWidget(text);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user