mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Qt: add tooltip to MappingBool
Tooltip code is identical to MappingDouble and the tooltips (UI description) are present in the underlying setting object.
This commit is contained in:
@ -75,6 +75,9 @@ void MappingDouble::Update()
|
|||||||
MappingBool::MappingBool(MappingWidget* parent, ControllerEmu::NumericSetting<bool>* setting)
|
MappingBool::MappingBool(MappingWidget* parent, ControllerEmu::NumericSetting<bool>* setting)
|
||||||
: QCheckBox(parent), m_setting(*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) {
|
connect(this, &QCheckBox::stateChanged, this, [this, parent](int value) {
|
||||||
m_setting.SetValue(value != 0);
|
m_setting.SetValue(value != 0);
|
||||||
ConfigChanged();
|
ConfigChanged();
|
||||||
|
Reference in New Issue
Block a user