Commit graph

210 commits

Author SHA1 Message Date
gxalpha 11e9291800 UI: Set macOS appearance on theme change
Makes macOS aware that we're using either light or dark theme to adjust
native dialog colors accordingly.

Co-Authored-By: Patrick Heyer <PatTheMav@users.noreply.github.com>
2023-01-31 18:50:56 +01:00
gxalpha 2272efc91f UI: Use native combobox popup on macOS
As recommended by Qt on QTBUG-106162, this fixes QComboBox popups not
working with VoiceOver.
2023-01-31 18:50:56 +01:00
Kurt Kartaltepe 124ebedbdb UI: Disable qt5ct when compiled with qt6
Qt is not smart enough to disable qt5 platform plugins when users
blindly ask for them, which causes users to be unable to start OBS.
Instead lets kindly disable broken platforms on their behalf.
2023-01-07 15:17:05 -08:00
Kurt Kartaltepe 1b8a695571 UI: Restrict GNOME wayland override
Some wayland compositors exclusively use xwayland such as gamescope.
This allows us to fallback to the platform determined by Qt, which will
detect these exotic compositors and handle them correctly when not
overidden by this envvar.

Qt preserves this undesired behavior until 6.3. With ubuntu 22 on 6.2
this workaround needs to be preserved.

fixes #6386
2022-12-23 10:00:03 -03:00
derrod f141b9c59b UI: Add update channels (Windows) 2022-11-22 02:54:07 +01:00
PatTheMav 4ff789e24c
UI: Fix snprintf calls with literals as buffer sizes 2022-11-11 19:51:28 +01:00
Tommy Vercetti b838636f58 UI: Remove Rosetta detection log
Will be moved to libobs
2022-11-09 03:03:26 -08:00
Ryan Foster 1bd43220d5 UI: Migrate Simple Output NVENC preset 2022-10-31 22:51:24 -07:00
Ryan Foster c6fbeaaf6d UI: Refactor NVENC preset migration
Refactor the NVENC preset migration code to avoid having to maintain
more copies of the preset mappings.
2022-10-31 22:51:24 -07:00
Ryan Foster 0ddba5d644 obs-ffmpeg: Split NVENC preset migrations by codec
This commit also modifies UI.
2022-10-31 17:02:51 -04:00
Ryan Foster a36427c0ab UI: Add NVENC preset migration for lossless 2022-10-31 17:02:51 -04:00
Ryan Foster 891e3b0f49 obs-ffmpeg: Align NVENC preset migrations to NVIDIA guidelines
Bring our NVENC preset migrations closer in line with NVIDIA guidelines.

https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-preset-migration-guide/

This commit also modifies UI.
2022-10-31 17:02:51 -04:00
Ryan Foster 254dc4081c obs-ffmpeg: Add NVENC preset mapping for old Default preset
The old NVENC preset "Default", labeled in OBS as "Performance", maps to
the new P3 preset when not using multipass. Since we previously only
enabled multipass/two-pass on "Max Quality", we can map this to P3 in
all cases.

This commit also modifies UI.
2022-10-31 17:02:51 -04:00
derrod e91f1f4003 UI: Hide --portable from help text if disallowed 2022-10-22 16:35:05 -07:00
derrod e8dc7d6b07 UI: Add --steam flag 2022-10-22 16:23:50 -07:00
jp9000 70c5f6c24a UI: Change "hq" to use P5 when upgrading NVENC 2022-10-19 17:51:07 -07:00
Richard Stanway cba81638b5 UI: Fix potential memory leak when parsing OBSThemeMeta 2022-10-15 16:17:46 -07:00
Richard Stanway daee83373c UI: Remove unused assignments 2022-10-15 16:17:46 -07:00
Ryan Foster b2ff22a587 UI: Swap mq and hq NVENC Preset mappings
The old preset "mq" was "Max Quality", which used the old HQ preset with
two-pass enabled. The old preset "hq" was "Quality", which used the old
HQ preset without two-pass. Of the two, "mq" would have been considered
"slower" or "higher quality" than "hq", so let's swap these entries.
2022-10-12 21:21:03 -07:00
jp9000 d7c7180a8c obs-ffmpeg: Update NVENC to new presets
(This commit also modifies the UI)
2022-09-22 02:42:32 -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 8cf46ca68c UI: Properly register VoidFunc in Meta Object System 2022-08-20 16:45:07 -07:00
Matt Gajownik c7da23bf96 UI: Remove spaces from translation keys
Qt translation strings use the full English string as an identifier,
rather than a standardised key. Meanwhile, .ini files aren't designed
for keys with spaces, so a translation string for "Restore Defaults"
won't match unless the ini line is
"Restore Defaults"="Defaults"
which is inconsistent, unpleasant and harder to read.
2022-08-18 03:35:51 -07:00
cg2121 ccfe300f72 UI: Reintroduce faster theme switching
Based on (was reverted):
08cee21158

This simplifies the faster switching code, as setting an empty
stylesheet resets it to default.
2022-08-18 02:34:47 -07:00
gxalpha 0a94b3ce16 UI: Only set QStyle on app start
Setting a QStyle resets the color palette. This is unhelpful when a few
lines before that we set a new palette. In theory the setStyle call
could just be moved up, but we don't need to since we always set the
same style so there's no reason to call it multiple times.
2022-08-18 14:22:55 +10:00
pkv 3191c73e16 UI: Fix theme leak
This fixes leaks when loading and switching themes.

Signed-off-by: pkv <pkv@obsproject.com>
2022-08-16 07:36:18 -07:00
derrod 9140c260ee UI: Add Whats New for macOS/Linux
- Requires MbedTLS on Linux
- Enabled by default on macOS and Flatpak
- Enabled on linux via ENABLE_WHATSNEW_LINUX
- Enables compilation of blake2 on Linux/macOS
- Makes header name check also work with lowercase header
- Changes WahtsNew to be only enabled when browser panels are available
2022-08-13 16:46:48 -07:00
Matt Gajownik 3a7a6f4dc0 UI: Fix build error with stray defaultStylesheet 2022-08-09 22:57:23 +10:00
Matt Gajownik a7503254f3 Revert "UI: Apply default stylesheet before applying theme"
This reverts commit 08cee21158.

Turns out that while this did improve theme switching performance, it
also completely breaks styling on macOS and introduces visual quirks
on Windows after switching themes, such as sliders and dropdown contents.

# Conflicts:
#	UI/obs-app.cpp
#	UI/obs-app.hpp
2022-08-09 22:39:26 +10:00
gxalpha 37526e9ac9 UI: Add macOS permissions window
Co-Authored-By: Matt Gajownik <git@wizardcm.com>
2022-07-31 18:14:41 +02:00
gxalpha e75b509bba UI: Include OpenSans font with OBS
Also reinstates the font-family statement removed in 2941c48
2022-07-31 20:23:19 +10:00
Clayton Groeneveld 2d6a9c9cc1 UI: Show spacing helpers in preview
This shows distance between sides of preview and edges of sources.
This will allow users to more easily align sources.

Co-authored-by: Palakis <contact@slepin.fr>
2022-07-30 19:41:18 -07:00
Matt Gajownik cb8bc3413a UI: Add support for theme meta, parent theme palette
Theme Meta allows individual themes to provide additional information to
OBS.

The primarily goal is for a theme to define a "parent", allowing to
extend existing themes with additional attributes.
2022-07-30 18:48:19 +10:00
jp9000 8ef134be79 UI: Set default theme to Yami
Note that this adds a new CurrentTheme3 config variable to preserve
settings of versions older than 28, making this change safely
backward-compatible.
2022-07-28 20:38:51 -07:00
PatTheMav e15fdf69c0 UI: Add functions to check for and request macOS permissions
Adds functions to check and/or request specific macOS permissions
(audio device access, video device access, accessibility access, and
screen capture access).

By default only audio capture, video capture, and accessibility are
requested on launch - the first two have straight-forward "Yes/No"
prompts, the latter requires people to enable OBS in the settings
application (but is required for hotkey functionality, independent
of scene setups).
2022-07-26 14:20:34 +02:00
PatTheMav c1740e3636 UI: Add initialization to ensure compat between pthread and NSThread
Ensures that Cocoa knows that we intend to use multiple threads, per
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html#//apple_ref/doc/uid/10000057i-CH15-SW21
2022-07-25 17:27:07 +02:00
tytan652 6d06052c51 UI: Enforce Fusion Qt style on Linux
The Breeze Qt style plugin adds frame arround QDockWidget with QPainter
which can not be modifed. To avoid this the base style is enforce to the
Qt default style on Linux: Fusion.
2022-07-24 10:22:18 +10:00
gxalpha e3f416f3fc UI: Replace QMessageBox setButtonText with addButton 2022-07-22 09:37:17 -04:00
gxalpha 80e2a980bf UI: Remove disable_high_dpi_scaling option on Qt 6
With Qt 6, high dpi scaling is always enabled and the
AA_DisableHighDpiScaling becomes no-op. As such, the command line
argument can get removed.
2022-07-20 14:14:38 -04:00
Matt Gajownik 08cee21158 UI: Apply default stylesheet before applying theme
This significantly improves performance when switching themes.
The original intent was to "clear" customizations applied by the
previously selected theme. This change does not seem to achieve that goal.
2022-07-04 23:28:48 +10:00
gxalpha 0fa7834bfc UI: Use libobs rosetta detection 2022-06-19 01:37:15 +02:00
Georges Basile Stavracas Neto ca2d02c2ce Drop GLX renderer
"They must often change, who would be constant in happiness or wisdom"

 - Confucius
2022-05-24 14:31:48 -03:00
jpark37 e646eb4828 UI: Restore portable mode on Windows 2022-05-08 06:47:09 +02:00
PatTheMav 55b23a26d2 UI: Fix configuration path handling for Linux portable builds
Original code uses simple `ifdef` pattern as well using the preprocessor
definition in a conditional check. With the rework, the definition was
set to an empty string (if the build flag is not enabled), which leads
to it being evaluated as "true" all the time.

This change uses simpler definition check and fences off code relying
on the flag being enabled.
2022-05-03 14:35:08 -04:00
tt2468 af67ef8e57 libobs, UI: Fix --verbose logging for stdout
Verbosity of stdout was previously hardcoded to INFO, while log viewer
and log files had correct verbosity. This makes the behavior of
--verbose make sense in all places.
2022-04-09 16:48:37 -07:00
gxalpha e33b7d2dab UI: Disable wheel scrolling on QComboBoxes
Adds a new ProxyStyle, OBSIgnoreWheelProxyStyle, and applies it to the
entire program. This style sets a StyleHint to disable mouse wheel
scrolling on QComboBoxes.
The existing OBSProxyStyle, which is used only for the context bar, has
been renamed accordingly.
2022-04-02 16:04:51 -07:00
gxalpha ee781bfa24 UI: Remove unneeded QProxyStyle include 2022-03-26 17:57:14 +11:00
gxalpha dde2fe209a UI: Remove InitApplicationBundle() function 2022-03-19 15:13:00 -07:00
PatTheMav 1f0f2be15e
UI: Update CMakeLists.txt for main OBS app 2022-03-16 23:11:58 +01:00
Misutaa Asriel 4afafaac6d UI: Fix unorthodox macOS Dock icon behavior
Fixes overriding of macOS dock icon behavior.

macOS sets the icon on launch based on:
- The Information PLIST
- A user provided icon by Finder

setWindowIcon overrides this behavior.

Therefore, this commit resolves this issue,
by doing nothing if target is macOS.
2022-03-08 08:50:34 -08:00