From a0169126cde519b22f82e5c5d586597994e3f069 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 8 Jun 2019 16:21:46 -0700 Subject: [PATCH] Qt: Add cancel button to savestate view --- src/platform/qt/LoadSaveState.cpp | 1 + src/platform/qt/LoadSaveState.ui | 241 ++++++++++++++++-------------- 2 files changed, 128 insertions(+), 114 deletions(-) diff --git a/src/platform/qt/LoadSaveState.cpp b/src/platform/qt/LoadSaveState.cpp index 93cbfee66..78c58c2d4 100644 --- a/src/platform/qt/LoadSaveState.cpp +++ b/src/platform/qt/LoadSaveState.cpp @@ -65,6 +65,7 @@ LoadSaveState::LoadSaveState(std::shared_ptr controller, QWidget escape->setShortcutContext(Qt::WidgetWithChildrenShortcut); addAction(escape); + connect(m_ui.cancel, &QAbstractButton::clicked, this, &QWidget::close); connect(m_controller.get(), &CoreController::stopping, this, &QWidget::close); } diff --git a/src/platform/qt/LoadSaveState.ui b/src/platform/qt/LoadSaveState.ui index 46e90fc03..81e2001bb 100644 --- a/src/platform/qt/LoadSaveState.ui +++ b/src/platform/qt/LoadSaveState.ui @@ -13,7 +13,7 @@ %1 State - + 6 @@ -29,8 +29,8 @@ 2 - - + + 0 @@ -47,29 +47,7 @@ - 1 - - - - - - - - 0 - 0 - - - - No Save - - - - 240 - 160 - - - - 2 + 5 @@ -95,72 +73,6 @@ - - - - - 0 - 0 - - - - No Save - - - - 240 - 160 - - - - 3 - - - - - - - - 0 - 0 - - - - No Save - - - - 240 - 160 - - - - 4 - - - - - - - - 0 - 0 - - - - No Save - - - - 240 - 160 - - - - 5 - - - @@ -183,28 +95,6 @@ - - - - - 0 - 0 - - - - No Save - - - - 240 - 160 - - - - 7 - - - @@ -227,6 +117,94 @@ + + + + + 0 + 0 + + + + No Save + + + + 240 + 160 + + + + 4 + + + + + + + + 0 + 0 + + + + No Save + + + + 240 + 160 + + + + 1 + + + + + + + + 0 + 0 + + + + No Save + + + + 240 + 160 + + + + 3 + + + + + + + + 0 + 0 + + + + No Save + + + + 240 + 160 + + + + 7 + + + @@ -249,6 +227,41 @@ + + + + + 0 + 0 + + + + No Save + + + + 240 + 160 + + + + 2 + + + + + + + + 0 + 0 + + + + Cancel + + +