UI: Add scene item canvas overflow to preview
This commit is contained in:
parent
a249d26eaa
commit
f095cb2d0e
11 changed files with 290 additions and 3 deletions
|
|
@ -3278,6 +3278,16 @@ void OBSBasic::RenderMain(void *data, uint32_t cx, uint32_t cy)
|
|||
gs_viewport_push();
|
||||
gs_projection_push();
|
||||
|
||||
QSize previewSize = GetPixelSize(window->ui->preview);
|
||||
float right = float(previewSize.width()) - window->previewX;
|
||||
float bottom = float(previewSize.height()) - window->previewY;
|
||||
|
||||
gs_ortho(-window->previewX, right,
|
||||
-window->previewY, bottom,
|
||||
-100.0f, 100.0f);
|
||||
|
||||
window->ui->preview->DrawOverflow();
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
gs_ortho(0.0f, float(ovi.base_width), 0.0f, float(ovi.base_height),
|
||||
|
|
@ -3287,6 +3297,7 @@ void OBSBasic::RenderMain(void *data, uint32_t cx, uint32_t cy)
|
|||
|
||||
window->DrawBackdrop(float(ovi.base_width), float(ovi.base_height));
|
||||
|
||||
|
||||
if (window->IsPreviewProgramMode()) {
|
||||
OBSScene scene = window->GetCurrentScene();
|
||||
obs_source_t *source = obs_scene_get_source(scene);
|
||||
|
|
@ -3299,9 +3310,6 @@ void OBSBasic::RenderMain(void *data, uint32_t cx, uint32_t cy)
|
|||
|
||||
/* --------------------------------------- */
|
||||
|
||||
QSize previewSize = GetPixelSize(window->ui->preview);
|
||||
float right = float(previewSize.width()) - window->previewX;
|
||||
float bottom = float(previewSize.height()) - window->previewY;
|
||||
|
||||
gs_ortho(-window->previewX, right,
|
||||
-window->previewY, bottom,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue