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 <axel.spoerl@qt.io>
(cherry picked from commit e2035be13d4d834fb179b7228e176ff5d4aa1721)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9909c896770c844004f14e520db6122ddc2f48a7)
This commit is contained in:
Kai Uwe Broulik 2025-04-06 11:42:09 +02:00 committed by Qt Cherry-pick Bot
parent ecff73ccaa
commit 61943ea3e7

View File

@ -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: