mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-07-02 16:43:08 -05:00
Improve layout spacing for "Recording" action
Some checks are pending
debian-build / build (push) Waiting to run
Check locale / ubuntu64 (push) Waiting to run
Push to master / Check Formatting 🔍 (push) Waiting to run
Push to master / Build Project 🧱 (push) Waiting to run
Push to master / Create Release 🛫 (push) Blocked by required conditions
Some checks are pending
debian-build / build (push) Waiting to run
Check locale / ubuntu64 (push) Waiting to run
Push to master / Check Formatting 🔍 (push) Waiting to run
Push to master / Build Project 🧱 (push) Waiting to run
Push to master / Create Release 🛫 (push) Blocked by required conditions
This commit is contained in:
parent
78fa776ce5
commit
78499bcf5f
|
|
@ -192,10 +192,10 @@ MacroActionRecordEdit::MacroActionRecordEdit(
|
|||
QWidget::connect(_chapterName, SIGNAL(editingFinished()), this,
|
||||
SLOT(ChapterNameChanged()));
|
||||
|
||||
auto mainLayout = new QHBoxLayout;
|
||||
_mainLayout = new QHBoxLayout;
|
||||
PlaceWidgets(
|
||||
obs_module_text("AdvSceneSwitcher.action.recording.layout"),
|
||||
mainLayout,
|
||||
_mainLayout,
|
||||
{{"{{actions}}", _actions},
|
||||
{"{{pauseHint}}", _pauseHint},
|
||||
{"{{splitHint}}", _splitHint},
|
||||
|
|
@ -203,7 +203,7 @@ MacroActionRecordEdit::MacroActionRecordEdit(
|
|||
{"{{recordFileFormat}}", _recordFileFormat},
|
||||
{"{{outputNotActiveHelp}}", _outputNotActiveHelp},
|
||||
{"{{chapterName}}", _chapterName}});
|
||||
setLayout(mainLayout);
|
||||
setLayout(_mainLayout);
|
||||
|
||||
_entryData = entryData;
|
||||
UpdateEntryData();
|
||||
|
|
@ -260,6 +260,15 @@ void MacroActionRecordEdit::SetWidgetVisibility()
|
|||
_entryData->_action == MacroActionRecord::Action::FILE_FORMAT);
|
||||
_chapterName->setVisible(_entryData->_action ==
|
||||
MacroActionRecord::Action::ADD_CHAPTER);
|
||||
const bool hasExtraWidget =
|
||||
_entryData->_action == MacroActionRecord::Action::FOLDER ||
|
||||
_entryData->_action == MacroActionRecord::Action::FILE_FORMAT ||
|
||||
_entryData->_action == MacroActionRecord::Action::ADD_CHAPTER;
|
||||
if (hasExtraWidget) {
|
||||
RemoveStretchIfPresent(_mainLayout);
|
||||
} else {
|
||||
AddStretchIfNecessary(_mainLayout);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroActionRecordEdit::ActionChanged(int value)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,9 @@ private slots:
|
|||
void FormatStringChanged();
|
||||
void ChapterNameChanged();
|
||||
|
||||
protected:
|
||||
private:
|
||||
void SetWidgetVisibility();
|
||||
|
||||
QComboBox *_actions;
|
||||
HelpIcon *_pauseHint;
|
||||
HelpIcon *_splitHint;
|
||||
|
|
@ -74,11 +76,8 @@ protected:
|
|||
HelpIcon *_outputNotActiveHelp;
|
||||
VariableLineEdit *_chapterName;
|
||||
std::shared_ptr<MacroActionRecord> _entryData;
|
||||
|
||||
private:
|
||||
void SetWidgetVisibility();
|
||||
|
||||
QHBoxLayout *_mainLayout;
|
||||
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user