diff --git a/config-dialog.cpp b/config-dialog.cpp index 61906b7..751c695 100644 --- a/config-dialog.cpp +++ b/config-dialog.cpp @@ -453,29 +453,43 @@ void OBSBasicSettings::AddServer(QFormLayout *outputsLayout, obs_data_t *setting // Advanced settings const bool advanced = obs_data_get_bool(settings, "advanced"); auto advancedGroup = new QGroupBox(QString::fromUtf8(obs_module_text("AdvancedGroupHeader"))); - advancedGroup->setAlignment(Qt::AlignRight); advancedGroup->setContentsMargins(0, 4, 0, 0); + advancedGroup->setStyleSheet("QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top right; padding: 12px 18px 0 0; }" - "QGroupBox { padding-top: 4px; padding-bottom: 0 }"); + "QGroupBox { padding-top: 4px; padding-bottom: 0;}"); advancedGroup->setVisible(advanced); auto advancedGroupLayout = new QVBoxLayout; advancedGroup->setLayout(advancedGroupLayout); // Tab widget + // 1 = bg for active tab + pane, 2 = inactive tabs, 3 = tab text colour, 4 = border colour for pane + auto tabStyles = QString("QTabWidget::pane { background: %1; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-right-radius: 4px; margin-top: -1px; padding-top: 8px; border: 1px solid %4; } QTabWidget::tab-bar { margin-bottom: 0; padding-bottom: 0; border-color: %4; } QTabBar::tab { color: %3; padding: 10px; margin-bottom: 0; border: 1px solid %4; } QTabBar::tab:selected { background: %1; font-weight: bold; border-bottom: none; } QTabBar::tab:!selected { background: %2; }") + .arg(palette().color(QPalette::ColorRole::Mid).name(QColor::HexRgb), palette().color(QPalette::ColorRole::Light).name(QColor::HexRgb), palette().color(QPalette::ColorRole::Text).name(QColor::HexRgb), palette().color(QPalette::ColorRole::Light).name(QColor::HexRgb)); + auto advancedTabWidget = new QTabWidget; advancedTabWidget->setContentsMargins(0, 0, 0, 0); advancedTabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + advancedTabWidget->setStyleSheet(tabStyles); +// advancedTabWidget->setStyleSheet("QTabWidget::tab-bar { border: 1px solid gray; }" +// "QTabBar::tab { background: gray; color: white; padding: 10px; }" +// "QTabBar::tab:selected { background: lightgray; }" +// "QTabWidget::pane { border: none; background: pink; }"); +// auto pageStyle = QString("QWidget[page=\"true\"] { border: 1px solid %1; padding-top: 0; margin-top: 0; }") +// .arg(QPalette().color(QPalette::ColorRole::Mid).name(QColor::HexRgb)); +// auto videoPage = new QWidget; videoPage->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - videoPage->setStyleSheet("background: pink"); +// videoPage->setStyleSheet(pageStyle); +// videoPage->setProperty("page", true); auto videoPageLayout = new QFormLayout; videoPage->setLayout(videoPageLayout); auto audioPage = new QWidget; audioPage->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - audioPage->setStyleSheet("background: pink"); +// audioPage->setStyleSheet(pageStyle); +// audioPage->setProperty("page", true); auto audioPageLayout = new QFormLayout; audioPage->setLayout(audioPageLayout); @@ -665,8 +679,8 @@ void OBSBasicSettings::AddServer(QFormLayout *outputsLayout, obs_data_t *setting }); // Hook up - advancedTabWidget->addTab(videoPage, QString::fromUtf8("video")); - advancedTabWidget->addTab(audioPage, QString::fromUtf8("audio")); + advancedTabWidget->addTab(videoPage, QString::fromUtf8(obs_module_text("VideoEncoderSettings"))); + advancedTabWidget->addTab(audioPage, QString::fromUtf8(obs_module_text("AudioEncoderSettings"))); advancedGroupLayout->addWidget(advancedTabWidget, 1); diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index 2a004a0..560be51 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -29,6 +29,8 @@ BackButton="< Back" SaveOutput="Save Output" CreateOutput="Create Output" AdvancedGroupHeader="Advanced Encoding Settings" +VideoEncoderSettings="Video Settings" +AudioEncoderSettings="Audio Settings" # Errors and warnings MainOutputNotActive="Unable to start output. \nThis output is configured to use your main encoder's output (Built-in stream), which is not currently active.\nPlease start your main encoder first."