SmartPlaylistWizard: Set classic style if using fusion on Windows

Workaround a Qt bug.

Fixes #1399
This commit is contained in:
Jonas Kvinge 2024-03-29 02:54:25 +01:00
parent d1042b276b
commit 68c922ee12
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,7 @@
#include <QLabel>
#include <QRadioButton>
#include <QVBoxLayout>
#include <QStyle>
#include "core/logging.h"
#include "core/shared_ptr.h"
@ -76,6 +77,11 @@ SmartPlaylistWizard::SmartPlaylistWizard(Application *app, SharedPtr<CollectionB
// MacStyle leaves an ugly empty space on the left side of the dialog.
setWizardStyle(QWizard::ClassicStyle);
#endif
#ifdef Q_OS_WIN32
if (QApplication::style() && QApplication::style()->objectName() == "fusion") {
setWizardStyle(QWizard::ClassicStyle);
}
#endif
// Type page
type_page_->setTitle(tr("Playlist type"));