diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2020-10-17 00:05:43 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2020-11-28 11:49:14 -0600 |
| commit | a9271aa167f0fca3780bdad32b682cb964db116f (patch) | |
| tree | 3aa0ea1c3b1a0d8a9ea9bdc136ddb2bafe22a9b7 /Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp | |
| parent | af0161cafdb5044d46814ab64ac5b7fb82e8c343 (diff) | |
DolphinQt: Add the ability to show a tooltip for custom graphics controls
Diffstat (limited to 'Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp index 4d5eaf6973..e05f956463 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include "DolphinQt/Config/Graphics/GraphicsBool.h" +#include "DolphinQt/Config/Graphics/BalloonTip.h" #include <QSignalBlocker> @@ -10,10 +11,11 @@ #include "DolphinQt/Settings.h" +#include <QEvent> #include <QFont> GraphicsBool::GraphicsBool(const QString& label, const Config::Info<bool>& setting, bool reverse) - : QCheckBox(label), m_setting(setting), m_reverse(reverse) + : ToolTipCheckBox(label), m_setting(setting), m_reverse(reverse) { connect(this, &QCheckBox::toggled, this, &GraphicsBool::Update); setChecked(Config::Get(m_setting) ^ reverse); @@ -35,7 +37,7 @@ void GraphicsBool::Update() GraphicsBoolEx::GraphicsBoolEx(const QString& label, const Config::Info<bool>& setting, bool reverse) - : QRadioButton(label), m_setting(setting), m_reverse(reverse) + : ToolTipRadioButton(label), m_setting(setting), m_reverse(reverse) { connect(this, &QCheckBox::toggled, this, &GraphicsBoolEx::Update); setChecked(Config::Get(m_setting) ^ reverse); |
