Commit graph

99 commits

Author SHA1 Message Date
tytan652 85651a7d4b UI,shared: Move Qt Wrappers to its own directory 2024-06-27 14:09:55 +02:00
cg2121 cd918a7f4c UI: Move projector rename signal
This moves the renaming of projectors from OBSBasic to OBSProjector.
2024-05-11 17:51:47 -07:00
gxalpha ef26f14f18
UI: Replace SIGNAL and SLOT macros for AddProjectorMenuMonitors method
A small refactor of AddProjectorMenuMonitors, as template functions need
to be fully defined in header files.
Also makes the function static as there is no point of it being a
non-static member function. In theory it could also be moved out of
OBSBasic but there isn't really a better place for it so let's leave it
where it is for simplicity.
2023-07-21 13:19:52 +02:00
gxalpha c4d2d98720
UI: Replace SIGNAL and SLOT macros in projectors 2023-07-21 13:16:04 +02:00
derrod dcc07cfe4e clang-format: Set AllowAllConstructorInitializersOnNextLine to false 2023-07-15 16:14:55 -07:00
Richard Stanway 4176f9b13a UI: Fix crash when double-clicking projector
If "transition on double click" was enabled, OBS assumed all double
clicks were going to multiview projectors, which isn't necessarily the
case.
2023-05-13 16:38:09 -07:00
Richard Stanway 1d7c066cf5 UI: Avoid calling libobs functions with null pointers in projectors 2023-04-14 15:50:59 -07:00
cg2121 3a610c698e UI: Remove UNUSED_PARAMETER where unnecessary
Since cpp allows removing the unused parameters from the function name,
UNUSED_PARAMETER is not needed, unless it is in an ifdef.
2023-04-01 16:54:02 -07:00
cg2121 0553ddcec0 UI: Use weak source for projectors
The projectors were holding on to a reference of a source, even
if the source was deleted.
2022-11-17 18:41:23 -05:00
gxalpha 6f50aac941
UI: Use correct key for "Always on Top" with projectors 2022-10-24 20:47:47 +02:00
Richard Stanway 21c711d46b UI: Ignore left-click on non-multiview projectors
Fixes a crash that could occur after having both multiview and
non-multiview projectors active.
2022-09-17 16:19:24 -07:00
Richard Stanway ac55328e7f UI: Simplify multiview projector removal 2022-08-24 05:33:47 -07:00
Richard Stanway 5e6cbebcb9 UI: Remove allProjectors list
Seems like this wasn't used anywhere and projectors were not being
removed on destruction, resulting in a memory leak.
2022-08-24 05:33:47 -07:00
gxalpha 05c6a408e3 UI: Fix Qt 6 position deprecations 2022-07-22 09:37:17 -04:00
Colin Edwards 50372164d0 UI: Move multiview render into a new class
Co-authored-by: tt2468 <tt2468@irltoolkit.com>
2022-07-10 13:45:43 +10:00
cg2121 66341c7568 UI: Fix handling of remove signal with projectors
Since the remove signal is coming from another thread,
QMetaObject::invokeMethod has to be used, or corruption
could possibly occur.
2022-03-10 12:15:30 -08:00
Exeldro f8c2ccc2c3 UI: Add mulitiview layout options without program 2022-03-08 12:30:19 -08:00
Sebastian Beckmann 77dbe44da4
UI: Properly close projector when source is removed (#5171) 2022-01-29 15:36:38 -08:00
Richard Stanway 076cd5d5d4 UI: Add option to hide OBS windows on Windows
This uses the SetWindowDisplayAffinity API to hide windows from capture
applications (including OBS). This is not perfect - internal windows
such as context menus, combo box dropdowns, etc will still be displayed.
Even with these limitations, it should help people with single monitors
capture content with less interference from the OBS window.

This implementation is for Windows only but the code is generic enough
that adding other platforms should be straightforward.
2022-01-22 15:14:16 -08:00
univrsal aebd261ded UI: Disable WA_PaintOnScreen for projectors
Removing this attribute fixes #3582 and allows projector windows to be resized
under KDE.
2022-01-07 15:40:05 -08:00
Norihiro Kamae e7cfaa0def UI: Fix label offset on projector view
Labels on 18-scene multiview were skewed. This commit adjusted the
location of the labels.
2022-01-07 15:17:20 -08:00
VodBox 3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
Clayton Groeneveld afd58a78e5 UI: Add option to draw safe areas in preview 2021-08-20 15:20:59 -07:00
Delta a64328da56
UI: Add "18 Scenes" multiview option
Adds a "18 Scenes" multiview option. The 18 scene view leaves the
preview and program sized to the upper half of the window

Settings index in combobox may not match up with enum index. Settings
in the dropdown can now be ordered separately from the enum order.
2021-07-20 17:16:44 +12:00
PatTheMav 9ac92f61be
UI: Use macOS app icon for Qt app on macOS 2020-11-13 17:17:45 +01:00
Clayton Groeneveld 1eba0827b7 UI: Fix projector not working on secondary monitors
This fixes a bug where the projector wouldn't work on secondary
monitors on Windows.
2020-08-24 02:02:07 -05:00
Clayton Groeneveld 846c3d5acc UI: Delete projector when monitor is disconnected 2020-07-08 07:40:51 -07:00
Bennik2000 d8c215df0e UI: Add always on top checkbox to projector context menu
This checkbox overrides the global always on top setting
2020-06-26 05:59:17 -07:00
Scratch 5421851526 UI: Add window projector option "fit to content"
Adds an option to the context menu of a windowed projector to allow
resizing the aspect ratio of the client area of the window to the
contents of what's being projected (so that there's no extra space).
2020-06-24 13:18:52 -07:00
Jim dd12488700
Merge pull request #3066 from cg2121/fix-always-on-top
UI: Fix projector always on top not working on Linux
2020-06-21 05:50:08 -07:00
Clayton Groeneveld 777d9eb787 UI: Auto update projector settings 2020-06-13 21:00:55 -05:00
Clayton Groeneveld 87965dff59 UI: Fix projector always on top not working on Linux 2020-06-13 20:10:38 -05:00
Ed Maste 7325eace24 UI: Fix projector on other than primary display
Calling showFullScreen after setGeometry puts the projector on the
expected monitor.  Previously (on FreeBSD, at least) it opened on the
primary display.
2020-04-12 18:43:23 -04:00
Richard Stanway dca5f2fcdb UI: Properly apply hide cursor on fullscreen projectors
If a projector was created fullscreen, the isFullScreen() call would
fail since the window hasn't been displayed by Qt yet, resulting in the
cursor hiding choice not being applied. This moves the cursor hiding
into the SetMonitor call which is used for all code paths creating a
fullscreen projector, ensuring the setting is applied.

Fixes https://github.com/obsproject/obs-studio/issues/2687
2020-04-10 00:32:09 +02:00
VodBox 62c7eb489d UI: Set correct window title for fullscreen projector
Before this change, opening up a fullscreen projector would have the
wrong window title (Windowed Projector). This was because the call to
update the window title was called before a monitor is set, and the
title is determined by whether a monitor is set.

This change moves the update title call to after the geometry or monitor
gets set, ensuring the window title is correct.
2020-03-22 22:59:27 +13:00
Matt Gajownik f302a98f8d UI: Fix windowed multiview title 2020-03-09 14:23:09 +11:00
Clayton Groeneveld e832b42f07 UI: Add ability to change projector type 2019-10-21 23:48:58 -05:00
Jim 7ed8f05f21
Merge pull request #2106 from cg2121/fix-preview-bug
UI: Fix issue with preview projector
2019-10-15 22:16:11 -07:00
luz.paz d124e6402c docs/sphinx: Fix various typos
(This modifies UI, libobs, deps/obs-scripting, various cmake files)

Found using:
`codespell -q 3 -S *.ini,./UI/data/locale,./deps/w32-pthreads -L aci,dur,iff,mut,numer,uint`
2019-10-14 17:19:38 -07:00
Clayton Groeneveld 15129b5751 UI: Fix issue with preview projector 2019-10-09 02:43:48 -05: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 74cd1da656 Revert "UI: Use theme colors setting for Projectors too"
This reverts commit 8a22889e3d.

After further usage, result is undesirable.  We don't need the theme
applied to projectors.
2019-06-16 17:43:55 -07:00
James Park 37bf66b9dc UI: Remove unused helper function renderVB
Lambda replacement was added, but old function was left behind.
2019-05-18 22:09:19 -07:00
SuslikV 8a22889e3d UI: Use theme colors setting for Projectors too
Don't override the theme color settings for the Projector.
If required, the background color of the projector can be changed via

OBSProjector {qproperty-...}

record placed after "OBSQTDisplay {qproperty-...}" section in the theme
file (qss).
2019-04-17 07:10:12 -07:00
Clayton Groeneveld 4d908e31d3 UI: Don't hide cursor over multiview
I considered making this an option, but I decided against it because
I felt it wasn't necessary and would make the settings more complex.
Opinions are welcome.
2019-04-09 11:51:41 -05:00
Clayton Groeneveld 2080051b9f UI: Use icons from theme on Linux 2019-03-16 05:41:12 -05:00
Stéphane L a8944d0a34 UI: add a default black background to the PGM output of the multiview 2019-02-02 15:42:12 +01:00
jp9000 87ca80deac UI: Fix infinitely incrementing showing ref 2019-01-13 21:00:46 -08:00
Shaolin f8dfa4cb70 UI: Fix not all projectors using ProjectorAlwaysOnTop 2018-09-04 23:29:37 -03:00
Jim 86b7b0b6d5
Merge pull request #1457 from admshao/fix-projectors-always-on-top
UI: Use AlwaysOnTop option for windowed projectors
2018-08-29 09:08:59 -07:00