Commit graph

82 commits

Author SHA1 Message Date
cg2121 04629afe68 UI: Adjust size policy for properties view
Now the properties won't be squished when making the properties
dialog smaller.
2023-07-17 17:46:46 -03:00
gxalpha f7d5d80b04 UI: Localize font picker window title 2023-07-15 16:20:04 -07:00
derrod 593664dcdb clang-format: Set AllowShortLambdasOnASingleLine to Inline 2023-07-15 16:14:55 -07:00
Yoshimasa Niwa 9ab5271d69 UI: Fix crash radio list without items
Check items count before accessing first item,
or it will crash due to out-of-bound access.
2023-07-08 16:08:21 -07:00
gxalpha fe2eee951b UI: Don't create combobox for radio buttons in properties view 2023-06-10 16:13:57 -07:00
tududweb 4871fd301a UI: Don't trigger a settings update when list is empty
To avoid recursive call
2023-06-07 12:50:48 -07:00
gxalpha 58fb63030c UI: Only defer property updates for input and transition sources
Deferring properties was only ever made for input and transition
sources. As other property dialogs do not have an "Ok" button that would
cause an update to happen, if the deferred flag was set the callback
would never be called.
Also clarifies the docs to reflect this.
2023-05-20 16:55:50 -07:00
gxalpha ad9fd6c6f0 libobs,UI: Add properties radio button list 2023-05-20 16:48:23 -07:00
gxalpha f049962bb2 libobs: Add properties list boolean format 2023-05-20 16:48:23 -07:00
derrod e8541b9e27 UI: Recalculate scroll position after resize 2023-04-05 21:26:10 +00:00
derrod d277a7541f Revert "UI: Only adjust size of properties on first draw"
This reverts commit 624a0da302.
2023-04-05 21:26:10 +00:00
cg2121 3a610c698e UI: Remove UNUSED_PARAMETER where unnecessary
Since cpp allows removing the unused parameters from the function name,
UNUSED_PARAMETER is not needed, unless it is in an ifdef.
2023-04-01 16:54:02 -07:00
derrod 624a0da302 UI: Only adjust size of properties on first draw 2023-03-29 19:16:56 +00:00
cg2121 290c1569a9 UI: Don't hardcode properties label colors
Makes the label have colors based on themes, instead of hard coding.
2023-03-04 16:21:01 -08:00
gxalpha e438037960 UI: Use native color dialog on macOS 2023-02-19 04:10:51 +01:00
tytan652 9e6a482c66 UI: Fix button callback in OBSPropertiesView created with an id
Before calling the button callback, two values are null-checked but when
the property is created with an id (const char*). Those values are null
which prevent the callback from being called.
2023-02-18 17:47:19 -08:00
derrod a0b5c1b3f5 UI: Fix properties widget being cut off until resize 2023-02-10 12:04:47 +01:00
gxalpha b5b293fe72 UI: Re-raise properties window after picking files on macOS 2023-01-28 15:09:49 -08:00
cg2121 9b13536cfd UI: Fix properties tool button styling
Set toolButton to true with the tool buttons in the properties widget.
2022-08-30 13:26:37 -04:00
cg2121 c3b0787544 UI: Make list widget styles consistent
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.
2022-08-30 13:26:20 -04:00
cg2121 ed32dcc677 UI: Force fixed font in plain text edits
Since the Yami QSS changes the default font for widgets, we need
to force the system fixed font for plain text edits.
2022-08-22 17:26:50 -07:00
cg2121 5d803058b4 UI: Fix settings properties view background
In the Yami theme, the background color in the properties view in the
settings dialog would be incorrect.
2022-08-13 16:02:00 -07:00
Norihiro Kamae b7d4ae8cf8 UI: Remove unnecessary UTF character 2022-08-13 00:49:17 -07:00
derrod 5620a469a9 UI: Remove compatibility for QT < 5.10 2022-07-31 21:47:01 -07:00
Norihiro Kamae 766d1bb5b1 UI: Search combo item with QVariant type
A combobox with `OBS_COMBO_FORMAT_FLOAT` type couldn't be initialized to
select current item from the settings data. This commit will create
QVariant value with the similar code as that of adding the items and
search the current item using that value.
2022-07-28 12:21:33 -04:00
tytan652 bf985946a4 libobs,UI,docs: Add info as text property sub-type in the property API 2022-06-26 17:31:59 +10:00
Matt Gajownik 2bb780468c UI: Fix formatting 2022-06-25 14:46:05 +10:00
Matt Gajownik 0135af9c34 UI: Use existing IsThemeDark() in more places 2022-06-25 14:33:52 +10:00
gxalpha e840966968 UI: Remove old ComboBoxIgnoreScroll 2022-04-02 16:04:51 -07:00
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 Stanway 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
Exeldro 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
jpark37 c93b040d0d UI: Use patterns that avoid std::min/max
New code is cleaner anyway.
2021-10-10 19:12:45 -07:00
Matt Gajownik 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
jpark37 bd98e41ca1 UI: Fix rounding truncation
Set decimal places before value on QDoubleSpinBox to preserve precision.
2021-05-02 10:01:29 -07:00
jpark37 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 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
jpark37 0d1ffd8b30 UI: Support color picker with alpha 2021-01-11 11:52:50 -08:00
Kurt Kartaltepe 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
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
AngeredZeus 4011e25e40 UI: Fix clickable text on properties with tooltips 2020-07-27 15:25:42 -07:00
Clayton Groeneveld 762983b5d8 UI: Use non-native file dialog w/ Linux 2020-07-18 09:49:24 -07:00
Jim 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
Jim 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
Jim 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