Commit Graph

19 Commits (622d2f7658fd9ab882edc05bd5eed5be395d00fe)

Author SHA1 Message Date
Georges Basile Stavracas Neto b71498e8ab UI: Don't create obs_display when QTToGSWindow fails
Right after showing the OBSQTDisplay widget, it may happen that a
wl_surface is not yet created and attached to the window. When this
happens, creating the OBS display results in a crash.

Make QTToGSWindow return a boolean, indicating success or failure, and
don't create the OBS display on failure.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto a56582d92d UI: Retrieve Wayland surface from QWindow
On Wayland, we want to query the window's underlying
platform for the Wayland surface, instead of foolishly
retrieving the X11 display.

Pass QWindow instead of WId directly, and set the surface
as the platform data on Wayland systems.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto 58497e59d9 UI: Reinstate native dialogs on Linux with browser enabled
After the recent CEF update, the GMainLoop-in-a-thread conflict seems to be
gone, which allows us to being back native dialogs.
2021-01-28 23:58:13 -08:00
jp9000 97491ee91a UI: Add SetComboItemEnabled
Replaces SetComboItemDisabled in context-bar-controls.cpp with a global
function in qt-wrappers called SetComboItemEnabled, which allows both
enabling and disabling items in a combo box.
2020-11-13 18:07:20 -08:00
Programatic 642dff054d UI: Fix source ref bug causing crash on exit 2020-09-02 12:50:36 -05:00
Clayton Groeneveld 762983b5d8 UI: Use non-native file dialog w/ Linux 2020-07-18 09:49:24 -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
jp9000 a6871b2c1d UI: Add setThemeID to qt-wrappers
Makes the function usable outside of just window-basic-stats.cpp.
2019-12-27 10:54:20 -08:00
jp9000 d5d8492bb3 UI: Add LineEditChanged and LineEditCanceled
These functions allow item delegates (editors) or item widgets with
event filters to detect whether a user has finished editing a line edit
control.  This separates the code so it can be used elsewhere than just
in the source tree widget.
2019-08-08 03:25:33 -07: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
jp9000 3bd99797d9 UI: Add ability to use rich text in warning dialogs
Allows the ability to use things such as links in warning dialogs,
optionally.  Disabled by default.
2019-05-31 20:52:59 -07:00
Richard Stanway 4be88c7f2a UI: Add warning / critical QMessageBox wrappers 2019-04-19 05:45:19 -07:00
jp9000 29a1a97392 UI: Don't open settings or close in event subloop
Fixes a crash that can happen if you try to use the settings window
while in an even subloop, or if you try to close OBS while in an event
subloop.  Continually retries (defers) the actions every one second
until the subloop has finished.
2019-03-26 22:05:52 -07:00
jp9000 01c78bffc5 UI: Do not display threaded message boxes on startup
The message boxes that tell you that the browser is initializing or that
you're authenticating with twitch are annoying on startup.  It makes
sense to do it in the settings/autoconfig dialogs where you sort of need
to know what's going on while waiting for it to connect, but on startup
it's not really necessary and can be kind of annoying.
2019-02-20 17:35:02 -08:00
jp9000 a0eab1a2ad UI: Add functions for executing funcs without blocking
Adds functions for executing functions within separate threads without
blocking the user interface, or by blocking the user interface with a
dialog box.
2019-02-07 14:47:01 -08:00
jp9000 74cda9a2cc UI: Add CreateQThread helper function
Allows creating a QThread via an std::function.  A backward-compatible
alternative to QThread::create for Qt versions older than 5.10 (when it
became available in Qt).
2019-02-07 14:47:01 -08:00
jp9000 72d7adba67 UI: Fix locale text for "OK" in question dialogs
This is the only case where the button's name does not match the
locale's text, the button name being "Ok" and the locale text item being
"OK", fully capitalized.
2017-05-13 14:10:44 -07:00
jp9000 bd34dce8b6 UI: Add helper class to translate message box buttons 2017-05-13 14:05:03 -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