mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 06:20:05 +00:00
qt: Update to 6.6.0 (#7099)
This commit is contained in:
parent
8d811913a5
commit
79ea06b226
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -59,7 +59,7 @@ jobs:
|
|||||||
name: ${{ env.OS }}-${{ env.TARGET }}
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-13
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: ["x86_64", "arm64"]
|
target: ["x86_64", "arm64"]
|
||||||
@ -92,7 +92,7 @@ jobs:
|
|||||||
path: ${{ env.OS }}-${{ env.TARGET }}
|
path: ${{ env.OS }}-${{ env.TARGET }}
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
macos-universal:
|
macos-universal:
|
||||||
runs-on: macos-latest
|
runs-on: macos-13
|
||||||
needs: macos
|
needs: macos
|
||||||
env:
|
env:
|
||||||
OS: macos
|
OS: macos
|
||||||
@ -234,7 +234,7 @@ jobs:
|
|||||||
name: ${{ env.OS }}-${{ env.TARGET }}
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
||||||
path: src/android/app/artifacts/
|
path: src/android/app/artifacts/
|
||||||
ios:
|
ios:
|
||||||
runs-on: macos-latest
|
runs-on: macos-13
|
||||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
@ -236,7 +236,7 @@ find_package(Threads REQUIRED)
|
|||||||
|
|
||||||
if (ENABLE_QT)
|
if (ENABLE_QT)
|
||||||
if (NOT USE_SYSTEM_QT)
|
if (NOT USE_SYSTEM_QT)
|
||||||
download_qt(6.5.1)
|
download_qt(6.6.0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent)
|
find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent)
|
||||||
|
@ -2,7 +2,13 @@
|
|||||||
Name=colorful_dark
|
Name=colorful_dark
|
||||||
Comment=Colorful theme (Dark style)
|
Comment=Colorful theme (Dark style)
|
||||||
Inherits=default
|
Inherits=default
|
||||||
Directories=16x16
|
Directories=16x16,48x48,256x256
|
||||||
|
|
||||||
[16x16]
|
[16x16]
|
||||||
Size=16
|
Size=16
|
||||||
|
|
||||||
|
[48x48]
|
||||||
|
Size=48
|
||||||
|
|
||||||
|
[256x256]
|
||||||
|
Size=256
|
||||||
|
@ -2,7 +2,13 @@
|
|||||||
Name=colorful_midnight_blue
|
Name=colorful_midnight_blue
|
||||||
Comment=Colorful theme (Midnight Blue style)
|
Comment=Colorful theme (Midnight Blue style)
|
||||||
Inherits=default
|
Inherits=default
|
||||||
Directories=16x16
|
Directories=16x16,48x48,256x256
|
||||||
|
|
||||||
[16x16]
|
[16x16]
|
||||||
Size=16
|
Size=16
|
||||||
|
|
||||||
|
[48x48]
|
||||||
|
Size=48
|
||||||
|
|
||||||
|
[256x256]
|
||||||
|
Size=256
|
||||||
|
@ -258,13 +258,15 @@ void GameList::OnUpdateThemedIcons() {
|
|||||||
for (int i = 0; i < item_model->invisibleRootItem()->rowCount(); i++) {
|
for (int i = 0; i < item_model->invisibleRootItem()->rowCount(); i++) {
|
||||||
QStandardItem* child = item_model->invisibleRootItem()->child(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<GameListItemType>()) {
|
switch (child->data(GameListItem::TypeRole).value<GameListItemType>()) {
|
||||||
case GameListItemType::InstalledDir:
|
case GameListItemType::InstalledDir:
|
||||||
child->setData(QIcon::fromTheme(QStringLiteral("sd_card")).pixmap(48),
|
child->setData(QIcon::fromTheme(QStringLiteral("sd_card")).pixmap(icon_size),
|
||||||
Qt::DecorationRole);
|
Qt::DecorationRole);
|
||||||
break;
|
break;
|
||||||
case GameListItemType::SystemDir:
|
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;
|
break;
|
||||||
case GameListItemType::CustomDir: {
|
case GameListItemType::CustomDir: {
|
||||||
const UISettings::GameDir& game_dir =
|
const UISettings::GameDir& game_dir =
|
||||||
@ -272,11 +274,12 @@ void GameList::OnUpdateThemedIcons() {
|
|||||||
const QString icon_name = QFileInfo::exists(game_dir.path)
|
const QString icon_name = QFileInfo::exists(game_dir.path)
|
||||||
? QStringLiteral("folder")
|
? QStringLiteral("folder")
|
||||||
: QStringLiteral("bad_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;
|
break;
|
||||||
}
|
}
|
||||||
case GameListItemType::AddDir:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -2741,7 +2741,10 @@ void GMainWindow::filterBarSetChecked(bool state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::UpdateUITheme() {
|
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 QString& current_theme = UISettings::values.theme;
|
||||||
const bool is_default_theme = current_theme == QString::fromUtf8(UISettings::themes[0].second);
|
const bool is_default_theme = current_theme == QString::fromUtf8(UISettings::themes[0].second);
|
||||||
QStringList theme_paths(default_theme_paths);
|
QStringList theme_paths(default_theme_paths);
|
||||||
@ -2759,8 +2762,8 @@ void GMainWindow::UpdateUITheme() {
|
|||||||
qApp->setStyleSheet({});
|
qApp->setStyleSheet({});
|
||||||
setStyleSheet({});
|
setStyleSheet({});
|
||||||
}
|
}
|
||||||
theme_paths.append(default_icons);
|
theme_paths.append(default_theme_path);
|
||||||
QIcon::setThemeName(default_icons);
|
QIcon::setThemeName(default_theme);
|
||||||
} else {
|
} else {
|
||||||
const QString theme_uri(QLatin1Char{':'} + current_theme + QStringLiteral("/style.qss"));
|
const QString theme_uri(QLatin1Char{':'} + current_theme + QStringLiteral("/style.qss"));
|
||||||
QFile f(theme_uri);
|
QFile f(theme_uri);
|
||||||
@ -2772,9 +2775,9 @@ void GMainWindow::UpdateUITheme() {
|
|||||||
LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found");
|
LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString theme_name = QStringLiteral(":/icons/") + current_theme;
|
const QString current_theme_path = icons_base_path + current_theme;
|
||||||
theme_paths.append({default_icons, theme_name});
|
theme_paths.append({default_theme_path, current_theme_path});
|
||||||
QIcon::setThemeName(theme_name);
|
QIcon::setThemeName(current_theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon::setThemeSearchPaths(theme_paths);
|
QIcon::setThemeSearchPaths(theme_paths);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "common/file_util.h"
|
#include "common/file_util.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_MACOS
|
||||||
#define DEFAULT_TOOL_PATH QStringLiteral("../../../../maintenancetool")
|
#define DEFAULT_TOOL_PATH QStringLiteral("../../../../maintenancetool")
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_TOOL_PATH QStringLiteral("../maintenancetool")
|
#define DEFAULT_TOOL_PATH QStringLiteral("../maintenancetool")
|
||||||
@ -102,7 +102,7 @@ QString UpdaterPrivate::ToSystemExe(QString base_path) {
|
|||||||
return base_path + QStringLiteral(".exe");
|
return base_path + QStringLiteral(".exe");
|
||||||
else
|
else
|
||||||
return base_path;
|
return base_path;
|
||||||
#elif defined(Q_OS_OSX)
|
#elif defined(Q_OS_MACOS)
|
||||||
if (base_path.endsWith(QStringLiteral(".app")))
|
if (base_path.endsWith(QStringLiteral(".app")))
|
||||||
base_path.truncate(base_path.lastIndexOf(QStringLiteral(".")));
|
base_path.truncate(base_path.lastIndexOf(QStringLiteral(".")));
|
||||||
return base_path + QStringLiteral(".app/Contents/MacOS/") + QFileInfo(base_path).fileName();
|
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 {
|
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()
|
const auto appimage_path = QProcessEnvironment::systemEnvironment()
|
||||||
.value(QStringLiteral("APPIMAGE"), {})
|
.value(QStringLiteral("APPIMAGE"), {})
|
||||||
.toStdString();
|
.toStdString();
|
||||||
|
Loading…
Reference in New Issue
Block a user