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.
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.
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.
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.
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.
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.
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>
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.
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.
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.
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
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.
Closesjp9000/obs-studio#1013