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

2675 Commits

Author SHA1 Message Date
PatTheMav
5a16239ed6 UI: Fix crash when removing filter after changing a value
Deleting a filter will trigger a visibility change, which will also
trigger a focus change if the focus has not been on the list itself
(e.g. after interacting with the property view).

When an async filter list is available in the view, it will be the first
candidate to receive focus. If this list is empty, we hide the property
view by default and set the view to a `nullptr`.

When the call for the visibility change returns, we need to check for
this possibility, as another event might have hidden (and deleted) the
view already.
2022-09-21 14:32:09 -04:00
shiina424
5eaf95a2b9 UI: Fix Light theme Studio Mode labels and T-bar 2022-09-21 13:49:29 -04:00
PatTheMav
1b57419670 UI: Update volume controls decay rate on profile switch
Without this change the decay rate would only be updated when an audio
source is added or when the volume meter itself is changed (e.g. from
horizontal to vertical layout).
2022-09-20 20:32:33 -04:00
cg2121
ffbcbaece8 UI: Refine YouTube dialog
- Make the settings a scroll area. This makes it work on smaller screens and
if more items are added in the future, the dialog doesn't get bigger.

- Made the additional settings label bold to distinguish better.
Also removed the colon, as I felt it wasn't needed because it is
now bold.

- Made the margins consistent between the settings and events pages

- Made the scrollbar show only when needed in the events page

- Moved the remember settings checkbox to the top of the settings because
it just seems better to be there.
2022-09-18 02:10:38 +02:00
PatTheMav
43dc65beec UI: Fix source name edit textbox not accepting input on enter
The Enter key is connected to the `Edit` function and is handled by
Qt with the highest priority in its key event handler. Alas the boolean
return value is not propagated to the shortcut handling system, so
the key event will always be consumed and as such the user will be stuck
in editing state.

To fix this, `Edit` needs to behave like a toggle, saving the current
state of the input at a repeat press of Enter while in editing state.
2022-09-17 16:27:25 -07:00
Richard Stanway
21c711d46b UI: Ignore left-click on non-multiview projectors
Fixes a crash that could occur after having both multiview and
non-multiview projectors active.
2022-09-17 16:19:24 -07:00
PatTheMav
c01d6bf4f7 UI: Fix hotkey settings screen not accepting all input on macOS
By default Qt will hand off key events to platform-native input methods
on macOS because the OS or additional software can intercept key input
and transform it (e.g. the international variations popping up when
holding down the key for certain letters).

This functionality can lead to certain key combinations being ignored
because they don't call the delegate methods implemented by Qt to
handle the input after it's been interpreted by the Input Method.

Disabling Input Methods for hotkey input fields fixes this issue, as the
native input methods are bypassed entirely and the key events are
handled by the widget and its keyboard events directly.
2022-09-17 16:10:30 -07:00
Matt Gajownik
88a51dbf97 UI: Don't mark all widgets in main window as native on macOS
This significantly improves undocking behaviour on macOS for most docks.
Previously, undocking would perform an undock rather than undock + drag.
This does not fix the behaviour for browser docks as they are native.

May also improve performance of the main window, regardless of dock state.

See 3224c6d7d1
2022-09-11 10:58:58 +10:00
gxalpha
860b309db8 UI: Remove spacing from scene and source tree
Due to QTBUG-106395, sources or scenes that are drag-and-dropped into
the spacing between other sources and scenes would currently go to the
bottom of the list, leaving users confused. Until that is fixed, we have
to remove this spacing.
The call in scene-tree.cpp was redundant anyways, should this commit get
reverted in the future it doesn't need to be re-added.
2022-09-10 16:32:46 -07:00
Matt Gajownik
1aad58c0c4 UI: Don't save/overwrite browser docks if CEF hasn't loaded
OBS only populates the extraBrowserDocks list if `cef` is valid. By
saving docks regardless of whether `cef` is valid, this can result in
the user's custom docks being cleared unexpectedly.
2022-09-10 16:18:55 -07:00
jpark37
cfd8f06122 decklink-output-ui: Set preview color range 2022-09-10 15:36:27 -07:00
Jim
646d47aacb UI: Fix non-Windows vstrprintf
vsnprintf is called twice; one call must use args, and one must use
args2 (which is how it was supposed to be from the beginning). Each call
"consumes" its va_list parameter, so they each need to use a separate
copy. Fixes potential corruption and/or crashing when calling vsnprintf.
2022-09-09 23:25:31 -07:00
Richard Stanway
47e441b2e5
UI/updater: CMake: Add /utf-8 to MSVC command line
Fixes compiler interpreting UTF-8 as individual bytes when building the
wide string and showing the wrong characters.

Fixes #7304.
2022-09-05 22:51:15 +02:00
Richard Stanway
1cae3d4a3c
UI/updater: Fix manifest XML namespace for dpiAware setting 2022-09-05 22:49:11 +02:00
derrod
e8dc70d0ee Revert "UI: Remove "Resize output (source size)" menu"
This reverts commit 829e906ac2.
2022-09-03 05:09:59 +02:00
Ryan Foster
7d853fb155 UI/updater: Only run updater on Windows 10+
OBS Studio 28 no longer supports Windows 7, 8, or 8.1, and Qt 6 will
fail to run on those versions. Users on those systems being offered the
update will end up in a state where OBS will not run if they install the
update. Let's prevent the updater executable from running on those
versions to avoid that scenario.
2022-09-02 18:03:17 -07:00
jp9000
7396c211be UI/updater: Fix files with similar hashes clashing
Do to multithreading the update process, files of the same hash can
sometimes collide due to race. Ensure the filenames are all unique by
appending an incremented value for each file.
2022-08-31 20:51:21 -07:00
jp9000
e87a97eb8c UI/updater: Fix silent failure on auto-update 2022-08-31 20:19:11 -07:00
Richard Stanway
31414d2d7a
UI/updater: Fix wrong parameter order for MessageBox 2022-09-01 00:44:57 +02:00
Richard Stanway
854d75919f
UI/updater: Use a unique temp path for patch files
Fixes a case where patches for the same destination file but different
source files would clobber each other and cause integrity check
failures.
2022-09-01 00:37:53 +02:00
cg2121
1d8bfb833a UI: Remove button box setIcon
Since these are now set in the stylesheets, these lines are not
needed anymore.
2022-08-31 11:05:24 -07:00
shiina424
dd94399acd UI: Fix Previous icon in System 2022-08-31 11:04:19 -07:00
shiina424
91e8346447 UI: Fix padding on context bar buttons in Dark 2022-08-31 11:04:10 -07:00
jp9000
361eebc6f3 UI: Fix scene list crash
The original change in obsproject/obs-studio#7200 seems to have been
based upon the idea that if the "selected" parameter has no values, then
the "deselected" parameter must have values, which is clearly an unsafe
assumption to have make given that it causes an assert crash in Qt when
both parameters have 0 values contained within them.
2022-08-31 10:43:53 -07:00
田七不甜
9fcf906409 UI: Fix "Stop Virtual Camera" button color 2022-08-30 23:00:23 -04:00
gxalpha
bbd1e8b485 obs-ffmpeg: Always reset timestamp 2022-08-30 22:41:29 -04:00
gxalpha
9dc05b6b8c UI: Remove reset-timestamp option
Co-Authored-By: Norihiro Kamae <780600+norihiro@users.noreply.github.com>
2022-08-30 22:41:29 -04:00
cg2121
776ff4f5ee UI: Fix missing files warning icon
The missing files icon would be cut off if the dialog was made
smaller.
2022-08-30 21:00:20 -04:00
cg2121
8e1b1672a7 UI: Fix context bar being squished
When making the OBS window smaller, the context bar would be cut
in half.
2022-08-30 21:00:07 -04:00
jp9000
7c8995c20f UI: Remove individual sources (for now) from vcam config
Individual sources cannot be used as vcam outputs (yet) due to the fact
that they cannot currnetly scale. If a source is not exactly the same
dimensions as the canvas, there will be blackness on the right and/or
bottom of the source. It's just not currently usable as-is.

Scenes are a much better fit for this because users can transform
sources within scenes as they please to fit the canvas.

At a later point, we'll likely reintroduce this feature as long as
they're automatically transformed or something.
2022-08-30 17:31:22 -07: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
18ae6bb4d7 UI: Fix styling of buttons in scene switcher dialog
Set the tool buttons in the advanced scene switcher dialog to use
tool button styling and remove fixed sizing.
2022-08-30 13:25:54 -04:00
Richard Stanway
edca16d77d
UI: Add HTTP header if the update check is manually initiated
With the addition of server-side release rate control, having the server
know if the update check was manually initiated can allow it to deliver
the update to the user even if they would normally not be eligible.
Windows only.
2022-08-30 16:12:56 +02:00
Translation Updater
cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
cg2121
5e67d96996 UI: Fix source tree hovering being inconsistent
When hovering over the source tree items, sometimes the preview
would show the item hovered, sometimes not. This is caused by
the SourceTree mouseMoveEvent/leaveEvent calling the same functions
as the SourceTreeItem enterEvent/leaveEvent, therefore competing
with each other, causing some jankiness.
2022-08-30 18:49:23 +10:00
Matt Gajownik
247b688dea UI: Show sizing grip in dialogs where resizing is useful
Some windows, like the main window and Interact, already do this.
2022-08-30 18:36:04 +10:00
Matt Gajownik
9613fe7d47 UI: Use QDialog for all dialogs
While QWidgets can be opened as dialogs, they don't contain certain
functions/defaults that are expected in a dialog.
2022-08-30 18:29:05 +10:00
derrod
9a5e094cb3 UI/updater: Delete files listed as removed in manifest 2022-08-30 00:22:22 -07:00
Richard Stanway
e58485e0b2 UI: Fix padding on context bar buttons in System and Dark themes 2022-08-29 21:42:25 -07:00
Clayton Groeneveld
80f6faedfa
UI: Fix scene list spacing (#7202)
The reason why the scene list spacing would never work is because
spacing was always set to 0 in the resize event.
2022-08-29 18:14:30 -05:00
Ryan Foster
11bc39fe7c UI: Get correct coordinates for items in Scene Grid Mode
The x() and y() values of coordinates for events inside a scrollable
QWidget are relative to viewport's scrolled origin, the coordinates of
the upper left corner of the visible space, not the widget's true
origin. Since we do not allow horizontal scrolling, the value of x() is
okay. However, the value of y() needs to be adjusted by an offset of the
top()/y() value for the first widget in the SceneTree. When not
scrolled, this offset will be 0. When scrolled down, this offset will be
a negative value.
2022-08-29 18:22:45 -03:00
Ryan Foster
5b0ae8c70d UI: Fix scrollbar enablement in Scene Grid Mode
The UI layout math used to determine if scrollbars should be displayed
in the Scenes Dock was off by one pixel. This caused the scrollbar to
disappear when performing actions while scrolled to the bottom, such as
dragging items or resizing the dock.
2022-08-29 18:22:45 -03:00
Ryan Foster
fd0c4b7d09 UI: Resize SceneTree after dropEvent
Calling resizeEvent for SceneTree after a dropEvent has occurred
prevents a dropped item from being displayed in the incorrect location
while in Grid Mode. There might be a better way to fix the incorrectly
displayed location of a dropped item, but we already do this in
SetGridMode and rowsInserted, so this is probably okay.
2022-08-29 18:22:45 -03:00
Clayton Groeneveld
1eebf27e9e UI: Change groupbox radius 2022-08-29 18:14:37 -03:00
cg2121
b9342a8f7c UI: Make settings margins consistant
Some settings pages would have different margins than others.
2022-08-29 17:44:14 -03:00
Matt Gajownik
ad68380910 UI: Fix position of Sources dock actions on horizontal resize
Attempting to resize the Sources dock to be smaller than when initially
loaded would result in the contents of the list to never shrink.
Switching to another scene & back would temporary fix the sizing.

Fixes an issue introduced in adba393ca8
2022-08-29 10:03:41 -07:00
gxalpha
08e4ee6557 UI: Add workaround for scenes being unselected 2022-08-29 23:15:39 +10:00
cg2121
d69c749aaf UI: Fix crash with adding source
Bug introduced with adba393ca8

OBS would crash when adding a new source because the source tree item's
widget would be NULL in the sizeHint function when the list item is first
created.
2022-08-29 09:11:38 +10:00
cg2121
adba393ca8 UI: Fix source item widget color height
The background color of the source tree item widgets wouldn't be
rendered properly.
2022-08-28 09:45:00 +10:00