Due to the way the frontend works, the logic for inserting the row for
the group in the UI was dropped since the new item_add message will
insert one automatically since it forces a refresh of the scene items.
The reliance on that implicit row insertion when grouping items is a
bit of a code smell, although the alternative would be to add logic to
disable handling the signal for that instant, which is probably a
worse choice.
Previously, calling `obs_source_remove()` on an input would not fully
remove it if there was a scene item of the input on the current scene.
Now, when calling `obs_source_remove()` and there is a scene item of
the removed input on the current scene, the UI refreshes the scene
items, allowing the scene item to be released completely and the
input destroyed.
This reverts commit f832d14220b572165bf69ad73f30a5b961d02258.
Reverting this until we do more investigation. Currently, any text
that can be typed in a dialog requires the dialog to re-enable hotkeys
on destruction, which is frustrating. There has to be a better way.
Disable hotkeys when a user starts an interaction with the UI where they
are expected to type text and re-enable hotkeys when the interaction is
completed.
Dims the items of hidden sources in the sources dock to make it more
obvious that they are not visible. Both the icon and the sources name
are affected.
The undo/redo functions are setting the current scene. Everytime
it would do this, it would actually transition to the scene.
This forces the current scene, so it fixes a bug where the
transition would be grayed out when undoing/redoing.
While getting source list, we should ignore scene source which has been
removed. If we don't ignore it, a deleted scene source will be added
later. Besides, signals of that scene have been sent before, such as
"remove" of scene. So we can't remove this scene source by "auto
removeItem" defined in SourceTreeItem::ReconnectSignals().
Fixesobsproject/obs-studio#2602
Implements the Undo/Redo for scenes and sources, ranging from renaming,
deletion, addition. It also adds several elements to libobs that were
designed to facilitate undo/redo, and should not affect the rest of
libobs.
This changes cleans up some deprecated functions that were removed in
Qt6. Some are placed behind version ifdefs and others are replaced for
their non-deprecated Qt5 version.
With the queued connection in d68484e7, the "Deselect" signal for
sources which are being deleted is never fired, as the object is gone by
the time the queued signal is processed. This results in the context bar
not updating.
This commit adds a new UpdateContextBarDeferred function, allowing
queuing of only the context bar update instead of the whole signal
handler.
The (de)select signal can come from a obs_scene_enum_items
which locks the scene. The Qt::QueuedConnection makes sure
the (de)select is handled outside of that lock.
Fixes the deadlock from #3673
This commit fixes various issues with screen readers in the main OBS
interface. These were tested using NVDA on Windows 10 2004.
Audio track selection in Settings now says Track 1, 2, etc, rather than
just the number.
Various checkboxes that just say "Enable" now have accessible text that
says what the enable is for (since it says "checkbox", the fact it's an
enable should hopefully be clear).
Type in the recording tab of output now has accessible text which says
"Recording Type".
Items in the Advanced Audio Properties window now have accessible text
for what they are for. Currently some do not report correct values, but
that will require an accessible interface in Qt to be written
specifically for that, which will be done at a later date.
Buttons in the filters window now have accessible text for what they do.
All the right side buttons in hotkeys now have tooltips, and by
extension, accessible text.
The source toolbar allows quick and easy access to properties and
filers, and shows common properties/features of a source type. For
example, when you select a media source, VLC source, or the slideshow
source, you'll get media controls to control playback of the media. If
you select a text source you can edit the font, color, or text if
applicable. Or if you select a capture source, you can select the
display/window/etc to capture for that source.
If the source toolbar is not desired and is viewed as taking up valuable
space in the window, it can be disabled via the view menu.
Co-authored-by: Clayton Groeneveld <claytong1214@gmail.com>
Co-authored-by: Jim <obs.jim@gmail.com>
This reverts commit b5843caa484068d6fcc5f5fe8ee2dc06078500ff.
This breaks some hotkeys because the signals are tied to a signal which
is now triggered because "toggled" is used instead of "clicked", so just
revert it for now for the release and look at it later post-patch.
This commit fixes various issues with screen readers in the main OBS
interface. These were tested using NVDA on Windows 10 1903.
Checkboxes or buttons which toggle, when receiving an activate signal
from the screen reader would visually update, but not perform any
action. This is because they're listening only for clicks. They should
all now be listening for toggles instead.
The screen reader would navigate through the UI in the order that
elements are defined in the .ui XML, and not by their row positions.
The XML has been reordered so that things should be defined in their row
order.
Audio track selection now says Track 1, 2, etc, rather than just the
number. Various checkboxes that just say "Enable" now have accessible
text that says what the enable is for (since it says "checkbox", the
fact it's an enable should hopefully be clear). Type in the recording
tab of output now has accessible text which says "Recording Type".
All the right side buttons in hotkeys now have tooltips, and by
extension, accessible text. Currently it does not yet say what hotkey
the action is in relation to, but that would require more locales.
This change adds the ability to box select by clicking and dragging from
an empty part of the preview.
Shift + Drag add any items in the box to the selection. Alt + Drag will
remove items in the box from the selection. Ctrl + Drag inverts the
selected state for items in the box.
These functions allow item delegates (editors) or item widgets with
event filters to detect whether a user has finished editing a line edit
control. This separates the code so it can be used elsewhere than just
in the source tree widget.
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.
Similar to item_visible, this event fires whenever a scene item is
locked or unlocked. This allows the UI and libobs to remain in sync
regarding scene elements' statuses.
Fixes a bug where if the user gave a custom color to a source list item,
the edit box used with renaming the item would also have that
background color while editing the name, awkwardly.
If the user gave the source list item a custom color, the "background"
stylesheet value would apply to children of the item widget, causing the
lock/eye checkboxes to also have that background color added on top of
the chosen color. This is fixed by explicitly settings the background
value to none on the lock/eye checkboxes.
This changes all of the icons from png to svg. With svgs, scaling is
unlimited. With the svgs, the issue of the @ symbols with the Windows
updater is no longer an issue.
I changed the colors of the icons to a light gray (#d2d2d2), in the
dark themes, because I thought they looked better with this color.
The mute, unmute, plus, minus, up, down and expand icons are from the
Feather Icons set. https://feathericons.com/
The visibility icon is from the Octicons set. https://octicons.github.com/
The locked and unlocked icons are from the Open Iconic set.
https://github.com/iconic/open-iconic
The graphics thread should not be accessing any Qt objects that aren't
guaranteed to exist. Instead, store the currently hovering list/preview
scene items in the preview class.