mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinQt: Add the ability to show a tooltip for custom graphics controls
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user