mirror of
https://github.com/Aitum/obs-aitum-multistream.git
synced 2024-11-22 02:12:40 +01:00
Fix icon color
This commit is contained in:
parent
a175a158bb
commit
e4ad8f712b
@ -90,36 +90,37 @@ OBSBasicSettings::OBSBasicSettings(QMainWindow *parent) : QDialog(parent)
|
|||||||
QWidget *generalPage = new QWidget;
|
QWidget *generalPage = new QWidget;
|
||||||
auto generalPageLayout = new QVBoxLayout;
|
auto generalPageLayout = new QVBoxLayout;
|
||||||
generalPage->setLayout(generalPageLayout);
|
generalPage->setLayout(generalPageLayout);
|
||||||
|
|
||||||
auto infoBox = ConfigUtils::generateSettingsGroupBox(QString::fromUtf8(obs_module_text("WelcomeTitle")));
|
auto infoBox = ConfigUtils::generateSettingsGroupBox(QString::fromUtf8(obs_module_text("WelcomeTitle")));
|
||||||
infoBox->setStyleSheet("padding-top: 12px");
|
infoBox->setStyleSheet("padding-top: 12px");
|
||||||
auto infoLayout = new QVBoxLayout;
|
auto infoLayout = new QVBoxLayout;
|
||||||
infoBox->setLayout(infoLayout);
|
infoBox->setLayout(infoLayout);
|
||||||
|
|
||||||
auto infoLabel = new QLabel(QString::fromUtf8(obs_module_text("WelcomeText")));
|
auto infoLabel = new QLabel(QString::fromUtf8(obs_module_text("WelcomeText")));
|
||||||
infoLabel->setWordWrap(true);
|
infoLabel->setWordWrap(true);
|
||||||
infoLayout->addWidget(infoLabel, 1);
|
infoLayout->addWidget(infoLabel, 1);
|
||||||
|
|
||||||
auto buttonGroupBox = new QWidget();
|
auto buttonGroupBox = new QWidget();
|
||||||
auto buttonLayout = new QHBoxLayout;
|
auto buttonLayout = new QHBoxLayout;
|
||||||
buttonLayout->setSpacing(8);
|
buttonLayout->setSpacing(8);
|
||||||
buttonLayout->setAlignment(Qt::AlignCenter);
|
buttonLayout->setAlignment(Qt::AlignCenter);
|
||||||
|
|
||||||
auto mainButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsMainOutputsButton")), QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
|
generalMainButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsMainOutputsButton")),
|
||||||
auto verticalButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsVerticalOutputsButton")), QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
|
QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
|
||||||
auto helpButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsHelpButton")), main_window->property("defaultIcon").value<QIcon>());
|
generalVerticalButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsVerticalOutputsButton")),
|
||||||
|
QIcon(QString::fromUtf8(":/settings/images/settings/stream.svg")));
|
||||||
buttonLayout->addWidget(mainButton, 0);
|
generalHelpButton = ConfigUtils::generateMenuButton(QString::fromUtf8(obs_module_text("SettingsHelpButton")),
|
||||||
buttonLayout->addWidget(verticalButton, 0);
|
main_window->property("defaultIcon").value<QIcon>());
|
||||||
buttonLayout->addWidget(helpButton, 0);
|
|
||||||
|
buttonLayout->addWidget(generalMainButton, 0);
|
||||||
|
buttonLayout->addWidget(generalVerticalButton, 0);
|
||||||
|
buttonLayout->addWidget(generalHelpButton, 0);
|
||||||
|
|
||||||
buttonGroupBox->setLayout(buttonLayout);
|
buttonGroupBox->setLayout(buttonLayout);
|
||||||
|
|
||||||
generalPageLayout->addWidget(infoBox, 0);
|
generalPageLayout->addWidget(infoBox, 0);
|
||||||
generalPageLayout->addWidget(buttonGroupBox, 1);
|
generalPageLayout->addWidget(buttonGroupBox, 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QScrollArea *scrollArea = new QScrollArea;
|
QScrollArea *scrollArea = new QScrollArea;
|
||||||
scrollArea->setWidget(generalPage);
|
scrollArea->setWidget(generalPage);
|
||||||
scrollArea->setWidgetResizable(true);
|
scrollArea->setWidgetResizable(true);
|
||||||
@ -335,19 +336,13 @@ OBSBasicSettings::OBSBasicSettings(QMainWindow *parent) : QDialog(parent)
|
|||||||
vlayout->addLayout(contentLayout);
|
vlayout->addLayout(contentLayout);
|
||||||
vlayout->addLayout(bottomLayout);
|
vlayout->addLayout(bottomLayout);
|
||||||
setLayout(vlayout);
|
setLayout(vlayout);
|
||||||
|
|
||||||
// Button connects for general page, clean this up in the future when we abstract pages
|
// Button connects for general page, clean this up in the future when we abstract pages
|
||||||
connect(mainButton, &QPushButton::clicked, [this] {
|
connect(generalMainButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(1); });
|
||||||
listWidget->setCurrentRow(1);
|
|
||||||
});
|
connect(generalVerticalButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(2); });
|
||||||
|
|
||||||
connect(verticalButton, &QPushButton::clicked, [this] {
|
connect(generalHelpButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(listWidget->count() - 1); });
|
||||||
listWidget->setCurrentRow(2);
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(helpButton, &QPushButton::clicked, [this] {
|
|
||||||
listWidget->setCurrentRow(listWidget->count() - 1);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OBSBasicSettings::~OBSBasicSettings()
|
OBSBasicSettings::~OBSBasicSettings()
|
||||||
@ -407,6 +402,8 @@ void OBSBasicSettings::SetStreamIcon(const QIcon &icon)
|
|||||||
{
|
{
|
||||||
listWidget->item(1)->setIcon(icon);
|
listWidget->item(1)->setIcon(icon);
|
||||||
listWidget->item(2)->setIcon(icon);
|
listWidget->item(2)->setIcon(icon);
|
||||||
|
generalVerticalButton->setIcon(icon);
|
||||||
|
generalMainButton->setIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OBSBasicSettings::SetOutputIcon(const QIcon &icon)
|
void OBSBasicSettings::SetOutputIcon(const QIcon &icon)
|
||||||
|
@ -54,6 +54,9 @@ private:
|
|||||||
QTextEdit *troubleshooterText;
|
QTextEdit *troubleshooterText;
|
||||||
|
|
||||||
QPushButton *verticalAddButton;
|
QPushButton *verticalAddButton;
|
||||||
|
QToolButton *generalMainButton;
|
||||||
|
QToolButton *generalVerticalButton;
|
||||||
|
QToolButton *generalHelpButton;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void SetGeneralIcon(const QIcon &icon);
|
void SetGeneralIcon(const QIcon &icon);
|
||||||
|
Loading…
Reference in New Issue
Block a user