Fix icon color

This commit is contained in:
Exeldro 2024-07-29 13:21:27 +02:00
parent a175a158bb
commit e4ad8f712b
No known key found for this signature in database
GPG Key ID: 97269A83FC715751
2 changed files with 28 additions and 28 deletions

View File

@ -105,21 +105,22 @@ OBSBasicSettings::OBSBasicSettings(QMainWindow *parent) : QDialog(parent)
buttonLayout->setSpacing(8);
buttonLayout->setAlignment(Qt::AlignCenter);
auto mainButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsMainOutputsButton")), QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
auto verticalButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsVerticalOutputsButton")), QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
auto helpButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsHelpButton")), main_window->property("defaultIcon").value<QIcon>());
generalMainButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsMainOutputsButton")),
QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
generalVerticalButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsVerticalOutputsButton")),
QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
generalHelpButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsHelpButton")),
main_window->property("defaultIcon").value<QIcon>());
buttonLayout->addWidget(mainButton, 0);
buttonLayout->addWidget(verticalButton, 0);
buttonLayout->addWidget(helpButton, 0);
buttonLayout->addWidget(generalMainButton, 0);
buttonLayout->addWidget(generalVerticalButton, 0);
buttonLayout->addWidget(generalHelpButton, 0);
buttonGroupBox->setLayout(buttonLayout);
generalPageLayout->addWidget(infoBox, 0);
generalPageLayout->addWidget(buttonGroupBox, 1);
QScrollArea *scrollArea = new QScrollArea;
scrollArea->setWidget(generalPage);
scrollArea->setWidgetResizable(true);
@ -337,17 +338,11 @@ OBSBasicSettings::OBSBasicSettings(QMainWindow *parent) : QDialog(parent)
setLayout(vlayout);
// Button connects for general page, clean this up in the future when we abstract pages
connect(mainButton, &QPushButton::clicked, [this] {
listWidget->setCurrentRow(1);
});
connect(generalMainButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(1); });
connect(verticalButton, &QPushButton::clicked, [this] {
listWidget->setCurrentRow(2);
});
connect(generalVerticalButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(2); });
connect(helpButton, &QPushButton::clicked, [this] {
listWidget->setCurrentRow(listWidget->count() - 1);
});
connect(generalHelpButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(listWidget->count() - 1); });
}
OBSBasicSettings::~OBSBasicSettings()
@ -407,6 +402,8 @@ void OBSBasicSettings::SetStreamIcon(const QIcon &icon)
{
listWidget->item(1)->setIcon(icon);
listWidget->item(2)->setIcon(icon);
generalVerticalButton->setIcon(icon);
generalMainButton->setIcon(icon);
}
void OBSBasicSettings::SetOutputIcon(const QIcon &icon)

View File

@ -54,6 +54,9 @@ private:
QTextEdit *troubleshooterText;
QPushButton *verticalAddButton;
QToolButton *generalMainButton;
QToolButton *generalVerticalButton;
QToolButton *generalHelpButton;
private slots:
void SetGeneralIcon(const QIcon &icon);