mirror of
https://github.com/citra-mirror/citra.git
synced 2024-08-19 10:03:22 +02:00
citra-qt: Add back missing hotkeys & conflict fixes.
* Also fixed a missing spacer in ConfigureGeneral.
This commit is contained in:
parent
4309585623
commit
988acf588a
@ -320,7 +320,7 @@ void Config::ReadValues() {
|
||||
qt_config->endGroup();
|
||||
|
||||
qt_config->beginGroup("Shortcuts");
|
||||
const std::array<UISettings::Shortcut, 14> default_hotkeys{
|
||||
const std::array<UISettings::Shortcut, 19> default_hotkeys{
|
||||
{{"Load File", "Main Window",
|
||||
UISettings::ContextualShortcut(QKeySequence(QKeySequence::Open).toString(),
|
||||
Qt::WindowShortcut)},
|
||||
@ -349,7 +349,17 @@ void Config::ReadValues() {
|
||||
{"Increase Speed Limit", "Main Window",
|
||||
UISettings::ContextualShortcut("+", Qt::ApplicationShortcut)},
|
||||
{"Decrease Speed Limit", "Main Window",
|
||||
UISettings::ContextualShortcut("-", Qt::ApplicationShortcut)}}};
|
||||
UISettings::ContextualShortcut("-", Qt::ApplicationShortcut)},
|
||||
{"Advance Frame", "Main Window",
|
||||
UISettings::ContextualShortcut("\\", Qt::ApplicationShortcut)},
|
||||
{"Toggle Frame Advancing", "Main Window",
|
||||
UISettings::ContextualShortcut("Ctrl+A", Qt::ApplicationShortcut)},
|
||||
{"Load Amiibo", "Main Window",
|
||||
UISettings::ContextualShortcut("F2", Qt::ApplicationShortcut)},
|
||||
{"Remove Amiibo", "Main Window",
|
||||
UISettings::ContextualShortcut("F3", Qt::ApplicationShortcut)},
|
||||
{"Capture Screenshot", "Main Window",
|
||||
UISettings::ContextualShortcut("Ctrl+P", Qt::ApplicationShortcut)}}};
|
||||
|
||||
for (int i = 0; i < default_hotkeys.size(); i++) {
|
||||
qt_config->beginGroup(default_hotkeys[i].group);
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include "core/settings.h"
|
||||
#include "ui_configure.h"
|
||||
|
||||
ConfigureDialog::ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry)
|
||||
: QDialog(parent), ui(new Ui::ConfigureDialog) {
|
||||
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry)
|
||||
: QDialog(parent), registry(registry), ui(new Ui::ConfigureDialog) {
|
||||
ui->setupUi(this);
|
||||
ui->hotkeysTab->Populate(registry);
|
||||
|
||||
@ -47,7 +47,7 @@ void ConfigureDialog::setConfiguration() {
|
||||
ui->uiTab->setConfiguration();
|
||||
}
|
||||
|
||||
void ConfigureDialog::applyConfiguration(HotkeyRegistry& registry) {
|
||||
void ConfigureDialog::applyConfiguration() {
|
||||
ui->generalTab->applyConfiguration();
|
||||
ui->systemTab->applyConfiguration();
|
||||
ui->inputTab->applyConfiguration();
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
|
||||
void UpdateVisibleTabs();
|
||||
void PopulateSelectionList();
|
||||
void applyConfiguration(HotkeyRegistry& registry);
|
||||
void applyConfiguration();
|
||||
|
||||
private slots:
|
||||
void onLanguageChanged(const QString& locale);
|
||||
@ -35,4 +35,5 @@ private:
|
||||
void retranslateUi();
|
||||
|
||||
std::unique_ptr<Ui::ConfigureDialog> ui;
|
||||
HotkeyRegistry& registry;
|
||||
};
|
||||
|
@ -122,6 +122,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -1325,7 +1325,7 @@ void GMainWindow::OnConfigure() {
|
||||
const bool old_discord_presence = UISettings::values.enable_discord_presence;
|
||||
auto result = configureDialog.exec();
|
||||
if (result == QDialog::Accepted) {
|
||||
configureDialog.applyConfiguration(hotkey_registry);
|
||||
configureDialog.applyConfiguration();
|
||||
InitializeHotkeys();
|
||||
if (UISettings::values.theme != old_theme)
|
||||
UpdateUITheme();
|
||||
|
Loading…
Reference in New Issue
Block a user