From a823366f7745c235a752dc01c42276b3fa410937 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 1 Nov 2022 14:57:33 +0100 Subject: Add QPlatformTheme::MouseCursorTheme and MouseCursorSize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also implement in QGenericUnixTheme/QKdeTheme/QGnomeTheme/QGtk3Theme. On Wayland, there is wl_cursor_theme_load() and etc in wayland-cursor.h. On X11/xcb, cursor theme and size are common, either in XCURSOR_THEME and XCURSOR_SIZE envs, or in gsettings for gtk/gnome world. On Windows, cursor theme is part of theme file, see SetWindowTheme in https://learn.microsoft.com/en-gb/windows/win32/api/uxtheme/nf-uxtheme-setwindowtheme . For system settings, for example on Windows 10, Mouse Settings, Additional mouse options, Pointers Tab, Scheme. On macOS, it looks like cursor theme is deprecated. Change-Id: I5821377d966c281fb8330da1f5baa7f0ddf86a9f Reviewed-by: Oliver Wolff Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qplatformtheme.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qplatformtheme.h') diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index 1b7fc85c81..326b69c1e7 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -92,7 +92,9 @@ public: FlickStartDistance, FlickMaximumVelocity, FlickDeceleration, - MenuBarFocusOnAltPressRelease + MenuBarFocusOnAltPressRelease, + MouseCursorTheme, + MouseCursorSize }; Q_ENUM(ThemeHint) -- cgit v1.2.3