diff options
| author | Filoppi <filippotarpini@hotmail.it> | 2021-05-06 11:50:29 +0300 |
|---|---|---|
| committer | Filoppi <filippotarpini@hotmail.it> | 2021-05-12 18:27:24 +0300 |
| commit | f3ffac00583bd03d0620226392a2b15f3cfd273b (patch) | |
| tree | fe01ac44ab139e7b284d57f14d2e8c129e0bb95c /Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp | |
| parent | 26f664842184a2fd5236de2621eff509b05d0c3d (diff) | |
Qt: add tooltip to MappingBool
Tooltip code is identical to MappingDouble and the tooltips (UI description)
are present in the underlying setting object.
Diffstat (limited to 'Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp index d84310ffa7..bfebe78341 100644 --- a/Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp +++ b/Source/Core/DolphinQt/Config/Mapping/MappingNumeric.cpp @@ -75,6 +75,9 @@ void MappingDouble::Update() MappingBool::MappingBool(MappingWidget* parent, ControllerEmu::NumericSetting<bool>* setting) : QCheckBox(parent), m_setting(*setting) { + if (const auto ui_description = m_setting.GetUIDescription()) + setToolTip(tr(ui_description)); + connect(this, &QCheckBox::stateChanged, this, [this, parent](int value) { m_setting.SetValue(value != 0); ConfigChanged(); |
