summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2025-05-29 19:46:53 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2025-05-29 19:46:53 -0500
commita8eafa4ccd4fa60d1e4bd2843a00354eec8967f1 (patch)
tree192c44dd195dc8342de3d45df2e3942b51eb554a /Source
parenta5b4a0b9e486cb11ebcd1e30a509516c5e13bb35 (diff)
DolphinQt: Move the "Point (Passthrough)" "Enabled" checkbox below the mapping indicator.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
index c8fdffc140..242ce55148 100644
--- a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
+++ b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
@@ -103,13 +103,24 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
break;
}
+ // Mapping indicator.
+ if (indicator != nullptr)
+ {
+ auto* const indicator_layout = new QBoxLayout(QBoxLayout::Direction::Down);
+ indicator_layout->addWidget(indicator);
+ indicator_layout->setAlignment(Qt::AlignCenter);
+ form_layout->addRow(indicator_layout);
+
+ connect(this, &MappingWidget::Update, indicator, qOverload<>(&MappingIndicator::update));
+ }
+
+ // "Enabled" checkbox.
if (group->HasEnabledSetting())
{
AddSettingWidget(form_layout, group->enabled_setting.get());
- auto enable_labels = [form_layout](bool enabled) {
- // Skipping the "Enabled" checkbox row itself.
- constexpr int start_index = 1;
+ auto enable_labels = [form_layout, start_index = form_layout->rowCount()](bool enabled) {
+ // Skipping the "Enabled" checkbox row itself and the mapping indicator, if it exists.
for (int i = start_index; i < form_layout->count(); ++i)
{
auto* const item = form_layout->itemAt(i, QFormLayout::LabelRole);
@@ -131,15 +142,9 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
});
}
- if (indicator)
+ // "Calibrate" button.
+ if (indicator != nullptr)
{
- const auto indicator_layout = new QBoxLayout(QBoxLayout::Direction::Down);
- indicator_layout->addWidget(indicator);
- indicator_layout->setAlignment(Qt::AlignCenter);
- form_layout->addRow(indicator_layout);
-
- connect(this, &MappingWidget::Update, indicator, qOverload<>(&MappingIndicator::update));
-
const bool need_calibration = group->type == ControllerEmu::GroupType::Cursor ||
group->type == ControllerEmu::GroupType::Stick ||
group->type == ControllerEmu::GroupType::Tilt ||