diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index cd6219fe..1e6cabc3 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -89,11 +89,13 @@ AdvSceneSwitcher.macroTab.expandAll="Expand all" AdvSceneSwitcher.macroTab.collapseAll="Collapse all" AdvSceneSwitcher.macroTab.maximize="Maximize" AdvSceneSwitcher.macroTab.minimize="Minimize" +AdvSceneSwitcher.macroTab.highlightSettings="Visual settings" +AdvSceneSwitcher.macroTab.hotkeySettings="Hotkey settings" AdvSceneSwitcher.macroTab.highlightExecutedMacros="Highlight recently executed macros" AdvSceneSwitcher.macroTab.highlightTrueConditions="Highlight conditions of currently selected macro that evaluated to true recently" AdvSceneSwitcher.macroTab.highlightPerformedActions="Highlight recently performed actions of currently selected macro" -AdvSceneSwitcher.macroTab.newMacroRegisterHotkey="Register hotkeys to control pause state of new macros" -AdvSceneSwitcher.macroTab.currentDisableHotkeys="Register hotkeys to control pause state of selected macro" +AdvSceneSwitcher.macroTab.newMacroRegisterHotkey="Register hotkeys to control the pause state of new macros" +AdvSceneSwitcher.macroTab.currentDisableHotkeys="Register hotkeys to control the pause state of selected macro" ; Macro List AdvSceneSwitcher.macroList.deleted="deleted" diff --git a/src/macro-core/macro-properties.cpp b/src/macro-core/macro-properties.cpp index bbcd6ec7..c8bf6d7b 100644 --- a/src/macro-core/macro-properties.cpp +++ b/src/macro-core/macro-properties.cpp @@ -1,6 +1,7 @@ #include "macro-properties.hpp" #include +#include #include #include @@ -45,40 +46,46 @@ MacroPropertiesDialog::MacroPropertiesDialog(QWidget *parent, setModal(true); setWindowModality(Qt::WindowModality::WindowModal); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - setFixedWidth(555); - setMinimumHeight(100); + setMinimumWidth(500); + setMinimumHeight(300); + + auto highlightOptions = new QGroupBox( + obs_module_text("AdvSceneSwitcher.macroTab.highlightSettings")); + QVBoxLayout *highlightLayout = new QVBoxLayout; + highlightLayout->addWidget(_executed); + highlightLayout->addWidget(_conditions); + highlightLayout->addWidget(_actions); + highlightOptions->setLayout(highlightLayout); + + auto hotkeyOptions = new QGroupBox( + obs_module_text("AdvSceneSwitcher.macroTab.hotkeySettings")); + QVBoxLayout *hotkeyLayout = new QVBoxLayout; + hotkeyLayout->addWidget(_newMacroRegisterHotkeys); + hotkeyLayout->addWidget(_currentMacroRegisterHotkeys); + hotkeyOptions->setLayout(hotkeyLayout); + + QDialogButtonBox *buttonbox = new QDialogButtonBox( + QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + buttonbox->setCenterButtons(true); + connect(buttonbox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonbox, &QDialogButtonBox::rejected, this, &QDialog::reject); + + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(highlightOptions); + layout->addWidget(hotkeyOptions); + layout->addWidget(buttonbox); + setLayout(layout); _executed->setChecked(prop._highlightExecuted); _conditions->setChecked(prop._highlightConditions); _actions->setChecked(prop._highlightActions); _newMacroRegisterHotkeys->setChecked(prop._newMacroRegisterHotkeys); - if (macro) { + if (macro && !macro->IsGroup()) { _currentMacroRegisterHotkeys->setChecked( macro->PauseHotkeysEnabled()); } else { - _currentMacroRegisterHotkeys->hide(); + hotkeyOptions->hide(); } - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(_executed); - layout->addWidget(_conditions); - layout->addWidget(_actions); - layout->addWidget(_newMacroRegisterHotkeys); - if (macro) { - QFrame *line = new QFrame(); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); - layout->addWidget(line); - } - layout->addWidget(_currentMacroRegisterHotkeys); - setLayout(layout); - - QDialogButtonBox *buttonbox = new QDialogButtonBox( - QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - layout->addWidget(buttonbox); - buttonbox->setCenterButtons(true); - connect(buttonbox, &QDialogButtonBox::accepted, this, &QDialog::accept); - connect(buttonbox, &QDialogButtonBox::rejected, this, &QDialog::reject); } bool MacroPropertiesDialog::AskForSettings(QWidget *parent, diff --git a/src/macro-core/macro-properties.hpp b/src/macro-core/macro-properties.hpp index 812af8ab..45305597 100644 --- a/src/macro-core/macro-properties.hpp +++ b/src/macro-core/macro-properties.hpp @@ -6,7 +6,6 @@ #include #include -// Global macro properties class MacroProperties { public: void Save(obs_data_t *obj) const; @@ -18,7 +17,7 @@ public: bool _newMacroRegisterHotkeys = true; }; -// Dialog for configuring global and macro specific settings +// Dialog for configuring global and individual macro specific settings class MacroPropertiesDialog : public QDialog { Q_OBJECT