Commit Graph
53 Commits
Author SHA1 Message Date
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
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
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
Richard StanwayandJim 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
ExeldroandJim 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
VodBox 3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
jpark37andJim c93b040d0d UI: Use patterns that avoid std::min/max
New code is cleaner anyway.
2021-10-10 19:12:45 -07:00
Matt GajownikandDillon Pentz 74c3781554 libobs, UI: Add support for button properties as links
This adds support for a button property that opens a URL, after showing
a confirmation dialog to the user. Both the Type and URL must be set.
2021-07-09 17:32:09 +12:00
jpark37andJim bd98e41ca1 UI: Fix rounding truncation
Set decimal places before value on QDoubleSpinBox to preserve precision.
2021-05-02 10:01:29 -07:00
jpark37andJim 01cf13ac51 UI: Increase float property decimals based on step
Values are no longer truncated if a small step is specified.
2021-04-13 04:48:36 -07:00
Ford SmithandFord Smith 86eb7aeb69 UI: Undo/Redo Properties and Filters
Implements undo/redo for both properties and filters. Works by creating
a new callback that gets called to save undo/redo states after a timer
is fired. Also disabled undo/redo until the actions have completed to
prevent a user from being able to disrupt the stack by perfoming actions
before others have finished.
2021-03-29 03:06:26 -04:00
jpark37andJim 0d1ffd8b30 UI: Support color picker with alpha 2021-01-11 11:52:50 -08:00
Kurt KartaltepeandMatt Gajownik bf4ad780b5 UI: Fix disabled sliders
Previously sliders would not be disabled when the the obs_property was
disabled.
2020-12-02 21:56:56 +11:00
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
AngeredZeusandjp9000 4011e25e40 UI: Fix clickable text on properties with tooltips 2020-07-27 15:25:42 -07:00
Clayton Groeneveldandjp9000 762983b5d8 UI: Use non-native file dialog w/ Linux 2020-07-18 09:49:24 -07:00
JimandGitHub 2e9d6141ec Merge pull request #3140 from JohannMG/fix-rgb-colorpicker
UI: Make color display, don't show alpha value in color label
2020-07-10 20:35:22 -07:00
JimandGitHub 6347a221a0 Merge pull request #3050 from jpark37/qt-warnings-515
UI: Fix warnings for Qt 5.15
2020-07-10 15:30:26 -07:00
JohannMG ae4d7cd528 UI: Make color consistent, don't show alpha value
The color picker loads the label not showing alpha hex value but on
color change then shows the alpha level in the hex value (which is
hardcoded to 255).

This changes so the label always shows only RGB value.

Of course, can be easily changed back to ::Arbg later if a alpha picker
is added.
2020-07-08 17:00:38 -07:00
JimandGitHub d027c41165 Merge pull request #2954 from cg2121/property-list-reorder
UI: Allow drag & drop reorder of property lists
2020-07-07 19:30:33 -07:00
jpark37 c2ddc428b0 UI: Fix warnings for Qt 5.15
AllDockWidgetFeatures is now deprecated. Use underlying values instead.

Use default QFlags constructor instead of nullptr/0.

Use QWheelEvent::angleDelta() in place of orientation() and delta(), and
position() in place of x() and y().
2020-06-21 18:23:05 -07:00
Richard Stanway eee7862363 UI: Don't show alpha value for color source
This isn't editable by the user, so it doesn't make sense to show it.
2020-05-23 01:15:02 +02:00
Clayton Groeneveld 29b2f11e7a UI: Allow drag & drop reorder of property lists 2020-05-19 00:13:20 -05:00
jp9000 f4f74f0d4f UI: Remove unused variable
Closes obsproject/obs-studio#2843
2020-05-03 06:22:52 -07:00
Matt Gajownik a9a19cf351 UI: Use Qt dialogs for Font & Color Pickers on Linux
This fixes a hang on Ubuntu when closing the
dialogs after leaving them open for a time.
2020-03-28 23:15:25 +11:00
Matt Gajownik 51948ebc87 UI: Show help icon for properties with tooltips 2020-03-01 16:29:16 +11:00
Matt Gajownik 62504dc651 libobs/UI: Support monospace font in multiline text property 2019-12-30 10:11:17 +11:00
Matt Gajownik 9446ca5511 UI: Halve width of tab in multiline text property 2019-12-30 10:10:16 +11:00
jpark37 1ca4f0d1fe UI: Fix Qt deprecation warnings 2019-11-30 16:05:50 -08:00
Michael Fabian 'Xaymar' Dirks fefcf5468a UI: Fix checkable property groups 2019-10-16 07:26:21 +02:00
Michael Fabian 'Xaymar' Dirks bd8ead2d4b UI: Partially revert PR #1979
This broke support for various filters, sources and encoders and should not
have been merged as it is.
2019-07-27 19:21:46 +02:00
Clayton Groeneveld 3ea354b4e4 UI, obs-plugins: Add spinbox suffixes where necessary 2019-07-18 04:03:38 -05:00
Michael Fabian 'Xaymar' Dirks d2a71e6b1b UI: Fix toggled signal of property groups
The signal is actually called toggled(bool) and not just toggled(). Qt considers these two to be different signals.
2019-07-13 00:37:44 +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
VodBoxandjp9000 16484e07e9 UI: Add Transition Previews
This commit adds a preview to the properties window for transitions.

The preview will play back the transition at the global transition
duration or the transitions fixed duration, between two private scenes
with an A and B label, and different background colors.
2019-05-12 21:13:21 -07:00
SuslikVandGitHub 7bbd45f8d0 UI: Hide Alpha channel field from the color picker
Do not allow the user to select the alpha component of a color.
2019-05-04 16:55:31 +03:00
Clayton Groeneveldandjp9000 31b73f8025 UI: Add ability to set properties spinbox suffix 2019-05-02 08:54:14 -07:00
jp9000 72ccefff5f UI: Rename UI files for consistency
Changes comboBox-* and spinBox-* files to lowercase to be more
consistent with the rest of the files in the UI directory.
2019-04-21 04:10:46 -07:00
Michael Fabian 'Xaymar' Dirksandjp9000 5c0c512fc2 UI: Add support for property groups
Property groups are implemented in the UI using QGroupBox, which support
both the normal and checkable version of them.
2019-04-18 06:37:54 -07:00
akapar 9249403c96 UI: Ignore wheelEvent for properties
Ignore wheelEvent using subclass
slider,spinbox,combobox with eventhandlers:
wheelEvent - ignore if widget is not focused,
leaveEvent - clear focus when mouse leaves event.

Use these new subclass widgets in properties
to ignore wheelEvent when scrolling.
2019-04-13 12:09:11 -04:00
Clayton Groeneveld 659b58c8f3 UI: Fix file browser showing up when dir selected
Fixes: https://obsproject.com/mantis/view.php?id=1418
2019-03-31 06:36:13 -05:00
Colin Edwards 6f71afd527 UI: Use QT font picker on OSX 2018-08-22 21:23:00 -05:00
jp9000 78d566916b UI: Fix bug where color property shows transparency
Technically, setting the transparency value via a color property isn't
currently supported.  However, some sources/filters will set their alpha
portion of their color value to 0, which would cause the color property
to have a transparent background.  Set the alpha value to 255 for now,
at least until we properly implement support for setting transparency
via the color property (if we ever do).
2018-06-20 19:21:52 -07:00
jp9000 085af8bb72 UI: Fix display bug with color property
With the recent change to fix showing color in the color property widget
when using different themes (b8f03791ea), a bug was introduced:  when
opening filters with a filter that has a color property, it would sort
of "bug out" and recreate over and over.  This is likely due to
something internally with Qt and the stacked layout.  The stacked layout
really is not necessary, so remove the stacked layout and just use the
color label directly.
2018-06-20 19:21:47 -07:00
Justin Love a4b2b6f3bf Make alpha visible in property color
Show a light/dark pattern so alpha in the selected color is evident.
2018-05-26 09:23:05 -05:00
Justin Love 86b69b7d24 Use selected color in color property label
Originally wanted to do a separate color swatch, but was stymied by the
single widget reference in WidgetInfo. Using QPalette values achives
basic white/black text for contrast, though it is still possible to
select a color with poor contrast.
2018-05-23 11:50:41 -05:00
Alex Andersonandjp9000 e92b2560b6 UI: Add Selected and Hidden Array Values
Add Selected and Hidden Array Values

Let developers get and set whether items in an editable list are hidden
or selected. May be useful in when editable lists are modified and
handled in a callback. Especially when edit button callbacks are used.

Closes obsproject/obs-studio#1200
2018-04-18 21:06:16 -07:00
jamacanbacnandjp9000 8a59d68e47 libobs: Fix property text typo
(This commit also modifies UI)

Closes jp9000/obs-studio#1204
2018-02-27 05:37:40 -08:00
Joel Bethke 432e285257 UI: Add new theme, update theme capabilities
I have always felt that the out of the box themes for OBS were quite
lacking, and have spent a lot of time going through and sorting out the
difficulties with the current setup. I've added a new themeID parameter to
several elements that were otherwise impossible to target with QSS in a
theme. Since Qt has pushed for the use of QML over QSS at this point,
these should be considered workarounds. Included is the theme I was
working on that can serve as a base. I'm hoping to encourage others to
make their own themes, so we can grow the available themes for OBS.

I am happy for any feedback on the theme itself, or other updates that
can me made to make creating new themes easier overall.
2017-06-13 14:37:59 -05:00
jp9000 3544a2da48 UI: Fix property widgets not being disabled 2017-04-01 13:32:26 -07:00