Commit graph

21 commits

Author SHA1 Message Date
cg2121 b82c8ccdcf UI: Limit preview scrolling
This prevents the preview from being scrolled on forever.
2023-03-11 15:22:23 -08:00
cg2121 b464ba8129 UI: Set min/max zoom levels for preview
Prevents the preview from zooming in or out too far.
Min zoom: 10%
Max zoom: 1000%
2023-03-04 16:31:49 -08:00
derrod 5bdf492f8a UI: Avoid excessive config reads when drawing preview 2023-02-11 15:58:40 -08:00
Clayton Groeneveld 2d6a9c9cc1 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>
2022-07-30 19:41:18 -07:00
VodBox 580ebcc935 UI: Add scene item rotation handle
Add a rotation handle to the scene item selection box that will rotate
the source when clicked and dragged.
2022-07-27 22:40:01 -04:00
VodBox 3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
Ford Smith 3a620c485e UI: Undo/Redo Transformations
Implements undo/redo for transformations of sources, both through
preview and the transformations properties.
2021-03-29 03:06:26 -04:00
Matt Gajownik b2fb0ca07f UI: Don't attempt to resize parent group when changing cursor
Fixes an issue where resizing a source did not resize the parent group.
2021-03-09 21:15:17 +11:00
Matt Gajownik ff23eb4a24 UI: Change cursor when interacting with the preview
Includes move, resize, crop, stretch, box select.
2020-08-23 06:26:56 -07:00
jpark37 c2ddc428b0 UI: Fix warnings for Qt 5.15
AllDockWidgetFeatures is now deprecated. Use underlying values instead.

Use default QFlags constructor instead of nullptr/0.

Use QWheelEvent::angleDelta() in place of orientation() and delta(), and
position() in place of x() and y().
2020-06-21 18:23:05 -07:00
VodBox 128b90af9d UI: Add box select to preview
This change adds the ability to box select by clicking and dragging from
an empty part of the preview.

Shift + Drag add any items in the box to the selection. Alt + Drag will
remove items in the box from the selection. Ctrl + Drag inverts the
selected state for items in the box.
2019-08-17 07:42:14 -07:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000 1b8ecae3b9 UI: Fix potential race condition for hover items
The graphics thread should not be accessing any Qt objects that aren't
guaranteed to exist.  Instead, store the currently hovering list/preview
scene items in the preview class.
2019-02-11 15:30:56 -08:00
jp9000 7068e61fd9 UI: Add OBSBasicPreview::Get helper func 2019-02-11 15:30:56 -08:00
VodBox 6c880fb3c8 UI: Change preview handles/outline and add hover 2019-02-08 20:58:40 +13:00
VodBox f095cb2d0e UI: Add scene item canvas overflow to preview 2019-02-08 20:38:53 +13:00
jp9000 88b6c63964 UI: Add grouping 2018-06-04 04:01:39 -07:00
Joseph El-Khouri 8942c18695 UI: Allow zoom with the scroll wheel
Adds the ability to zoom into the preview when fixed scaling mode is
enabled.

(Edit by Jim: Also now saves zoom and scroll position)

Closes jp9000/obs-studio#917
2017-06-30 20:20:56 -07:00
Ryan Foster be98cee2a0 Fix various typos across multiple modules 2017-04-25 22:39:42 -04:00
Joseph El-Khouri 3b616823a1 UI: Add preview scaling options
Adds preview scaling to the right-click context menu for the preview
pane.  This allows the ability to, for example, zoom the preview and
edit the preview 1:1 (canvas/base resolution).  This was a missing
parity feature.  Additionally, also allows scaling to the
"output/scaled" resolution the program is set to.

When the preview is in scale mode and is the focused widget, you can
hold space and drag with left click to change the zoomed position.

(Notes added by Jim)

Closes jp9000/obs-studio#687
2016-11-09 14:21:47 -08:00
jp9000 01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00
Renamed from obs/window-basic-preview.hpp (Browse further)