UI: Show spacing helpers in preview
This shows distance between sides of preview and edges of sources. This will allow users to more easily align sources. Co-authored-by: Palakis <contact@slepin.fr>
This commit is contained in:
parent
728d919bde
commit
2d6a9c9cc1
8 changed files with 339 additions and 0 deletions
|
|
@ -407,6 +407,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
HookWidget(ui->overflowSelectionHide,CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->previewSafeAreas, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->automaticSearch, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->previewSpacingHelpers,CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->doubleClickSwitch, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->studioPortraitLayout, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
HookWidget(ui->prevProgLabelToggle, CHECK_CHANGED, GENERAL_CHANGED);
|
||||
|
|
@ -1310,6 +1311,10 @@ void OBSBasicSettings::LoadGeneralSettings()
|
|||
GetGlobalConfig(), "BasicWindow", "WarnBeforeStartingStream");
|
||||
ui->warnBeforeStreamStart->setChecked(warnBeforeStreamStart);
|
||||
|
||||
bool spacingHelpersEnabled = config_get_bool(
|
||||
GetGlobalConfig(), "BasicWindow", "SpacingHelpersEnabled");
|
||||
ui->previewSpacingHelpers->setChecked(spacingHelpersEnabled);
|
||||
|
||||
bool warnBeforeStreamStop = config_get_bool(
|
||||
GetGlobalConfig(), "BasicWindow", "WarnBeforeStoppingStream");
|
||||
ui->warnBeforeStreamStop->setChecked(warnBeforeStreamStop);
|
||||
|
|
@ -3121,6 +3126,14 @@ void OBSBasicSettings::SaveGeneralSettings()
|
|||
ui->previewSafeAreas->isChecked());
|
||||
main->UpdatePreviewSafeAreas();
|
||||
}
|
||||
|
||||
if (WidgetChanged(ui->previewSpacingHelpers)) {
|
||||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"SpacingHelpersEnabled",
|
||||
ui->previewSpacingHelpers->isChecked());
|
||||
main->UpdatePreviewSpacingHelpers();
|
||||
}
|
||||
|
||||
if (WidgetChanged(ui->doubleClickSwitch))
|
||||
config_set_bool(GetGlobalConfig(), "BasicWindow",
|
||||
"TransitionOnDoubleClick",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue