diff options
author | Kai Uwe Broulik <[email protected]> | 2025-04-06 11:42:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2025-04-17 11:34:32 +0000 |
commit | 61943ea3e7ad706b498377628427e652ca09072c (patch) | |
tree | d2804931e3d61bfc697290991155ada6aeda0ab6 | |
parent | ecff73ccaacba8edef568689ed56b479f0c29c6b (diff) |
gtk3theme: Honor gtk-cursor-blink for whether blinking is on
gtk-cursor-blink-time is in an interval 100..2500ms, GTK uses a
dedicated boolean to determine whether blinking is on in the first place.
Change-Id: I8a5dff70b6b3fbeeab599cf50402532052afe8b7
Reviewed-by: Axel Spoerl <[email protected]>
(cherry picked from commit e2035be13d4d834fb179b7228e176ff5d4aa1721)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit 9909c896770c844004f14e520db6122ddc2f48a7)
-rw-r--r-- | src/plugins/platformthemes/gtk3/qgtk3theme.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp index ec54872347e..55855de89d5 100644 --- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp @@ -88,6 +88,7 @@ QGtk3Theme::QGtk3Theme() }; GtkSettings *settings = gtk_settings_get_default(); + SETTING_CONNECT("gtk-cursor-blink"); SETTING_CONNECT("gtk-cursor-blink-time"); SETTING_CONNECT("gtk-double-click-distance"); SETTING_CONNECT("gtk-double-click-time"); @@ -119,7 +120,10 @@ QVariant QGtk3Theme::themeHint(QPlatformTheme::ThemeHint hint) const { switch (hint) { case QPlatformTheme::CursorFlashTime: - return QVariant(gtkSetting<gint>("gtk-cursor-blink-time")); + if (gtkSetting<gboolean>("gtk-cursor-blink")) + return QVariant(gtkSetting<gint>("gtk-cursor-blink-time")); + else + return 0; case QPlatformTheme::MouseDoubleClickDistance: return QVariant(gtkSetting<gint>("gtk-double-click-distance")); case QPlatformTheme::MouseDoubleClickInterval: |