0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

2357 Commits

Author SHA1 Message Date
gxalpha
358ef281c4 UI: Add webp to dropfiles 2022-03-12 15:43:57 -08: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
cg2121
65a360fa41 obs-frontend-api: Add function to get frontend translated string
Developers now can easily get a translated string from the frontend
instead of using their own translations.
2022-03-10 06:27:18 -08:00
Richard Stanway
da4d98d0e4
UI: Remove some globals in AAC bitrate population 2022-03-09 22:54:22 +01:00
jp9000
89881147c7 UI: Fix deferred source properties not updating 2022-03-09 13:12:17 -08:00
jp9000
e5f57a1e03 UI: Rename visual update callback variable
Having both a "callback" and "cb" doesn't make sense. One is
specifically for visual updates only, the other is for actual updates,
so use an appropriate name for both
2022-03-09 13:11:38 -08:00
gxalpha
45f737fb30 UI: Add undo/redo to dropfiles 2022-03-08 13:25:38 -08:00
cg2121
24e4cd1717 UI: Fix mixer hide toggle in studio mode
If the user would toggle hide in mixer in studio mode,
the source would show up in audio mixer, even if it
wasn't active.
2022-03-08 13:18:05 -08:00
Matt Gajownik
372b54ca7a UI: Display dock-relevant context menu on titlebar 2022-03-08 12:36:19 -08:00
cg2121
8c732d31a7 UI: Disable replay save button when paused
Another indicator to the user that replays can't be saved
when recordings are paused.
2022-03-08 12:32:27 -08:00
Exeldro
f8c2ccc2c3 UI: Add mulitiview layout options without program 2022-03-08 12:30:19 -08:00
Tim Cooper
bf09a70a09 UI: resolve .url, .lnk shortcuts during drag-and-drop
On applies to Windows.

Suggested here: https://ideas.obsproject.com/posts/1636
2022-03-08 11:58:55 -08:00
cg2121
748cf32a43 UI: Add events for renaming profiles/collections
The events make it more clear when profiles or scene
collections are renamed.
2022-03-08 11:17:59 -08:00
Misutaa Asriel
4afafaac6d UI: Fix unorthodox macOS Dock icon behavior
Fixes overriding of macOS dock icon behavior.

macOS sets the icon on launch based on:
- The Information PLIST
- A user provided icon by Finder

setWindowIcon overrides this behavior.

Therefore, this commit resolves this issue,
by doing nothing if target is macOS.
2022-03-08 08:50:34 -08:00
Kurt Kartaltepe
ec05e1ff57 UI: Avoid calling obs_source_update multiple times
When we added undo/redo in 86eb7aeb a distinction between Updates and
Visual updates was made, presumably for filters which need special
handling of the update case. These functions were also added to regular
source properties, but didnt use any special code instead calling
obs_source_update an additional time after a short time.

Instead lets remove the 2nd delayed call and only call obs_source_update
once per settings change.
2022-03-08 08:35:02 -08:00
jp9000
61cbfb3b9a UI: Use get_new_source_name instead of strprintf
Remove a bit of duplicated code, and fix non-Windows compilation. This
is a bit of a workaround to not have to modify cmake, but might as well
reuse a function that already exists anyway rather than duplicate the
code.
2022-03-08 01:27:20 -08:00
jp9000
6dd65c8d13 UI: Fix duplicated source names in audio settings
When you add an audio capture source and use the "use existing" feature
in the source selection dialog, and then recreate the same audio source
again in audio settings, it will result in two sources using identical
names, which although relatively harmless can cause issues when doing
things such as trying to find sources by their name.

Fixes obsproject/obs-studio#5621
Closes obsproject/obs-studio#5947
2022-03-08 01:05:27 -08:00
Devon Vitkovsky
3e9a3d995b UI: Change 'Last Log' to 'Previous Log' in order to disambiguate things 2022-03-05 16:01:09 -08:00
cg2121
1a2e5035c3 UI: Remove OBSSceneItem QDataStream
Since the source list is a custom list model, the
QDataStreams for OBSSceneItem are not needed.
2022-03-05 15:59:30 -08:00
gxalpha
6d86b58ed7 UI: Simplify multi-instance check 2022-03-05 15:21:11 -08:00
jpark37
f186b8c304 UI: Remove conflicting setlocale call
Qt already sets LC_ALL to "" for non-Windows. We set LC_NUMERIC to "C"
afterward for sanity, and we don't want that setting to get smashed.
2022-03-01 12:53:51 -08:00
jpark37
fa5a05f188 UI: Restore LC_NUMERIC to C locale on Mac/Linux
Recommended by QCoreApplication doc for Unix.

Fixes CUBE LUT load, and FFmpeg output args for foreign locales.
2022-03-01 12:53:51 -08:00
Kevin Degeling
139e6ed69e UI: Additional product details
Based on the product description from the main website
2022-02-27 13:30:25 -03:00
Matt Gajownik
f77ab0e199 UI: Fix rendering of spaces & tabs in Log Viewer
For some reason, the combination of QPlainTextEdit and a HTML block
seems to treat spaces as HTML shoult (only display one, no tabs, etc)
rather than how QTextEdit + HTML does, which is strange. As we don't
need HTML for existing log lines, insert them as plaintext, but for
new entries wrap non-error non-warning messages in a <font> tag and
format that with white-space: pre
2022-02-27 18:56:19 +11:00
gxalpha
90f1ebf4aa UI: Disable downscale filter setting for same resolutions
Disables the downscale filter dropdown menu when base and output
resolution are the same.
2022-02-27 14:42:17 +11:00
OldBaldGeek
6a5a5b4538 UI: Make volume meter tweakable by stylesheet
Replace fixed Arial, 7 px meter scale font with the font used
for VolumeMeter/QWidget. Add qproperties for meter bar thickness and
a scaling factor for the meter scale numbers. If not specified in a
QSS, defaults are 3 pixel bar width and 80% of base font size.
2022-02-27 13:17:59 +11:00
OldBaldGeek
c8a0dbff1e UI: Use selective repaint on volume meter scale
Fix for issue 3915 - reduce tick and font blur at 125% DPI.
Former use of paint cache resulted in blur when scaled.
2022-02-27 13:17:59 +11:00
gxalpha
dd564a2e8f UI: Move "Check For Updates" menu to app menu on macOS
For apps using sparkle, it's normal for the "Check For Updates" button
to be in the app menu instead of the help menu, so let's put it there.
2022-02-27 12:47:18 +11:00
gxalpha
7cc20656f4 UI: Add shortcuts for Copy/Paste Transform
Adds the shortcuts Ctrl+Alt+C/V to the Copy/Paste Transform menus in the
Edit menu
2022-02-26 15:54:14 -08:00
cg2121
8510731f2b decklink: Don't load modules if Decklink not found
This also modifies decklink-captions and decklink-output-ui.
2022-02-26 15:44:00 -08:00
obiwac
93c2e681ca linux-v4l2: scandir with alphasort on non-Linux
Sort video device entries with `alphasort` on non-Linux platforms,
as opposed to `versionsort` on Linux.
(`versionsort` is a GNU extension, unavailable on e.g. FreeBSD.)

UI: Fix call to `to_string` on FreeBSD
2022-02-26 15:36:08 -08:00
gxalpha
aa0893b751 UI: Refresh edit menu on item locked signal 2022-02-26 15:35:10 -08:00
Matt Gajownik
0e57a7beef UI: Fix performance issues with the Log Viewer
This commit includes two big changes, alongside other smaller tweaks.

1) Update the internal QTextDocument of the text component directly
2) Use QPlainTextEdit, which supports HTML & is designed for long text
3) Use QString's arg function for formatting strings

Fix 1 significantly improves realtime performance when adding lines
individually, to the point that the UI no longer freezes if the viewer
is open and the log is being spammed. It also improves initial launch
speed when there's a large amount of text already in the file.
Reference: https://stackoverflow.com/a/54501760/2763321

Fix 2 completely eliminates delay when opening the viewer, regardless
of how many lines are already in the log file. For a standard log
after OBS launch, this cuts opening time from about 2 seconds to half a
second. For anything longer than 1,000 lines, the UI no longer freezes,
and the viewer (& its contents) open within half a second.
Reference: https://stackoverflow.com/a/17466240/2763321
2022-02-26 15:03:35 -08:00
jpark37
61ffb5c4d8 UI: Add OBSQTDisplay::OnMove()/OnDisplayChange()
This plumbing will be useful when handling color space changes.

Currently does nothing, and only Windows is wired for now.
2022-02-26 01:09:07 -08:00
cg2121
7b418d5be3 UI: Use std::unique_ptr for ui variables
Most ui variables were using std::unique_ptr, but not all.
Went through all of the UI code to find where they were manually
deleted.
2022-02-20 00:30:37 -08:00
Matt Gajownik
2ded0f7050 UI: Log 'Hide OBS from capture' on startup & settings change 2022-02-20 13:38:17 +11:00
gxalpha
d5f2b7e496 UI: Refresh edit menu on item select/deselect 2022-02-19 15:42:57 -08:00
Matt Gajownik
608e57257a UI: Don't collapse preview in Filters splitter view
Fixes #5959
2022-02-18 19:46:02 +11:00
tytan652
2720e6d00f UI: Avoid emiting events 2 times when renaming a profile 2022-02-12 15:14:21 -08:00
gxalpha
ccc57671eb UI: Correctly style "Chrome OS" 2022-02-12 15:04:42 -08:00
Translation Updater
25b58f0417 Update translations from Crowdin 2022-02-11 00:34:08 +00:00
Richard Stanway
aa73de952b
UI: Fix uninitialized memory access in OBSPropertiesView
Bug introduced in b0528e0cf7. Closes
https://github.com/obsproject/obs-studio/issues/5934.
2022-02-08 21:57:08 +01:00
jp9000
b0528e0cf7 UI: Fix properties view crash with non-obs objects
The properties view incorrectly assumed that it was being used with obs
objects only.

(Jim note: I'm annoyed.)
2022-02-08 11:07:23 -08:00
Rodney
b7a24d54c9
UI: Add warning on startup for running in Wine 2022-02-07 14:16:59 -08:00
Translation Updater
ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
jp9000
c71abfbd8c UI: Fix clang-format specifier 2022-02-02 22:39:24 -08:00
jp9000
4f09cac7af UI: Remove unnecessary call 2022-02-02 22:37:41 -08:00
jp9000
f0e631df17 UI: Fix filter props. getting recreated unnecessarily
Closes obsproject/obs-studio#5846
2022-02-02 22:35:56 -08:00
jp9000
4b355192e7 UI: Don't create filter properties before splitter
Fixes an issue where the properties wouldn't show up the first time the
properties are supposed to show
2022-02-02 22:35:56 -08:00
jp9000
f34b6866a5 UI: Improve properties view object safety
Use weak references on OBS objects that properties view reference in
order to ensure that the objects are still valid.

This fixes a crash where properties views would use objects without
necessarily knowing whether they were still valid or not.

Fixes obsproject/obs-studio#5862
Closes obsproject/obs-studio#5863
2022-02-02 22:35:56 -08:00
jp9000
6b944a2f3c libobs: Rename OBSObj to OBSPtr
Makes it a bit more explicit that it's just a pointer RAII, and because
an OBSObject will be added
2022-02-02 22:35:56 -08:00
Matt Gajownik
e2e751aa55 UI: Better Hide OBS Window description, add first time dialog & tooltip 2022-01-29 17:09:15 -08:00
Sebastian Beckmann
77dbe44da4
UI: Properly close projector when source is removed (#5171) 2022-01-29 15:36:38 -08:00
Paul Hindt
97d47b701b aja-output-ui: Fix crash when stopping AJA Preview output
Removing the first call to `video_output_stop` prevents the `data_mutex`

field in `struct video_output` from being destroyed while still in use.

The `render_preview_source` function will call `video_output_lock_frame`

upon that mutex and encounter a NULL pointer exception.
2022-01-29 15:06:34 -06:00
Matt Gajownik
eb7d6e84aa UI: Add separators to system tray context menu 2022-01-29 14:01:34 +11:00
gxalpha
9c51b70dd0 UI: Fix unused variable warning on non-windows 2022-01-29 13:30:17 +11:00
jp9000
c87a81ba56 UI: Show wait cursor while cleaning up scene data 2022-01-28 10:30:42 -08:00
Richard Stanway
5ed45d06da
UI: Check current affinity before calling SetWindowDisplayAffinity
For some reason, SetWindowDisplayAffinity can make windows visible even
when it sets the same value for affinity that GetWindowDisplayAffinity
reports. Possibly an API bug as this is probably not a widely used API
yet?

Fixes a weird window with no size appearing when browsing for files on
Windows.
2022-01-27 02:47:11 +01:00
Clayton Groeneveld
0377b962b5 UI: Disconnect group reorder signal
The group reorder signal was never disconnected when
resetting signals.
2022-01-25 06:06:15 -08:00
Richard Stanway
40a598008d UI: Fix QLabel leak in OBSPropertiesView::AddProperty
OBS_PROPERTY_GROUP creates neither a widget nor a label, causing
AddProperty to create a default one. Without a widget, it does not
get attached to the layout, resulting in a memory leak.

This commit also simplifies a bit of the code to avoid repeatedly
testing the same condition.
2022-01-25 06:01:23 -08:00
gxalpha
799ac3f6a0 UI: Fix transform options being wrongly enabled/disabled
They detection for this was not checking the n selected items but the
first n items in the list, which would lead to the options being enabled
or disabled based on the whether other items were locked.
2022-01-25 05:58:47 -08:00
Jim
b3b4e1b2ef
Merge pull request #5860 from obsproject/deprecate-addref
Deprecate addref for obs objects
2022-01-25 05:55:52 -08:00
Georges Basile Stavracas Neto
0f36d7832c
UI: Fix bugtracker URL in AppData file (#5861)
It is mistakenly set to github.org, instead of github.com.

Sorry :(
2022-01-24 19:02:55 -06:00
Jim
b9e01380f3 UI: Replace addref calls with get_ref 2022-01-24 14:06:50 -08:00
Matt Gajownik
b77ccceae7 UI: Allow 'Hide OBS window' on Windows 10 2004
Per the Microsoft documentation, 2004 (19041) is the minimum supported
version for this feature. Ensure the check matches that.
2022-01-24 21:44:47 +11:00
Matt Gajownik
f9b038513a UI: Fix Settings save crash on old Windows versions
WidgetChanged doesn't contain a null check, resulting in a crash when
looking at the value for the new Hide OBS From Capture setting.

Fixes #5854
2022-01-24 18:31:05 +11:00
Matt Gajownik
4e04011101 UI: Don't read unloaded module in source toolbar
Avoid potential crashes similar to #4391 for existing users,
especially on non-Windows.
2022-01-23 16:45:54 +11: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
gxalpha
d601577706 UI: Fix small typo 2022-01-21 10:07:25 -05:00
Richard Stanway
3ce12bc5e9
UI: Optimize undo/redo functions with constant references 2022-01-19 21:39:43 +01:00
Richard Stanway
85ac469458 UI: Use regexp to filter filename formatting
Avoids unbounded stack growth when pasting content that has many invalid
characters. Fixes https://github.com/obsproject/obs-studio/issues/5815.
2022-01-18 03:34:58 -08:00
Matt Gajownik
a3e3ee8a8b UI: Downgrade scalable logo on Linux to SVG 1.0
GNOME (and a number of SVG editors) don't handle SVG 1.1 properly,
resulting in the inner circle overflowing into the outer circle.
2022-01-17 19:09:54 +11:00
Nicolas Fella
f43b046f8b UI: Set desktopFileName for QApplication
This needs to match the base name of the .desktop file name.

This is needed for propagating the correct App ID on Wayland,
which is needed e.g. for proper window icons on Plasma.
2022-01-16 18:03:27 +11:00
Ryan Foster
0a93acbc86 UI: Fix memory leak in Auto-Configuration Wizard
If streaming and recording was selected in the Auto-Configuration
Wizard, a memory leak would occur. When obs_service_resolution appeared
elsewhere in C++ files, it used a BPtr. Use BPtr here too.
2022-01-15 22:24:00 -05:00
derrod
eb62162d50 UI: Log YouTube API HTTP request errors 2022-01-13 23:07:45 +01:00
Paul Hindt
8f8b522ca7 aja: Fix for invalid default settings and empty cardID string 2022-01-13 13:11:51 -06:00
Vainock
9af944cb8b UI: Remove unused 'Percent' string 2022-01-12 07:33:04 -08:00
Colin Edwards
ed329c433d decklink-output-ui: Stop outputs on OBS_FRONTEND_EVENT_EXIT 2022-01-12 06:53:49 -08:00
Paul Hindt
1cbf9421d4 aja-output-ui: Add the Multi View UI options for new device. 2022-01-11 17:28:05 -06:00
Matt Gajownik
ffc55b2d3a UI: Fix crash when opening transition Properties dialog
Crash was introduced in ae4797f8cc. It seems with that change, this
function call is no longer necessary.
2022-01-11 18:22:15 +11:00
Exeldro
ae4797f8cc UI: Stop locking filter mutex while loading properties
Reordering the filters makes the filter mutex of the source locked
while loading a new the properties of a filter which may require other
locks. By loading the properties of the filter on a QueuedConnection
we make sure the filter mutex is cleared when that happens.
2022-01-08 16:11:36 -08:00
Paul Hindt
f09137a2e0 aja: Refactor, clean-up and fix bugs in the signal routing system, and add SDITransport UI option to assist signal routing. 2022-01-08 14:05:10 -06:00
Cody Jung
e7837e30ce UI: Fix push-to-talk/mute delay not saving
Fixes a couple copy/paste errors preventing push-to-talk and push-to-mute delays
not saving when choosing Apply or OK.
2022-01-08 17:38:04 +11:00
Cody Jung
fab293a686 UI: Remove Apple deferred tray load
With the change to how initial startup minimizing-to-tray works,
we can remove the Apple-specific workaround.
2022-01-07 20:15:03 -08:00
Cody Jung
35b9c76495 UI: Fix flash when starting minimized
Rather than showing the main window, then hiding it again when the
tray icon initialization happens, just don't show the main window.

When deciding whether to show the window, we need to know whether
the tray icon is available or not - if it's not and we don't show
the window, there would be no way to restore OBS.
2022-01-07 20:15:03 -08:00
Matt Gajownik
ff42da373b UI: Fix hotkey JSON error for Advanced Replay Buffer
This matches the Simple output Replay Buffer hotkey code.
2022-01-08 13:34:40 +11:00
gxalpha
0416c71749 UI: Update context bar when exiting properties dialog 2022-01-08 12:28:18 +11: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
Clayton Groeneveld
066b281db8 UI: Ignore resizing item when it is locked
Fixes https://github.com/obsproject/obs-studio/issues/5724
2022-01-07 15:18:59 -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
Matt Gajownik
e00195ad6f UI: Don't recreate entire Hotkey Settings tab
This replaces the programmatic generation of the hotkeys tab with XML.
Also fixes a memory leak. Reuses concepts from LoadAudioSources().
2022-01-05 23:56:34 -08:00
Matt Gajownik
a46f56a3e9 UI: Fix taskbar icon visibility on light backgrounds
When running Windows 10 or 11 in light mode, the pause icon especially
was hard to see. This adds a border to both icons to improve visiblity.
Additionally, the active icon was a little too large.
2022-01-05 21:13:19 +11:00
Cody Jung
8929798d4d UI: Immediately apply tray icon change on Apply
Rather than waiting until the user chooses OK or Cancel to update the
system tray icon status, update it when the user chooses Apply.
2022-01-05 20:53:17 +11:00
Matt Gajownik
65b4ba7939 UI: Fix compile error in UpdateEditMenu from rebase 2022-01-05 17:12:55 +11:00
gxalpha
5b87a842ee UI: Correctly enable edit menu items with multiple sources 2022-01-04 21:39:57 -08:00
gxalpha
648b47a6f5 UI: Reenable copy/paste transform 2022-01-04 21:39:57 -08:00
jp9000
f295bd9968 Revert "UI: Add checks for overwrite setting to replay buffer"
This reverts commit 02f3495b72.

Multiple issues have come up with this commit. One issue is that
suddenly replays are overwriting themselves despite the option being
disabled. Second issue is that slashes to separate files into
subdirectories no longer work properly with replay buffers.

I'm just reverting it. I do not care enough about this feature to try to
fix it or wait on a fix. If someone wants to fix it they can create a
new PR for it.
2022-01-04 20:42:58 -08:00
gxalpha
608219ad6b UI: Fix "Null 'source' parameter" warning 2022-01-04 02:08:18 -08:00
Norihiro Kamae
2fc83f9408 UI: Do not localize timestamp in log file
Millisecond time in the log was added in 36ad777b8 but the millisecond
was not always added just after the second digits depending on locale
settings. To make consistency in the log file, `%T` is specified for
`strtime` instead of `%X` so that the time format is not localized.
2022-01-04 02:02:59 -08:00
gxalpha
9f15a58483 UI: Correctly disable "Paste Duplicate" if required 2022-01-04 02:01:28 -08:00