From 153eded97852d9583f0d6807c33df26125615023 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 16 Feb 2020 00:14:23 +0900 Subject: [PATCH] Qt: Use a single column in hotkey binding list --- src/duckstation-qt/hotkeysettingswidget.cpp | 9 +++------ src/duckstation-qt/hotkeysettingswidget.h | 5 ----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/duckstation-qt/hotkeysettingswidget.cpp b/src/duckstation-qt/hotkeysettingswidget.cpp index 9587f4cdc..41f4921a8 100644 --- a/src/duckstation-qt/hotkeysettingswidget.cpp +++ b/src/duckstation-qt/hotkeysettingswidget.cpp @@ -58,13 +58,10 @@ void HotkeySettingsWidget::createButtons() QWidget* container = iter->container; QGridLayout* layout = iter->layout; - const int layout_count = layout->count() / 2; - const int target_column = (layout_count / ROWS_PER_COLUMN) * 2; - const int target_row = layout_count % ROWS_PER_COLUMN; + const int target_row = layout->count() / 2; const QString setting_name = QStringLiteral("Hotkeys/%1").arg(hi.name); - layout->addWidget(new QLabel(hi.display_name, container), target_row, target_column); - layout->addWidget(new InputButtonBindingWidget(m_host_interface, setting_name, container), target_row, - target_column + 1); + layout->addWidget(new QLabel(hi.display_name, container), target_row, 0); + layout->addWidget(new InputButtonBindingWidget(m_host_interface, setting_name, container), target_row, 1); } } diff --git a/src/duckstation-qt/hotkeysettingswidget.h b/src/duckstation-qt/hotkeysettingswidget.h index 8a9c9f767..8e153a026 100644 --- a/src/duckstation-qt/hotkeysettingswidget.h +++ b/src/duckstation-qt/hotkeysettingswidget.h @@ -17,11 +17,6 @@ public: ~HotkeySettingsWidget(); private: - enum : u32 - { - ROWS_PER_COLUMN = 10 - }; - void createUi(); void createButtons();