Move PreselectFirstFileInDirectory theme hint from QGtk3Theme to QGnomeTheme

It doesn't use any gtk API, so can live in QGnomeTheme

Change-Id: Iff0391de6f01a03981f6e45b04fe9824fd2becfc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit cf6ab64f03723e254af9a28f431f076cffc7d54a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Ilya Fedin 2022-08-20 18:46:51 +04:00 committed by Qt Cherry-pick Bot
parent 508e584c60
commit 10c9ae1bea
2 changed files with 2 additions and 2 deletions

View File

@ -726,6 +726,8 @@ QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const
case QPlatformTheme::ButtonPressKeys: case QPlatformTheme::ButtonPressKeys:
return QVariant::fromValue( return QVariant::fromValue(
QList<Qt::Key>({ Qt::Key_Space, Qt::Key_Return, Qt::Key_Enter, Qt::Key_Select })); QList<Qt::Key>({ Qt::Key_Space, Qt::Key_Return, Qt::Key_Enter, Qt::Key_Select }));
case QPlatformTheme::PreselectFirstFileInDirectory:
return true;
default: default:
break; break;
} }

View File

@ -116,8 +116,6 @@ QVariant QGtk3Theme::themeHint(QPlatformTheme::ThemeHint hint) const
return QVariant(gtkSetting("gtk-icon-theme-name")); return QVariant(gtkSetting("gtk-icon-theme-name"));
case QPlatformTheme::SystemIconFallbackThemeName: case QPlatformTheme::SystemIconFallbackThemeName:
return QVariant(gtkSetting("gtk-fallback-icon-theme")); return QVariant(gtkSetting("gtk-fallback-icon-theme"));
case QPlatformTheme::PreselectFirstFileInDirectory:
return true;
default: default:
return QGnomeTheme::themeHint(hint); return QGnomeTheme::themeHint(hint);
} }