aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main_window.cpp
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2026-06-22 21:04:47 +0200
committercrueter <crueter@eden-emu.dev>2026-06-22 21:04:47 +0200
commit39be450fa3a7248f7dde73dfe91d2f0447a155dd (patch)
treeb508f83c056280b1d5fb5365c6ab4e551c5a1a95 /src/yuzu/main_window.cpp
parent68aaea60855d7791480a546b8888e123e083ca1a (diff)
[desktop] Add basic carousel view (#4112)
Adds a basic carousel view, or essentially a horizontal list a la Android/Qt Quick. Lacks a lot of niceties like autoscroll, smooth shifts, etc. Will work on those later Also fixed a bug introduced recently that capped game icon size to 8 at the low end, breaking the None option Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4112 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/yuzu/main_window.cpp')
-rw-r--r--src/yuzu/main_window.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp
index 00b9e65c67..bc74f5da79 100644
--- a/src/yuzu/main_window.cpp
+++ b/src/yuzu/main_window.cpp
@@ -1529,6 +1529,7 @@ void MainWindow::ConnectMenuEvents() {
connect_menu(ui->action_Grid_View, &MainWindow::SetGridView);
connect_menu(ui->action_Tree_View, &MainWindow::SetTreeView);
+ connect_menu(ui->action_Carousel_View, &MainWindow::SetCarouselView);
game_size_actions = new QActionGroup(this);
game_size_actions->setExclusive(true);
@@ -3317,9 +3318,10 @@ void MainWindow::ResetWindowSize1080() {
void MainWindow::SetGameListMode(Settings::GameListMode mode) {
ui->action_Grid_View->setChecked(mode == Settings::GameListMode::GridView);
ui->action_Tree_View->setChecked(mode == Settings::GameListMode::TreeView);
+ ui->action_Carousel_View->setChecked(mode == Settings::GameListMode::CarouselView);
UISettings::values.game_list_mode = mode;
- ui->action_Show_Game_Name->setEnabled(mode == Settings::GameListMode::GridView);
+ ui->action_Show_Game_Name->setEnabled(mode != Settings::GameListMode::TreeView);
CheckIconSize();
game_list->ResetViewMode();
@@ -3333,11 +3335,15 @@ void MainWindow::SetTreeView() {
SetGameListMode(Settings::GameListMode::TreeView);
}
+void MainWindow::SetCarouselView() {
+ SetGameListMode(Settings::GameListMode::CarouselView);
+}
+
void MainWindow::CheckIconSize() {
- // When in grid view mode, with text off
- // there is no point in having icons turned off..
+ // When in grid/carousel view mode, with text off
+ // there is no point in having icons turned off
auto actions = game_size_actions->actions();
- if (UISettings::values.game_list_mode.GetValue() == Settings::GameListMode::GridView &&
+ if (UISettings::values.game_list_mode.GetValue() != Settings::GameListMode::TreeView &&
!UISettings::values.show_game_name.GetValue()) {
u32 newSize = UISettings::values.game_icon_size.GetValue();
if (newSize == 0) {