From 79ea06b226b98916ea98d04e77d341c2078b671a Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:58:02 -0700 Subject: [PATCH] qt: Update to 6.6.0 (#7099) --- .github/workflows/build.yml | 6 +++--- CMakeLists.txt | 2 +- dist/qt_themes/colorful_dark/icons/index.theme | 10 ++++++++-- .../colorful_midnight_blue/icons/index.theme | 8 +++++++- src/citra_qt/game_list.cpp | 11 +++++++---- src/citra_qt/main.cpp | 15 +++++++++------ src/citra_qt/updater/updater.cpp | 6 +++--- 7 files changed, 38 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0638d48908..cc2560857c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: name: ${{ env.OS }}-${{ env.TARGET }} path: artifacts/ macos: - runs-on: macos-latest + runs-on: macos-13 strategy: matrix: target: ["x86_64", "arm64"] @@ -92,7 +92,7 @@ jobs: path: ${{ env.OS }}-${{ env.TARGET }} key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} macos-universal: - runs-on: macos-latest + runs-on: macos-13 needs: macos env: OS: macos @@ -234,7 +234,7 @@ jobs: name: ${{ env.OS }}-${{ env.TARGET }} path: src/android/app/artifacts/ ios: - runs-on: macos-latest + runs-on: macos-13 if: ${{ !startsWith(github.ref, 'refs/tags/') }} env: CCACHE_DIR: ${{ github.workspace }}/.ccache diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c6342dfe1..418272108f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,7 +236,7 @@ find_package(Threads REQUIRED) if (ENABLE_QT) if (NOT USE_SYSTEM_QT) - download_qt(6.5.1) + download_qt(6.6.0) endif() find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent) diff --git a/dist/qt_themes/colorful_dark/icons/index.theme b/dist/qt_themes/colorful_dark/icons/index.theme index 94d5ae8aaf..76f34a7210 100644 --- a/dist/qt_themes/colorful_dark/icons/index.theme +++ b/dist/qt_themes/colorful_dark/icons/index.theme @@ -2,7 +2,13 @@ Name=colorful_dark Comment=Colorful theme (Dark style) Inherits=default -Directories=16x16 - +Directories=16x16,48x48,256x256 + [16x16] Size=16 + +[48x48] +Size=48 + +[256x256] +Size=256 diff --git a/dist/qt_themes/colorful_midnight_blue/icons/index.theme b/dist/qt_themes/colorful_midnight_blue/icons/index.theme index e23bfe6f99..1cf3deeabf 100644 --- a/dist/qt_themes/colorful_midnight_blue/icons/index.theme +++ b/dist/qt_themes/colorful_midnight_blue/icons/index.theme @@ -2,7 +2,13 @@ Name=colorful_midnight_blue Comment=Colorful theme (Midnight Blue style) Inherits=default -Directories=16x16 +Directories=16x16,48x48,256x256 [16x16] Size=16 + +[48x48] +Size=48 + +[256x256] +Size=256 diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index 38dc63cf5c..6f292ce680 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp @@ -258,13 +258,15 @@ void GameList::OnUpdateThemedIcons() { for (int i = 0; i < item_model->invisibleRootItem()->rowCount(); i++) { QStandardItem* child = item_model->invisibleRootItem()->child(i); + const int icon_size = IconSizes.at(UISettings::values.game_list_icon_size.GetValue()); switch (child->data(GameListItem::TypeRole).value()) { case GameListItemType::InstalledDir: - child->setData(QIcon::fromTheme(QStringLiteral("sd_card")).pixmap(48), + child->setData(QIcon::fromTheme(QStringLiteral("sd_card")).pixmap(icon_size), Qt::DecorationRole); break; case GameListItemType::SystemDir: - child->setData(QIcon::fromTheme(QStringLiteral("chip")).pixmap(48), Qt::DecorationRole); + child->setData(QIcon::fromTheme(QStringLiteral("chip")).pixmap(icon_size), + Qt::DecorationRole); break; case GameListItemType::CustomDir: { const UISettings::GameDir& game_dir = @@ -272,11 +274,12 @@ void GameList::OnUpdateThemedIcons() { const QString icon_name = QFileInfo::exists(game_dir.path) ? QStringLiteral("folder") : QStringLiteral("bad_folder"); - child->setData(QIcon::fromTheme(icon_name).pixmap(48), Qt::DecorationRole); + child->setData(QIcon::fromTheme(icon_name).pixmap(icon_size), Qt::DecorationRole); break; } case GameListItemType::AddDir: - child->setData(QIcon::fromTheme(QStringLiteral("plus")).pixmap(48), Qt::DecorationRole); + child->setData(QIcon::fromTheme(QStringLiteral("plus")).pixmap(icon_size), + Qt::DecorationRole); break; default: break; diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 9446780613..3f572985f9 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -2741,7 +2741,10 @@ void GMainWindow::filterBarSetChecked(bool state) { } void GMainWindow::UpdateUITheme() { - const QString default_icons = QStringLiteral(":/icons/default"); + const QString icons_base_path = QStringLiteral(":/icons/"); + const QString default_theme = QStringLiteral("default"); + const QString default_theme_path = icons_base_path + default_theme; + const QString& current_theme = UISettings::values.theme; const bool is_default_theme = current_theme == QString::fromUtf8(UISettings::themes[0].second); QStringList theme_paths(default_theme_paths); @@ -2759,8 +2762,8 @@ void GMainWindow::UpdateUITheme() { qApp->setStyleSheet({}); setStyleSheet({}); } - theme_paths.append(default_icons); - QIcon::setThemeName(default_icons); + theme_paths.append(default_theme_path); + QIcon::setThemeName(default_theme); } else { const QString theme_uri(QLatin1Char{':'} + current_theme + QStringLiteral("/style.qss")); QFile f(theme_uri); @@ -2772,9 +2775,9 @@ void GMainWindow::UpdateUITheme() { LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); } - const QString theme_name = QStringLiteral(":/icons/") + current_theme; - theme_paths.append({default_icons, theme_name}); - QIcon::setThemeName(theme_name); + const QString current_theme_path = icons_base_path + current_theme; + theme_paths.append({default_theme_path, current_theme_path}); + QIcon::setThemeName(current_theme); } QIcon::setThemeSearchPaths(theme_paths); diff --git a/src/citra_qt/updater/updater.cpp b/src/citra_qt/updater/updater.cpp index 978e560a8c..00c32479ce 100644 --- a/src/citra_qt/updater/updater.cpp +++ b/src/citra_qt/updater/updater.cpp @@ -17,7 +17,7 @@ #include "common/file_util.h" #include "common/logging/log.h" -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS #define DEFAULT_TOOL_PATH QStringLiteral("../../../../maintenancetool") #else #define DEFAULT_TOOL_PATH QStringLiteral("../maintenancetool") @@ -102,7 +102,7 @@ QString UpdaterPrivate::ToSystemExe(QString base_path) { return base_path + QStringLiteral(".exe"); else return base_path; -#elif defined(Q_OS_OSX) +#elif defined(Q_OS_MACOS) if (base_path.endsWith(QStringLiteral(".app"))) base_path.truncate(base_path.lastIndexOf(QStringLiteral("."))); return base_path + QStringLiteral(".app/Contents/MacOS/") + QFileInfo(base_path).fileName(); @@ -112,7 +112,7 @@ QString UpdaterPrivate::ToSystemExe(QString base_path) { } QFileInfo UpdaterPrivate::GetMaintenanceTool() const { -#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) const auto appimage_path = QProcessEnvironment::systemEnvironment() .value(QStringLiteral("APPIMAGE"), {}) .toStdString();