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

35 Commits

Author SHA1 Message Date
Joshua Berenhaus
f56ab9a38b UI: Set focus back to label after source rename
Fixes obsproject/obs-studio#3465
2020-10-09 14:01:25 -07:00
Colin Edwards
fddbbe259d UI: Source Toolbar
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>
2020-08-17 07:18:18 -07:00
Clayton Groeneveld
2fe749fc84 UI: Make select/deselect signals work w/ group items 2020-05-19 06:36:00 -05:00
Matt Gajownik
c50f488085 UI: Dynamically set widget index when renaming sources 2020-03-04 19:22:30 +11:00
jp9000
9f1c442d35 UI: Add option to toggle source icons to View menu 2020-01-20 23:19:32 -08:00
Clayton Groeneveld
4e85843d4e UI: Fix source icons being shifted to the right 2019-12-03 05:55:52 -06:00
Clayton Groeneveld
82ffcdc827 UI: Add source icons 2019-11-24 20:50:42 -08:00
jp9000
3064887ae2 Revert "UI: Various screen reader fixes"
This reverts commit b5843caa48.

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.
2019-09-12 13:55:31 -07:00
VodBox
b5843caa48 UI: Various screen reader fixes
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.
2019-09-04 12:43:56 +12:00
VodBox
128b90af9d UI: Add box select to preview
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.
2019-08-17 07:42:14 -07:00
jp9000
d5d8492bb3 UI: Add LineEditChanged and LineEditCanceled
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.
2019-08-08 03:25:33 -07:00
Richard Stanway
183cc920c8 UI: Avoid ternary operator for mixed types 2019-06-29 01:28:16 +02:00
jp9000
f53df7da64 clang-format: Apply formatting
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.
2019-06-23 23:49:10 -07:00
Chris Angelico
2fe641b8a4 libobs, UI: Implement item_locked event
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.
2019-06-15 16:09:10 -07:00
jp9000
4d3414a1ce UI: Fix editor inheriting source list stylesheet
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.
2019-06-11 22:20:51 -07:00
jp9000
b5b11dbf47 UI: Fix bug with custom source list item color
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.
2019-06-11 21:31:26 -07:00
Clayton Groeneveld
189e48835d UI: Change icons to svg
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
2019-04-22 01:50:03 -07:00
Colin Edwards
ff72e9efc3 UI: Show a message in the empty source list 2019-04-12 04:17:39 -07:00
Anthony Torres
fdae1bbc0f UI: Add text autoselect for source rename 2019-04-08 02:14:06 -07:00
jp9000
1b8ecae3b9 UI: Fix potential race condition for hover items
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.
2019-02-11 15:30:56 -08:00
jp9000
476716798b UI: Fix being unable to drag/drop source list items 2019-02-09 12:56:48 -08:00
VodBox
6c880fb3c8 UI: Change preview handles/outline and add hover 2019-02-08 20:58:40 +13:00
jp9000
0a202ab77b UI: Fix potential race condition
The signal mutex can be locked within other signal mutexes, causing a
potential hard cross-lock when releasing certain sources.  Instead,
defer the Disconnect() call to the UI thread.

This fixes a potential freeze on exit.
2019-02-07 17:00:46 -08:00
jp9000
8f52179912 UI: Fix accessibility/narration text on sources list
Fixes the narration reading (for the blind) for items in the sources
list; previously they would not be read due to the new custom model.
This issue is solved by returning the name of item in the form of a
QVariant of a QString returned from the QAbstractItemModel::data virtual
function when the Qt::AccessibleTextRole role is used.
2019-01-20 00:55:56 -08:00
Shaolin
6c17c10e77 UI: Add rename scene/source shortcut
This creates a hidden QAction in sceneDocks and sourceDocks so we can
assign a shortcut to perform the renaming action.
2018-08-31 22:08:53 -03:00
jp9000
4e97b1bb30 UI: Fix macOS bug (scrollbar blocking lock icons)
Normally on macOS, scrollbars are supposed to appear/disappear as you
scroll, but they would be on top of the content you're scrolling.
However, Qt has a bug where if you apply a custom theme to scroll bars,
they no longer disappear.  This causes things under the scrollbar (such
as the lock icons in the sources list) to disappear under the scrollbar,
because macOS normally expects those scrollbars to face out.  This fixes
that issue by adding a space to the end of the sources list box items to
allow space for the scrollbar.
2018-08-28 20:38:31 -07:00
jp9000
448399d5ea UI: Fix group sub-item selection bug
If a group's sub-item is selected in the list box and you select the
group via the preview, the sub-item would be deselected, but that
deselection would not be applied to the sub-item in the list box despite
being deselected.
2018-08-16 12:40:45 -07:00
jp9000
fb58bcf75f UI: If users renames a source, only revert on Esc
Fixes a design flaw where if renaming a source, the source's name would
revert if you de-focused (clicked away) from the rename edit widget.
Instead, the functionality for revert should really only just be when
the user presses the Escape key.
2018-08-14 13:03:07 -07:00
VodBox
0dca4318b2 UI: Add Color Coding to Source Tree Widget
This commit adds the ability to select a background color for a
scene-item, whether it's a custom color or one of eight presets.

As this is an initial implementation, it lacks theme customizability,
and it also lacks the ability for the user to set their own preset
colors, so only the hard-coded 8 are available.
2018-08-02 08:23:12 +12:00
jp9000
573d5719d8 UI: Fix signals for sub-items of groups
Because sub-items of groups can no longer reroute their signals to the
parent scenes of groups, delegates removal handling to SourceTreeItem
instead of OBSBasic.
2018-07-16 19:03:34 -07:00
jp9000
5993834815 libobs: Change groups to actual public types
(This commit also modifies UI)

Changes groups to their own independent type, "group".  This allows them
to be used like other regular types, and allows the ability to reference
groups in multiple scenes.  Before, a group would always be linked to
the scene it was in.  This made it cumbersome for users to modify groups
if they had a similar group in multiple scenes (they would have to
modify each group in each scene).  Making groups like other source types
makes more sense to solve this issue so they can be referenced in
multiple scenes at once.  This also removes a significant amount of
group-specific handling code required for implementing groups in the
front-end.

One limitation however: due to the way sub-items of groups are
seamlessly modifiable and sortable as part of the whole scene, the user
cannot have multiple references to the same group within one scene.
2018-07-16 19:01:51 -07:00
jp9000
35704c4c04 libobs: Remove group_sceneitem from obs_scene struct
(This commit also modifies UI)

Removes obs_scene::group_sceneitem and replaces it with
obs_scene::is_group.  Changes a number of other functions related to
groups so that a group is not inherently tied to a specific scene, and
helps allow a single group to be referenced in multiple scenes if
desired.
2018-07-15 19:01:14 -07:00
jp9000
b760b24ff0 UI: Fix cramped source tree sub-widgets on macOS 2018-06-20 20:06:36 -07:00
SuslikV
488c087d69
UI: If group's name exist, start it from 2
Currently if you making a new group it named "Group 1" by default
instead of just "Group". This fixes it. The second group will be
named "Group 2".
2018-06-15 12:53:47 +02:00
jp9000
88b6c63964 UI: Add grouping 2018-06-04 04:01:39 -07:00