mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
Qt: Use a single column in hotkey binding list
This commit is contained in:
parent
5c303705ac
commit
153eded978
|
@ -58,13 +58,10 @@ void HotkeySettingsWidget::createButtons()
|
||||||
|
|
||||||
QWidget* container = iter->container;
|
QWidget* container = iter->container;
|
||||||
QGridLayout* layout = iter->layout;
|
QGridLayout* layout = iter->layout;
|
||||||
const int layout_count = layout->count() / 2;
|
const int target_row = layout->count() / 2;
|
||||||
const int target_column = (layout_count / ROWS_PER_COLUMN) * 2;
|
|
||||||
const int target_row = layout_count % ROWS_PER_COLUMN;
|
|
||||||
|
|
||||||
const QString setting_name = QStringLiteral("Hotkeys/%1").arg(hi.name);
|
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 QLabel(hi.display_name, container), target_row, 0);
|
||||||
layout->addWidget(new InputButtonBindingWidget(m_host_interface, setting_name, container), target_row,
|
layout->addWidget(new InputButtonBindingWidget(m_host_interface, setting_name, container), target_row, 1);
|
||||||
target_column + 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,11 +17,6 @@ public:
|
||||||
~HotkeySettingsWidget();
|
~HotkeySettingsWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum : u32
|
|
||||||
{
|
|
||||||
ROWS_PER_COLUMN = 10
|
|
||||||
};
|
|
||||||
|
|
||||||
void createUi();
|
void createUi();
|
||||||
void createButtons();
|
void createButtons();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue