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

2699 Commits

Author SHA1 Message Date
Richard Stanway
f021da2afa UI: Copy result of getenv before use
Another call to getenv, as well as a call to the POSIX functions
setenv(), unsetenv(), and putenv() may invalidate the pointer
returned by a previous call or modify the string obtained from a
previous call.

https://en.cppreference.com/w/c/program/getenv
2022-10-15 16:17:46 -07:00
Richard Stanway
daee83373c UI: Remove unused assignments 2022-10-15 16:17:46 -07:00
PatTheMav
e2db9b7f70 UI: Fix possible crash due to UI property access from graphics thread
Selection state can change by main thread while UI thread (which
calls DrawSpacingHelpers) tries to evaluate the amount of selected
items. Get amount of selected items by enumerating over the scene data
instead (which stays within the graphics thread).
2022-10-15 16:06:50 -07:00
Richard Stanway
e93ad13529
UI: Don't offer current resolution in auto config if < 240p
Fixes #3612.
2022-10-13 23:13:27 +02:00
Ryan Foster
b2ff22a587 UI: Swap mq and hq NVENC Preset mappings
The old preset "mq" was "Max Quality", which used the old HQ preset with
two-pass enabled. The old preset "hq" was "Quality", which used the old
HQ preset without two-pass. Of the two, "mq" would have been considered
"slower" or "higher quality" than "hq", so let's swap these entries.
2022-10-12 21:21:03 -07:00
Chip Bradford
5054e5739a UI: Use transform to fit vcam source to canvas 2022-10-11 15:38:30 -07:00
Chip Bradford
2af28d62e9 Revert "UI: Remove individual sources (for now) from vcam config"
This reverts commit 7c8995c20f.
2022-10-11 15:38:30 -07:00
gxalpha
767d6dafd0 UI: Move "Always On Top" into View menu 2022-10-09 16:53:54 -07:00
gxalpha
e4a9c7da9c UI: Add multiview menus to UI file 2022-10-09 16:53:54 -07:00
tytan652
47fcaed8d3 UI: Fix NVENC AV1 preset while resetting encoders 2022-10-09 16:26:29 -07:00
PatTheMav
8f362fe508 UI: Clamp float values possibly representing infinity to integer size
Casting a floating point type to an integer type has undefined behaviour
if the value does not fit into the destination type.

As the volume meter is initialized with floats values representing +inf
(as makes sense for a dB meter), values should be explicitly clamped
to integer boundaries.
2022-10-09 16:20:03 -07:00
jp9000
614bf960d9 UI: Add NVENC AV1 to simple output mode 2022-10-07 14:34:39 -07:00
cg2121
193d48f5d9 UI: Fix alignment of volume sliders
With the Yami themes, the volume sliders wouldn't
be aligned in the center of the layout.
2022-10-02 10:31:26 +11:00
Norihiro Kamae
d69fbccae2 UI: Fix tabstop on settings dialog 2022-10-01 16:24:32 -07:00
Norihiro Kamae
9875cde6c4 UI: Remove unnecessary styles 2022-10-01 16:18:26 -07:00
PatTheMav
8a4cf4b739 UI: Fix AutoRemux not working when FFmpeg output configured
When the Advanced Output configuration is set to use custom FFmpeg
output, automatic remuxing is disabled. Unfortunately this check will
also take place even if Simple Output is used (as the value is set in
the configuration data, but is not "active").

This check ensures that the check for custom FFmpeg output is only
applied when Advanced Output is enabled.
2022-10-01 07:07:32 -07:00
gxalpha
dc30cf0843 UI: Don't reselect SceneTree items if tree is clearing
In the scene tree, we currently prevent deselecting items by
automatically reselecting a new one to workaround a regression in Qt 6.2
that would let users unselect items even in SingleSelection QItemViews.
When clearing however, we explicitly want to unselect the currently
selected item, so we should avoid reselecting it in the SceneTree.
2022-09-30 05:41:35 -07:00
derrod
cc2ecbe89c UI: Remove executable bit from public key file 2022-09-30 01:57:24 +02:00
cg2121
048b6524e3 UI: Fix color of popout icon
In the light theme, the dock popout icon was the wrong color,
basically making it invisible.
2022-09-25 09:29:32 +10:00
cg2121
3d1f4fc757 UI: Fix dock titlebar icons not loading
The icons had the wrong name in the qss files. The docks were missing
the icons on at least Linux. I have no idea why the dock icons still
worked on Windows though.
2022-09-25 09:22:20 +10:00
jpark37
a34fae0327 libobs,UI: Swap red/blue render/output channels
Don't need to unswizzle channels for DeckLink output in the future.
2022-09-24 16:06:34 -07:00
Matt Gajownik
493270e022 frontend-tools: Display dialog when changing Python version
Runtime switching of Python version is not supported.
2022-09-23 12:08:11 +10:00
Matt Gajownik
1b2fc73021 frontend-tools: Display Python version in UI 2022-09-23 12:08:11 +10:00
jp9000
d7c7180a8c obs-ffmpeg: Update NVENC to new presets
(This commit also modifies the UI)
2022-09-22 02:42:32 -07:00
PatTheMav
5a16239ed6 UI: Fix crash when removing filter after changing a value
Deleting a filter will trigger a visibility change, which will also
trigger a focus change if the focus has not been on the list itself
(e.g. after interacting with the property view).

When an async filter list is available in the view, it will be the first
candidate to receive focus. If this list is empty, we hide the property
view by default and set the view to a `nullptr`.

When the call for the visibility change returns, we need to check for
this possibility, as another event might have hidden (and deleted) the
view already.
2022-09-21 14:32:09 -04:00
shiina424
5eaf95a2b9 UI: Fix Light theme Studio Mode labels and T-bar 2022-09-21 13:49:29 -04:00
PatTheMav
1b57419670 UI: Update volume controls decay rate on profile switch
Without this change the decay rate would only be updated when an audio
source is added or when the volume meter itself is changed (e.g. from
horizontal to vertical layout).
2022-09-20 20:32:33 -04:00
cg2121
ffbcbaece8 UI: Refine YouTube dialog
- Make the settings a scroll area. This makes it work on smaller screens and
if more items are added in the future, the dialog doesn't get bigger.

- Made the additional settings label bold to distinguish better.
Also removed the colon, as I felt it wasn't needed because it is
now bold.

- Made the margins consistent between the settings and events pages

- Made the scrollbar show only when needed in the events page

- Moved the remember settings checkbox to the top of the settings because
it just seems better to be there.
2022-09-18 02:10:38 +02:00
PatTheMav
43dc65beec UI: Fix source name edit textbox not accepting input on enter
The Enter key is connected to the `Edit` function and is handled by
Qt with the highest priority in its key event handler. Alas the boolean
return value is not propagated to the shortcut handling system, so
the key event will always be consumed and as such the user will be stuck
in editing state.

To fix this, `Edit` needs to behave like a toggle, saving the current
state of the input at a repeat press of Enter while in editing state.
2022-09-17 16:27:25 -07: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
PatTheMav
c01d6bf4f7 UI: Fix hotkey settings screen not accepting all input on macOS
By default Qt will hand off key events to platform-native input methods
on macOS because the OS or additional software can intercept key input
and transform it (e.g. the international variations popping up when
holding down the key for certain letters).

This functionality can lead to certain key combinations being ignored
because they don't call the delegate methods implemented by Qt to
handle the input after it's been interpreted by the Input Method.

Disabling Input Methods for hotkey input fields fixes this issue, as the
native input methods are bypassed entirely and the key events are
handled by the widget and its keyboard events directly.
2022-09-17 16:10:30 -07:00
Matt Gajownik
88a51dbf97 UI: Don't mark all widgets in main window as native on macOS
This significantly improves undocking behaviour on macOS for most docks.
Previously, undocking would perform an undock rather than undock + drag.
This does not fix the behaviour for browser docks as they are native.

May also improve performance of the main window, regardless of dock state.

See 3224c6d7d1
2022-09-11 10:58:58 +10:00
gxalpha
860b309db8 UI: Remove spacing from scene and source tree
Due to QTBUG-106395, sources or scenes that are drag-and-dropped into
the spacing between other sources and scenes would currently go to the
bottom of the list, leaving users confused. Until that is fixed, we have
to remove this spacing.
The call in scene-tree.cpp was redundant anyways, should this commit get
reverted in the future it doesn't need to be re-added.
2022-09-10 16:32:46 -07:00
Matt Gajownik
1aad58c0c4 UI: Don't save/overwrite browser docks if CEF hasn't loaded
OBS only populates the extraBrowserDocks list if `cef` is valid. By
saving docks regardless of whether `cef` is valid, this can result in
the user's custom docks being cleared unexpectedly.
2022-09-10 16:18:55 -07:00
jpark37
cfd8f06122 decklink-output-ui: Set preview color range 2022-09-10 15:36:27 -07:00
Jim
646d47aacb UI: Fix non-Windows vstrprintf
vsnprintf is called twice; one call must use args, and one must use
args2 (which is how it was supposed to be from the beginning). Each call
"consumes" its va_list parameter, so they each need to use a separate
copy. Fixes potential corruption and/or crashing when calling vsnprintf.
2022-09-09 23:25:31 -07:00
Richard Stanway
47e441b2e5
UI/updater: CMake: Add /utf-8 to MSVC command line
Fixes compiler interpreting UTF-8 as individual bytes when building the
wide string and showing the wrong characters.

Fixes #7304.
2022-09-05 22:51:15 +02:00
Richard Stanway
1cae3d4a3c
UI/updater: Fix manifest XML namespace for dpiAware setting 2022-09-05 22:49:11 +02:00
derrod
e8dc70d0ee Revert "UI: Remove "Resize output (source size)" menu"
This reverts commit 829e906ac2.
2022-09-03 05:09:59 +02:00
Ryan Foster
7d853fb155 UI/updater: Only run updater on Windows 10+
OBS Studio 28 no longer supports Windows 7, 8, or 8.1, and Qt 6 will
fail to run on those versions. Users on those systems being offered the
update will end up in a state where OBS will not run if they install the
update. Let's prevent the updater executable from running on those
versions to avoid that scenario.
2022-09-02 18:03:17 -07:00
jp9000
7396c211be UI/updater: Fix files with similar hashes clashing
Do to multithreading the update process, files of the same hash can
sometimes collide due to race. Ensure the filenames are all unique by
appending an incremented value for each file.
2022-08-31 20:51:21 -07:00
jp9000
e87a97eb8c UI/updater: Fix silent failure on auto-update 2022-08-31 20:19:11 -07:00
Richard Stanway
31414d2d7a
UI/updater: Fix wrong parameter order for MessageBox 2022-09-01 00:44:57 +02:00
Richard Stanway
854d75919f
UI/updater: Use a unique temp path for patch files
Fixes a case where patches for the same destination file but different
source files would clobber each other and cause integrity check
failures.
2022-09-01 00:37:53 +02:00
cg2121
1d8bfb833a UI: Remove button box setIcon
Since these are now set in the stylesheets, these lines are not
needed anymore.
2022-08-31 11:05:24 -07:00
shiina424
dd94399acd UI: Fix Previous icon in System 2022-08-31 11:04:19 -07:00
shiina424
91e8346447 UI: Fix padding on context bar buttons in Dark 2022-08-31 11:04:10 -07:00
jp9000
361eebc6f3 UI: Fix scene list crash
The original change in obsproject/obs-studio#7200 seems to have been
based upon the idea that if the "selected" parameter has no values, then
the "deselected" parameter must have values, which is clearly an unsafe
assumption to have make given that it causes an assert crash in Qt when
both parameters have 0 values contained within them.
2022-08-31 10:43:53 -07:00
田七不甜
9fcf906409 UI: Fix "Stop Virtual Camera" button color 2022-08-30 23:00:23 -04:00
gxalpha
bbd1e8b485 obs-ffmpeg: Always reset timestamp 2022-08-30 22:41:29 -04:00