mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-04 14:46:09 -05:00
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:
@@ -469,6 +469,7 @@ OBSBasic::OBSBasic(QWidget *parent)
|
||||
&OBSBasic::BroadcastButtonClicked);
|
||||
|
||||
UpdatePreviewSafeAreas();
|
||||
UpdatePreviewSpacingHelpers();
|
||||
}
|
||||
|
||||
static void SaveAudioDevice(const char *name, int channel, obs_data_t *parent,
|
||||
@@ -4246,6 +4247,9 @@ void OBSBasic::RenderMain(void *data, uint32_t cx, uint32_t cy)
|
||||
RenderSafeAreas(window->rightLine, targetCX, targetCY);
|
||||
}
|
||||
|
||||
if (window->drawSpacingHelpers)
|
||||
window->ui->preview->DrawSpacingHelpers();
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
gs_projection_pop();
|
||||
@@ -10177,3 +10181,9 @@ QColor OBSBasic::GetHoverColor() const
|
||||
return QColor::fromRgb(0, 127, 255);
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::UpdatePreviewSpacingHelpers()
|
||||
{
|
||||
drawSpacingHelpers = config_get_bool(
|
||||
App()->GlobalConfig(), "BasicWindow", "SpacingHelpersEnabled");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user