Qt: Use a single column in hotkey binding list

This commit is contained in:
Connor McLaughlin 2020-02-16 00:14:23 +09:00
parent 5c303705ac
commit 153eded978
2 changed files with 3 additions and 11 deletions

View file

@ -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);
}
}

View file

@ -17,11 +17,6 @@ public:
~HotkeySettingsWidget();
private:
enum : u32
{
ROWS_PER_COLUMN = 10
};
void createUi();
void createButtons();