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.
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).
- 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.
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.
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.
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
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.
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.
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.
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.
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.
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.
Individual sources cannot be used as vcam outputs (yet) due to the fact
that they cannot currnetly scale. If a source is not exactly the same
dimensions as the canvas, there will be blackness on the right and/or
bottom of the source. It's just not currently usable as-is.
Scenes are a much better fit for this because users can transform
sources within scenes as they please to fit the canvas.
At a later point, we'll likely reintroduce this feature as long as
they're automatically transformed or something.
The script and scene switcher lists were not being styled.
This also sets the spacing to 1 for the filter, script, scene
switcher and properties view lists, the same as other lists.
With the addition of server-side release rate control, having the server
know if the update check was manually initiated can allow it to deliver
the update to the user even if they would normally not be eligible.
Windows only.
When hovering over the source tree items, sometimes the preview
would show the item hovered, sometimes not. This is caused by
the SourceTree mouseMoveEvent/leaveEvent calling the same functions
as the SourceTreeItem enterEvent/leaveEvent, therefore competing
with each other, causing some jankiness.
The x() and y() values of coordinates for events inside a scrollable
QWidget are relative to viewport's scrolled origin, the coordinates of
the upper left corner of the visible space, not the widget's true
origin. Since we do not allow horizontal scrolling, the value of x() is
okay. However, the value of y() needs to be adjusted by an offset of the
top()/y() value for the first widget in the SceneTree. When not
scrolled, this offset will be 0. When scrolled down, this offset will be
a negative value.
The UI layout math used to determine if scrollbars should be displayed
in the Scenes Dock was off by one pixel. This caused the scrollbar to
disappear when performing actions while scrolled to the bottom, such as
dragging items or resizing the dock.
Calling resizeEvent for SceneTree after a dropEvent has occurred
prevents a dropped item from being displayed in the incorrect location
while in Grid Mode. There might be a better way to fix the incorrectly
displayed location of a dropped item, but we already do this in
SetGridMode and rowsInserted, so this is probably okay.
Attempting to resize the Sources dock to be smaller than when initially
loaded would result in the contents of the list to never shrink.
Switching to another scene & back would temporary fix the sizing.
Fixes an issue introduced in adba393ca8
Bug introduced with adba393ca8
OBS would crash when adding a new source because the source tree item's
widget would be NULL in the sizeHint function when the list item is first
created.