mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-01 07:52:37 +00:00
DolphinQt: Add ToolTipPushButton.
This commit is contained in:
parent
381121f2d5
commit
4e94ca53f1
4 changed files with 37 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2023 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipPushButton.h"
|
||||
|
||||
ToolTipPushButton::ToolTipPushButton(const QString& text, QWidget* parent)
|
||||
: ToolTipWidget(text, parent)
|
||||
{
|
||||
}
|
||||
|
||||
QPoint ToolTipPushButton::GetToolTipPosition() const
|
||||
{
|
||||
return pos() + QPoint(width() / 2, height() / 2);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2023 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipWidget.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
|
||||
class ToolTipPushButton : public ToolTipWidget<NonDefaultQPushButton>
|
||||
{
|
||||
public:
|
||||
explicit ToolTipPushButton(const QString& text = {}, QWidget* parent = nullptr);
|
||||
|
||||
private:
|
||||
QPoint GetToolTipPosition() const override;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue