Commit graph

42 commits

Author SHA1 Message Date
tytan652 3b87098508 UI: Fix double confirmation dialog while discarding source change
QDialog::closeEvent() already calls the reject() function, the override
of the former function was actually allowing a first confirmation dialog
which once discarded gets re-openned by QDialog::closeEvent().

Removing most of the closeEvent() override code is enough to fix the issue
since reject() will be called showing the confirmation dialog.
2024-04-13 16:54:32 -07:00
gxalpha e8147a9abb
UI: Replace SIGNAL and SLOT macros in properties-view 2023-07-21 13:16:04 +02:00
gxalpha a4834efde9 UI: Remove Qt 5 ifdef guards and code 2023-07-12 13:22:13 -04:00
derrod 67f7712d83 UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
gxalpha 1437a6e4fc UI: Explicitly focus Ok button in properties dialog 2023-04-29 16:07:38 -07: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 644b73eb46 UI: Add confirmation dialog for resetting properties 2023-02-20 23:46:01 +01:00
mvji 80600c1c26 UI: Fix compiler warning when WIN32 is not defined
Fix unused parameter warning.
2022-04-23 16:12:45 -07:00
Matt Gajownik dbb063eae6 UI: Create Properties window XML file, migrate code
window-basic-properties was written in the earliest days of OBS. To
make it easier to navigate & adjust, this moves all the structural
code into a new .ui file and out of the C++ code.

This also modifies the ButtonBox in Filters to use matching buttons.
2022-04-10 11:52:11 +10:00
Kurt Kartaltepe ec05e1ff57 UI: Avoid calling obs_source_update multiple times
When we added undo/redo in 86eb7aeb a distinction between Updates and
Visual updates was made, presumably for filters which need special
handling of the update case. These functions were also added to regular
source properties, but didnt use any special code instead calling
obs_source_update an additional time after a short time.

Instead lets remove the 2nd delayed call and only call obs_source_update
once per settings change.
2022-03-08 08:35:02 -08:00
jpark37 61ffb5c4d8 UI: Add OBSQTDisplay::OnMove()/OnDisplayChange()
This plumbing will be useful when handling color space changes.

Currently does nothing, and only Windows is wired for now.
2022-02-26 01:09:07 -08:00
Matt Gajownik ffc55b2d3a UI: Fix crash when opening transition Properties dialog
Crash was introduced in ae4797f8cc. It seems with that change, this
function call is no longer necessary.
2022-01-11 18:22:15 +11:00
gxalpha 0416c71749 UI: Update context bar when exiting properties dialog 2022-01-08 12:28:18 +11:00
VodBox 3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
gxalpha 8f0964c2dd UI: Don't save defaults in oldSettings in properties
The default settings were saved in the oldSettings variable of the
properties dialog in `86eb7ae` to be able to restore default settings in
undo/redo, but this doesn't actually do anything.
Besides this, it introduced a bug where clicking "Cancel" in the
properties dialog would save all settings, including default ones, as
well as a bug where not changing anything in the properties dialog would
still add an undo action.
2021-10-16 15:07:13 -07:00
jp9000 da04907927 Revert "UI: Disable hotkeys when a user is expected to type text"
This reverts commit f832d14220.

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.
2021-10-03 07:52:44 -07:00
tt2468 1f504c6ba4 UI: Fix used source for SetCurrentScene during undo 2021-09-13 19:17:11 +10:00
Ryan Foster f832d14220 UI: Disable hotkeys when a user is expected to type text
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.
2021-09-04 15:22:21 -07:00
jp9000 b685d1bf88 UI: Fix proprty Undo not updating settings properly
Settings would not update properly because obs_source_update() can only
apply the settings value to the existing settings, so it could not
remove values. This change fully erases existing settings and replaces
it with the target settings instead.
2021-04-30 18:38:31 -07:00
jp9000 78f1983f7d UI: Remove unnecessary Undo/Redo cleanup func
Since fixing the reference holding issue with scene/source deletion, the
undo/redo cleanup function (last param of add_action) is no longer
required.
2021-04-27 20:45:43 -07:00
Clayton Groeneveld 7dfd36f9e8 UI: Force current scene when using undo/redo
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.
2021-04-10 01:49:30 -07:00
Jim 5d87f3c00b
Merge pull request #3426 from Programatic/undo_redo
UI: Implement Undo/Redo System
2021-03-30 03:16:24 -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
Exeldro 32e7ba1abe UI: Add visibility transitions
This also modifies libobs.

This adds the ability for scene items to have transitions
when their visibility is toggled.
2021-03-16 22:15:16 -07:00
jpark37 e08ad9faf3 UI: Render previews in linear sRGB space
Necessary for correct alpha blending.
2021-01-21 07:42:57 -08: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
jpark37 cc7d67d050 UI: Redundant/bad casts 2019-08-17 08:49:08 -07:00
Clayton Groeneveld 5f7f2c1c97 UI: Fix compiler/Acri warnings 2019-08-15 03:00:06 -05: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
VodBox d2bbe36e64 UI: Fix transition A/B labels on macOS/Linux
Previously, if the video size in OBS was too big, the labels would not
render on macOS/Linux due to the labels not fitting inside the texture
in the freetype plugin. This change makes it so that there is a maximum
size for the label, rather than being solely based on video size.

This change also makes the labels look centered on macOS/Linux, as
unlike the GDI plugin on Windows, the freetype plugin aligns the bottom
of the text with the bottom of the source.
2019-06-01 23:59:35 +00:00
VodBox 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
Richard Stanway 43fbefb9ef UI: Remove additional unused help icons 2019-02-12 12:55:31 +01:00
bth 12265ac449 UI: Fix Defaults button not triggering UI update
Update all UI at default values when clicks "Defaults" button in the
source Properties.

This fixes mantis issue 1242.

Closes obsproject/obs-studio#1592
2019-01-05 07:12:02 -08:00
Alex Anderson 57f8c5e328 UI: Hide preview for sources and filters where possible
Hides the preview window for audio sources in the properties menu and
contextually in the filters menu to save on gui space.
2018-07-31 13:14:32 -07:00
Matthew McNamara d8743a2872 ui: Fix unsaved changes dialog showing twice
When clicking the close button with unsaved changes in a source properties
dialog closeEvent and reject are called, which both call ConfirmQuit.
This fixes it by setting the acceptClicked flag correctly in ConfirmQuit
2017-12-08 01:32:40 +01:00
Christoph Hohmann 27a8f69eea UI: Use Qt standard buttons in source properties
Use the Qt standard buttons in the source properties dialog to make the
UI consistent.  Also remove the right alignment of the button box to
allow Qt to align standard buttons on the left side of the dialog.

Closes jp9000/obs-studio#1013
2017-09-15 04:05:32 -07:00
jp9000 14e41dc0c1 UI: Make sure "Defaults" buttons aren't default buttons 2017-06-28 09:20:52 -07:00
cg2121 2d84da2f7e UI: Add "Defaults" button to filters/properties windows
This adds a "Defaults" button in the source and filter properties, which
will clear and reset all settings.

Closes jp9000/obs-studio#875
2017-06-26 17:44:34 -07:00
jp9000 522f5cdf3b UI: Make sure all message box buttons are translated
Instead of QMessageBox::question and QMessageBox::information, use the
OBSMessageBox class, which translates all buttons.
2017-05-13 14:06:32 -07:00
Michael Fabian Dirks bd606785fe UI: Split Properties window with a QSplitter
Closes jp9000/obs-studio#645
2016-10-09 18:47:32 -07:00
jp9000 01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00
Renamed from obs/window-basic-properties.cpp (Browse further)