mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	qt: Update to 6.6.0 (#7099)
This commit is contained in:
		
							parent
							
								
									8d811913a5
								
							
						
					
					
						commit
						79ea06b226
					
				
					 7 changed files with 38 additions and 20 deletions
				
			
		|  | @ -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<GameListItemType>()) { | ||||
|         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; | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
|  | @ -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(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue