Vista style: don't use transitions unless desktop-settings aware

Change-Id: Ib93c18406e324df854765b309cb7c1cdca7a194d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Volker Hilsheimer 2024-11-28 15:56:35 +01:00
parent 357c64a996
commit be4e3082f7

View File

@ -204,11 +204,12 @@ void QWindowsVistaStylePrivate::cleanup(bool force)
bool QWindowsVistaStylePrivate::transitionsEnabled() const bool QWindowsVistaStylePrivate::transitionsEnabled() const
{ {
BOOL animEnabled = false; if (QApplication::desktopSettingsAware()) {
if (SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0)) BOOL animEnabled = false;
{ if (SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0)) {
if (animEnabled) if (animEnabled)
return true; return true;
}
} }
return false; return false;
} }