Commit graph

3486 commits

Author SHA1 Message Date
Warchamp7 8dcfae9a39 UI: Remove unnecessary ProxyStyle usage 2024-05-23 18:55:43 -04:00
Warchamp7 c54393335d UI: Rename MediaSlider to AbsoluteSlider 2024-05-23 18:55:43 -04:00
Warchamp7 aba600cec0 UI: Move VolumeSlider widget to volume control 2024-05-23 18:55:43 -04:00
Warchamp7 132f3f3d69 UI: Adjust Classic theme mixer button styling 2024-05-22 12:15:17 -04:00
Ruwen Hahn 27fa9b1eed UI: Give unnamed settings labels relevant names 2024-05-20 16:11:08 -04:00
Ruwen Hahn a18305dd3f UI: Keep weak stream output ref in status bar
The status bar doesn't currently own its references to outputs, which
can be a problem if streaming outputs are released soon after stream
stop. The Multitrack Video output does exactly that, so the status bar
will sometimes try to access an invalid pointer for updating its stats.
Keeping a weak reference around and upgrading it to collect stats,
similar to how the stats window behaves.
2024-05-17 13:48:32 -04:00
Warchamp7 7843a822e0 UI: Adjust font size on macOS 2024-05-14 17:40:01 -04:00
gxalpha 41650479fe UI: Center preview spacing lines
Currently, the spacing lines begin in the middle of the box and then are
their width wide towards one direction. This means that the larger they
are, the more off-center their middle is.
This commit changes them to start at half their width left/top of the
center and end half the width to the right/bottom of the center, putting
the middle in the center.
2024-05-11 23:12:36 -04:00
gxalpha 67e4853b7d UI: Give private spacing helper sources names 2024-05-11 22:13:42 -04:00
gxalpha 03313a6af4 UI: Fix visibility and lock checkbox styling on system theme
In 7931f2acb8 the classes have been
removed in favor of properties, but this styling change appears to have
been reverted by accident, likely by the theming overhaul.
2024-05-11 21:52:42 -04:00
cg2121 b82a49e881 UI: Use OBSSourceLabel for VolControl
The OBSSourceLabel handles renaming of a source, so we don't have
to use the rename signals for volume controls.
2024-05-11 18:18:13 -07:00
cg2121 272a5edbaa UI: Use vector for volume control signals
This cleans up the volume control code by using a vector for
signals.
2024-05-11 18:18:13 -07: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
cg2121 023d9bd851 UI: Use OBSSourceLabel for item widget labels
This changes the labels for the source tree/visibility item widgets
to use OBSSourceLabel, as it handles the renaming of sources.
2024-05-11 17:35:04 -07:00
Warchamp7 af685be40d UI: Add OS specific theme variables via prefix 2024-05-10 18:39:18 -04:00
gxalpha 79f680cab6 UI: Use weak_source_expired instead of getting the source 2024-05-10 17:42:28 -04:00
tytan652 92822311a8 UI: Improve and update app CMake 3 metainfo file
CMake 2 path have a newer version of this file.

See the following commits for metainfo change details:
- 853ae5ea6e
- 904fe87f83
- 0cc6068ed4
2024-05-10 16:21:36 -04:00
tytan652 0fc4eb8c96 UI: Restore MuteCheckBox indeterminate state icon in Yami 2024-05-06 17:36:57 -03:00
gxalpha fad6f43608 UI: Set default recording format to Fragmented MOV on macOS
In 22205d582c, the change to default to
Fragmented MP4/MOV on all platforms was reverted due to compatibility
issues with the default video player on Windows.
On macOS however, the default player (QuickTime Player) works fine with
fragmented formats, and instead is unable to play MKV files (which have
always been the default format for OBS). This change makes videos with
the default settings playable on macOS with the default player.
2024-05-04 17:20:05 -07:00
Warchamp7 a3876a41d6 UI: Adjust styling of QTabBar tabs 2024-05-04 17:10:26 -07:00
Warchamp7 8721bf6107 UI: Update media source time labels while seeking 2024-05-04 16:37:17 -07:00
Warchamp7 c54f4371d6 UI: Adjust preview scrolling clamp values 2024-05-04 16:17:12 -07:00
Aleks Todorov bad7b78fe4 UI: Fix text stacking in paused indicator
Currently, the paused indicator is never undone, instead relying on the
update timer to eventually erase it away when the recording duration is
updated. If the user spams pause fast enough, the indicator will stack
several times before it is erased - especially if the unpaused branch in
the update timer never has a chance to run.

Instead of mutating the recordTime text on pause and requiring an undo,
extract the UI update to a separate function which computes the full
text based on the current state. Call this function when pause is
toggled, thereby forcing an accurate UI update that either does or does
not incude the paused text.

An added benefit is that the paused indicator now disappears
immediately.
2024-05-04 13:39:34 -07:00
Aleks Todorov ec31c7e5bf UI: Set recording paused before anything else
When this call was first introduced in eab10d48b2, it was at top of this
block, albeit after the calls to `pause`. Over time it has slowly
shifted lower and lower in the block.

In reality, it should be the first thing in the block to ensure that
further calls have accurate information about the pause state to update
themselves.
2024-05-04 13:39:34 -07:00
Paul Hindt 182410cf6c aja: Prepare plugins for new libajantv2 repo
Support building AJA plugins with either the new libajantv2 library, or
the deprecated ntv2 library.

Finder scripts updated to search for libajantv2 and fall back to ntv2 if
not found. This allows this PR to be merged without requiring a
corresponding update to the pre-built obs-deps packages.
2024-05-02 14:31:16 -04:00
cg2121 dfd5798e6c UI: Fix volume control button styling
The config button and mute checkbox were different sizes.
2024-04-29 14:56:59 -04:00
cg2121 ee72927ad2 UI: Fix styling of appearance tab
This makes the appearance tab look the same as other settings
tabs.
2024-04-29 14:55:01 -04:00
Warchamp7 1ba54adb85 UI: Clean up theme file formatting 2024-04-25 16:10:56 -04:00
Georges Basile Stavracas Neto df1ec719d1 UI: Update appearance icon
- Use the monitor with brush symbolic
2024-04-24 21:48:04 -04:00
Georges Basile Stavracas Neto 402ba09a77 UI: Update filters icon
- Add rounder borders
- Adjust fills
2024-04-24 21:48:04 -04:00
Warchamp7 93bedd21c8 UI: Reset duration when removing show/hide transition 2024-04-22 16:39:21 -04:00
Warchamp7 a3a8f6dbfb UI: Convert themes to composable format 2024-04-21 00:01:16 -04:00
derrod 503968671d UI: Add composable themes feature
Co-authored-by: Warchamp7 <warchamp2003@hotmail.com>
2024-04-21 00:01:16 -04:00
derrod b76e0cd31b UI: Add 'Appearance' settings page 2024-04-21 00:01:16 -04:00
tytan652 41ba8bdfdd UI: Add HighContrastEnabled implementation for Linux 2024-04-21 00:01:16 -04:00
derrod 0a9f1e7391 UI: Add HighContrastEnabled() to platform utilities 2024-04-21 00:01:16 -04:00
Warchamp7 7a3f5d784a UI: Clean up main window dock structure 2024-04-20 16:53:40 -07:00
Norihiro Kamae 7b2d555061 UI: Set dock floating after hiding it
Setting the dock floating before hiding it created a transparent window
on X11.
2024-04-20 16:49:19 -07:00
derrod 83383c13bc UI: Reformat .ui files with Qt Designer
Files have been formatted with Qt Designer (bin\designer.exe) 6.6.2.
2024-04-18 17:26:30 -04:00
Ryan Foster eb65ebdc5e UI: Use System theme volume meter colors
These comments do not actually match the color values here:
 * (0xff, 0xff, 0xff) is white
 * (0xcc, 0xcc, 0xcc) is light gray

Instead of just fixing the comments, use the values from the System
theme and also correct the comments.
2024-04-18 13:59:44 -04:00
Penwywern 731c2d9c82 UI: Change advanced audio controls to use audio_active 2024-04-16 15:48:42 -04:00
PatTheMav 34c846cad9 UI: Fix relocatable Linux builds using legacy portable build flag 2024-04-16 12:46:51 -04:00
tytan652 d88e788f7f UI: Reduce settings dialog height if greater than the desktop
Co-authored-by: Warchamp7 <warchamp2003@hotmail.com>
Co-authored-by: derrod <dennis@obsproject.com>
Co-authored-by: Ryan Foster <ryan@obsproject.com>
2024-04-15 18:15:17 -04:00
PatTheMav 53c9f79f4d UI: Make Sparkle updater a macOS-only feature 2024-04-13 23:48:38 -04:00
PatTheMav 1f911dd0d0 UI: Update Linux slice for CMake build framework 3.0 2024-04-13 23:48:38 -04:00
tytan652 3b87098508 UI: Fix double confirmation dialog while discarding source change
QDialog::closeEvent() already calls the reject() function, the override
of the former function was actually allowing a first confirmation dialog
which once discarded gets re-openned by QDialog::closeEvent().

Removing most of the closeEvent() override code is enough to fix the issue
since reject() will be called showing the confirmation dialog.
2024-04-13 16:54:32 -07:00
Warchamp7 ac160c906d UI: Include duration when copy/pasting scene item transitions 2024-04-13 16:44:51 -07:00
Warchamp7 cb3955f8bc UI: Fix Top Patron threshold 2024-04-13 16:42:33 -07:00
derrod 31aa700d22 UI: Always retain collection data of unloaded modules 2024-04-13 16:06:28 -07:00
Warchamp7 16e86f2d49 UI: Use existing path for file dialogs 2024-04-09 21:10:50 -04:00
derrod 2c62909d9b UI: Fix filter undo action using UUID instead of name 2024-04-09 21:10:19 -04:00
powersagitar b5b9d1c373 Extend min panel width to eliminate text clipping
Change size policy of "Start Virtual Camera" button to ensure the
minimum width of `Controls` panel is the same as "Start Virtual
Camera" button plus the gear (settings) icon, therefore to
eliminate text clipping when overflow.
2024-04-09 20:57:37 -04:00
Penwywern b80d45f132 UI: Log available encoders on load 2024-04-08 16:35:16 -04:00
GPattenden 60dd0c3ba6 UI: Move recording warnings to bottom of window 2024-04-07 00:39:22 -04:00
Ryan Foster 22205d582c Revert "UI: Change default format for release builds to fMP4/fMOV"
This reverts commit 9488bb20b6.

This is currently a frequent support issue as Windows Media Player,
Movies & TV, and File Explorer all cannot seem to handle fMP4 files
correctly. Windows Media Player and Movies & TV will play the files
fine, but no duration is listed and the applications cannot seek the
file. File Explorer will simply not list the file's length/duration (the
field is shown as having no set value). This was somehow not caught
during a year's worth of beta and RC builds. The world just wasn't ready
for this. =(

We have reported these issues to Microsoft, and we will revisit this in
the future.
2024-04-05 14:46:53 -04:00
Ryan Foster 28d7d4fe60 UI: Use spacers instead of widgets in macOS Permissions UI
The macOS Permissions dialog was using empty widgets to force other
widgets into position. Instead, use horizontal spacers.
2024-04-04 14:42:19 -04:00
tytan652 78cd07bd58 UI,plugin: Refactor virtual camera enablement 2024-03-30 16:43:30 -07:00
Ryan Foster 11131682b1 UI: Check low disk space only if recording to a file
The Custom FFmpeg Output allows the user to configure it to output to a
URL instead of a file. In OBSBasic::StartRecording(), we unconditionally
call LowDiskSpace() to check for low disk space because we assume that a
"recording" will always be to disk. When os_get_free_disk_space() is
called on a non-existent path, it returns 0, which causes OBS to emit a
low disk space warning. Instead, only call DiskSpaceMessage() if not
"recording" to a URL.
2024-03-30 16:24:04 -07:00
Rob Howell f5e77a4587 UI: Fix scene rename on tab and back tab 2024-03-30 16:09:41 -07:00
Mariana 004253f296 UI: Fix Auto-Config Wizard for custom server with no stream key
The Auto-Configuration Wizard cannot progress when selecting a custom
service that does not require a stream key. Since we have no way to
validate if a custom service requires a stream key, we should just not
require a stream key is custom service is selected. To fix this, check
if a custom service has not been selected when checking if the stream
key is empty.

Co-authored-by: Ryan Foster <ryan@obsproject.com>
2024-03-29 11:35:03 -04:00
derrod dc770b8fa8 UI: Disable scrolling for encoder properties 2024-03-23 16:43:28 -07:00
derrod da43aa109e UI: Add option to disable scrolling to OBSPropertiesView 2024-03-23 16:43:28 -07:00
наб 87902cb106 UI: Size the abstract-socket address properly
Unlike filesystem addresses, which are paths,
abstract addresses are blobs.

This means that the address wasn't "\0/com/obsproject 2413747 version",
but rather "\0/com/obsproject 2402613 version\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
this is reflected in both /proc/net/unix:
  000000001bf56057: 00000002 00000000 00000000 0002 01 56719817
                    @/com/obsproject 2402613 version@@@@@@@@@@@
                    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                    @@@@@@@@@@@@@@@@@@@@@@
  000000003e897b41: 00000002 00000000 00000000 0002 01 56730132
                    @/com/obsproject 2413747 version
and ss -l, extending the whole address column to the point of
unusability.

This size calculation follows trivially from the manual,
and naturally behaves correctly, as above.
2024-03-18 20:18:02 -03:00
cg2121 21f1c155ef UI: Use signal vector for status bar
The stream output signals are now put inside of a vector.
2024-03-17 10:55:18 +11:00
cg2121 04036f311e UI: Reserve size of congestion vector
This reserves the size of the congestion vector in the status bar,
so it isn't resized every second.
2024-03-17 10:53:44 +11:00
Georges Basile Stavracas Neto 0cc6068ed4 UI: Improve and update app metainfo file
- Rename from .appdata.xml to the modern .metainfo.xml
- Add a primary branding color (Yami blurple)
- Add "internet" to recommends and supports
- Update developer_id tag to developer name
- Shorten summary
- Remove obsoleted "kudos" tags
- Add a URL to the release tag
2024-03-14 10:08:35 -03:00
Translation Updater 10b02e11d0 Update translations from Crowdin 2024-03-12 18:11:06 +00:00
cg2121 140abfeb66 UI: Fix closing OBS with floating docks
When OBS is closed and there is a floating dock, a Windows system
sound is emitted. This fixes that by not executing the close dock
dialog when OBS is closing.
2024-03-11 20:38:04 -04:00
derrod 9488bb20b6 UI: Change default format for release builds to fMP4/fMOV 2024-03-11 18:40:14 -04:00
PatTheMav f4733ec6a2 Update source code formatting with clang-format 17.0.3
Added SCDisplayRef type alias to fix a quirk of this specific
clang-format version with ObjC block syntax.
2024-03-11 15:55:30 -04:00
Ryan Foster c3a20bd366 UI: Block Elgato Stream Deck plugin before 5.5.2.0 to avoid crashes
The Elgato Stream Deck plugin older than 5.5.2.0 invokes undefined
behavior that results in application crashes. Let's block older versions
to prevent the crashes.
2024-03-08 21:33:44 -05:00
Ryan Foster 589495a952 frontend-tools: Fix output timer stopping recording on unpause
If the "Pause timer when recording is paused" option in the Output Timer
settings was enabled, even if an Output Timer was not being used, a
recording may stop when attempting to unpause it. This was due to the
check in the UnpauseRecordingTimer function being too loose and only
checking for if the recording timer was not active. Let's initialize the
recordingTimeLeft variable to -1 and check that it's greater than 0
before attempting to restart a recording timer.
2024-03-08 19:18:41 -05:00
Vainock 7ae66c72fd Update translations from Crowdin 2024-02-28 14:20:05 -05:00
pkv 5bd22afe41 UI: Correctly toggle audio multi-track buttons
This toggles audio multi track display in Output settings when:
1. When there is a signal that a stream service is changed to a non
custom one. Indeed multi-track audio is only available with Custom
service and only with SRT or RIST protocols.
2. When a Custom service is picked, and SRT or RIST are detected in the
server URL.
3. When Stream settings are saved when one hits Apply.
This is in addition to the toggling done when loading Stream Settings.

Signed-off-by: pkv <pkv@obsproject.com>
2024-02-27 18:26:09 -05:00
pkv ef19644e5e UI: Remove LoadOutputSettings from save sequence
This removes the LoadOutputSettings() called in SaveStream1Settings.
It caused a bug when trying to save Output settings when both Stream
and Output settings have been changed but the changes have not been
applied by hitting the 'Apply' button in Settings.

Signed-off-by: pkv <pkv@obsproject.com>
2024-02-27 18:26:09 -05:00
cg2121 5a27d93cfa UI: Fix context bar not updating on delete
This fixes a bug where the source context bar wouldn't update
when a scene item is deleted.
2024-02-27 15:26:26 -05:00
Ryan Foster 7a35ae2cb6 UI: Fix Remux window only being usable once
The beginInsertRows/endInsertRows calls seem to signal that the rowCount
has changed, and that views should adjust accordingly. The isProcessing
boolean changes the returned value of RemuxQueueModel::rowCount, which
seems to cause the empty row in the table model to disappear
permanently. I still don't know why it used to work this way and no
longer does.
2024-02-22 00:05:58 -06:00
Exeldro f275080abb libobs: Fix crop to bounds ABI break 2024-02-20 21:18:51 -06:00
test 66d210cf1b UI: Fix problem with Yes/No message box buttons not translated 2024-02-20 18:08:16 -05:00
Florian Zwoch fd65a1404c UI: Fill audio meter background each update (#9842)
Since the widget is marked as opaque we need to draw each pixel or
else we may end up with unpainted pixels. On Wayland this will
result in artifacts in the audio meter as transparent pixels will
pick up colors from the underlaying desktop instead.
2024-02-20 15:44:59 -05:00
test 4f5d652712 UI: Fix locale key for fragmented tooltip 2024-02-18 10:14:17 +11:00
jcm e71149697f UI: Include audio devices in macOS microphone permissions prompt 2024-02-10 17:14:00 -06:00
Exeldro 4251e32366 UI: Fix source remove log scene 2024-02-10 17:11:52 -06:00
pkv 60bd03e45e UI: Fix RTMP check in Advanced output
RTMP was not being recognized due to a case-sensitive comparison; this
changes to a case insensitive comparison to fix the issue.
Fixes a bug found in beta channel.

Signed-off-by: pkv <pkv@obsproject.com>
2024-02-06 21:36:37 -05:00
cg2121 b6e2face96 UI: Use vector for signals in source tree/transform
Cleans up signal code.
2024-02-03 17:19:51 -06:00
PatTheMav 6af9ae6c87 UI: Update exportOptions template for macOS release code signing 2024-02-01 18:21:32 -05:00
CrackThrough 7d25a80610 UI: Fix null pointer dereference
strcmp(obs_get_encoder_codec(option), "opus") causes the application to
segfault while loading service if find_encoder(id) returns NULL. Add a
null pointer check to prevent that from occurring.
2024-01-31 02:13:36 -06:00
Translation Updater ac484a066f Update translations from Crowdin 2024-01-29 20:47:38 +00:00
DriftedClouds db3072f33c UI: Add accessible names to hotkey edit boxes 2024-01-27 17:37:53 -06:00
bin b2872318a1 UI: Add "audio_names" setting to FFmpeg output settings 2024-01-26 22:28:36 -05:00
derrod 260b5ae137 UI: Cancel session end request on commitDataRequest() signal 2024-01-23 22:01:24 -06:00
derrod 0a8e00c478 UI: Add and migrate to GPU scaling options 2024-01-20 19:28:52 -06:00
derrod a3ac6ee473 frontend-tools: Replace circlebuf with deque 2024-01-16 16:45:09 +01:00
derrod 32e201ebb9 UI: Save invalid transition source data in safe mode 2024-01-13 17:59:42 -06:00
derrod 6fc3bb4eb4 UI: Switch to bigger units for high bitrate/large recordings 2024-01-13 17:57:26 -06:00
pkv f186268507 UI: Enable audio multi-track w/ mpegts streaming
This enables audio multi-track support in UI for mpegts streams (srt,
rist ...).
The UI changes were coded though to allow re-use by other protocols.

Signed-off-by: pkv <pkv@obsproject.com>
2024-01-06 18:42:54 -06:00
gxalpha 089fa8e8d3 UI: Use normal source width for screenshots
Fixes an issue where filters that resize a source, like "Crop/Pad" or
"Scaling/Aspect Ratio", change the texture but the new source size gets
ignored, effectively either cropping the screenshot or giving it black
borders.
2024-01-06 18:32:25 -06:00
tytan652 519c19aa4a UI: Fix unused-variable
Some variables were not guarded for being unused when built with FFmpeg 6.1
2024-01-06 18:24:58 -06:00
derrod 46c00a95cd UI: Save last used output resolution to scene collection 2024-01-06 17:06:00 -06:00
PatTheMav 7dbde70de1 cmake: Remove support for generators besides Xcode on macOS 2023-12-19 17:59:44 -05:00
PatTheMav dc41069619 UI: Update CMake target source lists with alphabetic sorting
Also updates CMake formatting with manual format choices.
2023-12-19 17:59:44 -05:00
PatTheMav 2809284795 UI: Add UI support interface library with custom Qt elements
Allows the customized UI elements used by OBS Studio to more cleanly
be integrated into consumers of the same elements, mainly frontend
plugins in the main source tree.
2023-12-19 17:59:44 -05:00
PatTheMav 8135085a23 cmake: Replace custom Qt discovery function with CMake default
find_qt was necessary during the transitional period between Qt5 and
Qt6. With Qt6 being the only supported Qt version (for open source) for
the time being, code complexity can be reduced for easier maintenance.
2023-12-19 17:59:44 -05:00
cg2121 7931f2acb8 UI: Remove lock & vis checkbox classes
This removes the lock & visibility checkbox classes in favor of using
dynamic properties.
2023-12-18 21:22:39 -06:00
Vainock 54d847d19b UI: Remove double unit indication in replay buffer maximum string
"MB" is already set via the suffix.
2023-12-18 18:01:38 -05:00
derrod 09024e9c74 UI: Add Crop to Bounds checkbox to transform dialog 2023-12-16 18:00:11 -06:00
cg2121 59766ee4ff UI: Remove SignalBlocker
Since QSignalBlocker does the same thing, remove SignalBlocker.
2023-12-16 17:10:57 -06:00
BGM99 04788d30e2 UI: Fix resize cursor to respect item transformation 2023-12-16 18:19:20 +01:00
bin b9ce24aa56 UI: Fix QListWidget background color in property groups 2023-12-14 23:24:23 +01:00
cg2121 ef99553a7e UI: Disable edit transform if item is locked
The transform window was still accessible if the scene item
was locked.
2023-12-10 01:27:28 +01:00
cg2121 cd01120740 UI: Don't paste transform on locked item
This disables pasting transforms on an item that is locked.
2023-12-09 18:09:33 -06:00
PatTheMav e27b013d47 aja: Disable deprecated declarations warnings on macOS and Linux
Deprecation warnings have been investigated and have been deemed
non-malicious for the time being.
2023-12-06 17:27:12 +01:00
Translation Updater f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
Penwywern 3cc7dc0e7c UI: Fall back in case of invalid scene name on load 2023-12-04 05:06:42 -06:00
Nikola Jovic 21a906d7d9 UI: Fix checkbox misalignment on macOS in properties view 2023-12-02 21:18:36 +01:00
gxalpha e9ecb6c565 UI: Make replay buffer settings always visible in Simple Mode
Instead of a checkbox in the recording group that reveals the replay
buffer group when pressed, the replay buffer group now has its own
toggle that enables or disables the replay buffer.
2023-11-27 15:29:57 -06:00
gxalpha 7d55229bef UI: Add to lossless warning that replay buffer is unavailable 2023-11-27 15:29:57 -06:00
Matt 93f5b45be8 frontend-tools: Fix multiple signal-slot connections on Output Timer
When running an Output Timer multiple times, multiple signal-slot
connections would be made with the corresponding output stop event
functions. This would cause later Output Timers to terminate
unexpectedly early, due to the stop functions having been called
repeatedly on previous Output Timer runs while outputs were stopping.

There may still be an underlying bug with calling stop on outputs
repeatedly, but this change at least ensures that Output Timers only
call their stop functions once.
2023-11-20 17:02:14 -05:00
derrod cfd8d4c993 updater: Clear shader cache after updating 2023-11-20 04:32:56 -06:00
derrod ba25bc65c9 UI: Disable safe mode when --multi is used 2023-11-17 15:31:36 -05:00
田七不甜 5f512d5f25 UI: Fix UseStreamKeyAdv not display stream key and not hide button 2023-11-08 00:13:20 -06:00
Ryan Foster c0ee1e718d UI: Fix typo in Virtual Camera logging functions
cvam -> vcam
2023-11-07 19:09:25 -05:00
Penwywern a49b35c3de UI: Log Virtual Camera output type 2023-11-07 00:39:01 -06:00
Zulleyy3 Zulleyy3 c76760bc1c UI: Fix transform of sources in groups
Group resize is not deferred until adjustments are completed by a
mouseReleaseEvent in certain cases, resulting in unexpected movement of
sources that are part of a group as they are resized or stretched
beyond group bounds.

The bug can be described/reproduced as follow:

1. The user selects within a group in the sources dock
2. The user moves their mouse over the selected source such that the
   cursor would change.
   - This results in a cursor update and a call to GetStrechHandle()
   - as the source is part of a group, stretchGroup will be set to the
    group of the source

3. The user clicks on the canvas without touching a stretch/rotation
   handle
   - A mouseReleaseEvent is fired
   - obs_sceneitem_defer_group_resize_end is called on the group as
     stretchGroup is still defined from earlier
   - the defer_group_resize member of the group will become negative
   - The deferal check in resize_group (obs-scene.c) will always pass
     now
4. When scaling or rotating the source close to the group bounds, the
   group bounds will now dynamically update causing the source in to fly
   off the canvas.

Resolves: https://github.com/obsproject/obs-studio/issues/9754
2023-11-04 18:06:44 -05:00
gxalpha 60c77aa915 UI: Replace SourceTreeSubItemCheckBox class with Qt property 2023-10-28 10:22:38 -03:00
Penwywern 1a88cdb00d UI: Fix AMF AV1 simple recording presets 2023-10-27 14:10:20 -04:00
Ryan Foster b4c36c0530 UI: Remove iCCP data from PNGs
Loading these PNGs in libpng 1.6+ results in the warning:
libpng warning: iCCP: known incorrect sRGB profile

This is probably caused by saving an ICC Profile with the program used
to make the image, and that ICC Profile is considered invalid by libpng.

Removing the iCCP data resolves this.
2023-10-26 16:59:06 -04:00
jpark37 6aaf0358ca decklink-output-ui: Decouple DeckLink output state
Didn't realize OBS could output both program and preview views at the
same time with multiple devices.

Also remove render callbacks earlier on stop to avoid use-after-free.
2023-10-25 01:11:32 -05:00
Rodney 5ebd3ee6d3 UI: Add missing NULL check for skipUpdateVer 2023-10-17 11:17:07 -04:00
Norihiro Kamae 20b8deba2d frontend-tools: Remove unused startAtLaunch variable 2023-10-14 18:35:38 -05:00
gxalpha 44f3f79296 UI: Convert QTStr macro to inline function
Using inline functions improves IDE integration and avoids potential
pitfalls of that using macros has.
2023-10-12 11:45:45 -04:00
Paul Hindt d8f533538f UI: Fix compile error due to use of strlen in constexpr 2023-10-11 01:31:02 +02:00
derrod 625277ace3 UI: Use theme path prefix in status bar 2023-10-10 17:19:02 -03:00
derrod a2db8876fc UI: Use theme path prefix in source tree 2023-10-10 17:19:02 -03:00
derrod 1906a14b90 UI: Update themes to use 'theme:' prefix for non-qrc files 2023-10-10 17:19:02 -03:00
derrod ae148b60a8 UI: Add 'theme:' prefix to Qt search paths 2023-10-10 17:19:02 -03:00
Translation Updater 0d450a34a0 Update translations from Crowdin 2023-10-10 13:34:41 +00:00
gxalpha baa78b36ef UI: Enable "Paste Filters" after copying from scenes or mixer
Fixes an issue where if no filters had previously been copied and the
user copies a filter from either the scene tree or the audio mixer, the
"Paste Filters" action would not be available until the Edit menu
reloads (e.g., by selecting another source in the source tree).
2023-10-08 10:59:00 -06:00
PatTheMav 2226292adc UI: Initialize YouTubeAppDock synchronously to fix Qt runloop issues
The YouTubeAppDock uses its own cookie manager and thus requires a
running CEF instance before creating the dock. Unfortunately creation
of the dock itself and launching the associated browser instance are
coupled in the code.

The UI code to restore browser dock states runs _after_ this code and
unfortunately this is also the only way to ensure that if the user
has closed the YouTubeAppDock before that it stays closed on app
launch (the dock needs to exist in the Widget hierarchy for its state
to be restored).

Alas, outside of Windows, InitBrowserPanelSafeBlock uses a separate
local QEventLoop to block the main thread while still allowing UI
events to be processed to launch a CEF instance.

By this point in the code execution, the primary event loop has not
been started yet, so the event loop launched by
InitBrowserPanelSafeBlock temporarily becomes the main application
event loop, which initializes all Widgets, finds no active window
state for the widgets, and thus treats them as "visible", calls the
showEvent method on every browser dock, which thus loads the associated
websites.

The dock state is restored after all that, which leads to each browser
dock being "shown" (even though the main QApplication hasn't even
started yet), the associated sites are running (including audio and
video output) but then hidden again, which leads to surprising audio
output seemingly coming from "nowhere".

All browser docks call the browser initialization methods synchronously,
which has the benefit of not spinning up a premature event loop, and does
not trigger Qt view state changes before all Widgets have been
initialized. Having the YouTubeAppDock behave the same does thus not
negatively impact UX.
2023-10-08 02:00:38 +02:00
derrod e4587ae9bd UI: Cleanup remaining uses of old version macros 2023-10-06 17:21:51 -06:00
derrod 9f37258298 UI: Refactor Windows update check to always use LIBOBS_API_VER 2023-10-06 17:21:51 -06:00
derrod d78a05e124 cmake: Fix OBS_COMMIT not being set (Windows only) 2023-10-06 17:21:51 -06:00
Ryan Foster 02478d4939 UI: Use std::shared_ptr instead of QSharedPointer
Also use std::weak_ptr instead of QWeakPointer as needed.

Qt has been porting QSharedPointer and QWeakPointer to std::shared_ptr
and std::weak_ptr respectively. QSharedPointer is apparently 2x slower
than std::shared_ptr.

References:
 * https://bugreports.qt.io/browse/QTBUG-109570
 * https://codereview.qt-project.org/c/qt/qtbase/+/359678
 * https://codereview.qt-project.org/c/qt/qtgrpc/+/447780
 * https://codereview.qt-project.org/c/qt/qtbase/+/450134
 * https://codereview.qt-project.org/c/qt/qttools/+/450776
 * https://codereview.qt-project.org/c/qt/qttools/+/450777
 * https://codereview.qt-project.org/q/QSharedPointer
2023-10-04 18:36:20 -04:00
Ryan Foster 3d05d681b7 UI: Use C++11 ranged-for instead of Q_FOREACH
Qt has been porting uses of Q_FOREACH/foreach to C++11's ranged-for.
Let's do the same.

References:
 * https://doc.qt.io/qt-6/foreach-keyword.html
 * https://codereview.qt-project.org/q/Q_FOREACH
2023-10-04 17:58:02 -04:00
derrod 5dda04ad5e Revert "UI: Add workaround for Qt tooltip stylesheet bug"
No longer required as this was fixed in Qt 6.5.3.

This reverts commit d97950445e.
2023-09-29 18:00:04 +02:00
tytan652 46fc409843 UI: Fix IP settings order 2023-09-16 16:16:43 -07:00
Richard Stanway c71bbcf4d9 UI: Avoid using newlines in error messages
Some errors include HTML links directing users to e.g. driver updates
or further information. Using a raw newline instead of <br> causes Qt to
skip parsing the HTML, resulting in an ugly mess of HTML displayed to
the user instead of the intended links.
2023-09-12 17:54:42 -07:00
gxalpha 839461dc9b UI: Don't show native popup for YouTube auth message box
The native popup has the problem that it doesn't work for links, leaving
us with an unclickable text where a link should be. Qt 6.6 has an option
to disable the native dialog, so let's add this to make the link
clickable again.

Co-authored-by: derrod <dennis@obsproject.com>
2023-09-11 10:07:16 -07:00
Richard Stanway e5472c775c UI: Standardize spelling of closable, fix typo 2023-09-11 09:56:27 -07:00
Richard Stanway d8bf21de2f UI: Add cleanup of stats callback on window close
Moving the cleanup to OBS_FRONTEND_EVENT_EXIT in #8735 only handled the
cleanup from the dockable window, as the regular stats window is deleted
on close when the UI is shut down. This caused an event handler leak
each time the window is manually closed, resulting in crashes. This code
looks a bit wrong since we delete the same handler in multiple places,
but this is due to the code being used by both the dock (non-closable)
and the window (closable). The OBS_FRONTEND_EVENT_EXIT handler handles
cleanup from the dockable stats window, and the window close handler now
handles cleanup from the non-dockable stats window.
2023-09-11 09:19:54 -07:00