From 827446b27faab5ee80ce84b7a40994c67c9c796a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 6 Aug 2023 14:50:16 +1000 Subject: [PATCH] Build: Switch to Qt 6.5.0 on Windows --- README.md | 4 ++++ dep/msvc/qt | 2 +- dep/msvc/vsprops/QtCompile.props | 8 ++++---- src/duckstation-qt/mainwindow.cpp | 14 +++++++------- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3ed22abc3..fedd89a32 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ Binaries of DuckStation for Windows x64/ARM64, Linux x86_64 (in AppImage format) ### Windows +As of 2023/08/16, Preview releases of DuckStation **require Windows 10**. I have hit several issues in new features I am working on that are present in Qt 6.1, but not in 6.5. + +For now, this only applies to the **Preview** build, the "Latest Rolling Release" will still work on Windows 7/8/8.1 for now, with the disclaimer below. Once the new in-progress features are ready for widespread use, this build will move to legacy status. + **Windows 10 is the only version of Windows supported by the developer.** Windows 7/8 may work, but is not supported. I am aware some users are still using Windows 7, but it is no longer supported by Microsoft and too much effort to get running on modern hardware. Game bugs are unlikely to be affected by the operating system, however performance issues should be verified on Windows 10 before reporting. To download: diff --git a/dep/msvc/qt b/dep/msvc/qt index f44f99baa..e5c412eff 160000 --- a/dep/msvc/qt +++ b/dep/msvc/qt @@ -1 +1 @@ -Subproject commit f44f99baad9c52e6e98831f95dde283b3c3d7993 +Subproject commit e5c412efffa3926f7a4d5bf0ae0333e1d6784f30 diff --git a/dep/msvc/vsprops/QtCompile.props b/dep/msvc/vsprops/QtCompile.props index ceeff3114..ecd675a40 100644 --- a/dep/msvc/vsprops/QtCompile.props +++ b/dep/msvc/vsprops/QtCompile.props @@ -2,12 +2,12 @@ $(SolutionDir)bin\$(Platform)\ - $(SolutionDir)dep\msvc\qt\6.1.0\msvc2019_64\ - $(SolutionDir)dep\msvc\qt\6.3.1\msvc2022_arm64\ + $(SolutionDir)dep\msvc\qt\6.5.0\msvc2022_64\ + $(SolutionDir)dep\msvc\qt\6.5.0\msvc2022_arm64\ $(DSQTDIRDefault) $(DSQTDIR)\ - $(SolutionDir)dep\msvc\qt\6.1.0\msvc2019_64\ - $(SolutionDir)dep\msvc\qt\6.3.1\msvc2022_64\ + $(SolutionDir)dep\msvc\qt\6.5.0\msvc2022_64\ + $(SolutionDir)dep\msvc\qt\6.5.0\msvc2022_64\ false true $(DSQTDIR)include\ diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index c37379b82..167850452 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -70,7 +70,6 @@ const char* DEFAULT_THEME_NAME = "darkfusion"; MainWindow* g_main_window = nullptr; static QString s_unthemed_style_name; -static QPalette s_unthemed_palette; static bool s_unthemed_style_name_set; #if defined(_WIN32) || defined(__APPLE__) @@ -131,7 +130,6 @@ void MainWindow::updateApplicationTheme() { s_unthemed_style_name_set = true; s_unthemed_style_name = QApplication::style()->objectName(); - s_unthemed_palette = QApplication::style()->standardPalette(); } setStyleFromSettings(); @@ -2117,10 +2115,14 @@ void MainWindow::setStyleFromSettings() { const std::string theme(Host::GetBaseStringSettingValue("UI", "Theme", DEFAULT_THEME_NAME)); + // setPalette() shouldn't be necessary, as the documentation claims that setStyle() resets the palette, but it + // is here, to work around a bug in 6.4.x and 6.5.x where the palette doesn't restore after changing themes. + qApp->setPalette(QPalette()); + if (theme == "qdarkstyle") { qApp->setStyle(s_unthemed_style_name); - qApp->setPalette(s_unthemed_palette); + qApp->setStyleSheet(QString()); QFile f(QStringLiteral(":qdarkstyle/style.qss")); if (f.open(QFile::ReadOnly | QFile::Text)) @@ -2128,9 +2130,8 @@ void MainWindow::setStyleFromSettings() } else if (theme == "fusion") { - qApp->setPalette(s_unthemed_palette); - qApp->setStyleSheet(QString()); qApp->setStyle(QStyleFactory::create("Fusion")); + qApp->setStyleSheet(QString()); } else if (theme == "darkfusion") { @@ -2207,9 +2208,8 @@ void MainWindow::setStyleFromSettings() } else { - qApp->setPalette(s_unthemed_palette); - qApp->setStyleSheet(QString()); qApp->setStyle(s_unthemed_style_name); + qApp->setStyleSheet(QString()); } }