KWin: tooltips
Summary: BUG: 383040 KDecoration part of the patch: https://phabricator.kde.org/D7246 Reviewers: graesslin Reviewed By: graesslin Subscribers: cfeck, graesslin, luebking, broulik, kwin, #kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D9294
This commit is contained in:
parent
87f0a119e1
commit
04d8434a09
4 changed files with 26 additions and 0 deletions
|
@ -31,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KDecoration2/Decoration>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QToolTip>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -200,6 +201,17 @@ QColor DecoratedClientImpl::color(KDecoration2::ColorGroup group, KDecoration2::
|
|||
return QColor();
|
||||
}
|
||||
|
||||
void DecoratedClientImpl::requestShowToolTip(const QString &text)
|
||||
{
|
||||
QPoint pos = Cursor::pos();
|
||||
QToolTip::showText(pos, text);
|
||||
}
|
||||
|
||||
void DecoratedClientImpl::requestHideToolTip()
|
||||
{
|
||||
QToolTip::hideText();
|
||||
}
|
||||
|
||||
void DecoratedClientImpl::requestShowWindowMenu()
|
||||
{
|
||||
// TODO: add rect to requestShowWindowMenu
|
||||
|
|
|
@ -72,6 +72,8 @@ public:
|
|||
bool hasApplicationMenu() const override;
|
||||
bool isApplicationMenuActive() const override;
|
||||
|
||||
void requestShowToolTip(const QString &text) override;
|
||||
void requestHideToolTip() override;
|
||||
void requestClose() override;
|
||||
void requestContextHelp() override;
|
||||
void requestToggleMaximization(Qt::MouseButtons buttons) override;
|
||||
|
|
|
@ -351,6 +351,16 @@ void PreviewClient::setBordersTopEdge(bool enabled)
|
|||
emit bordersTopEdgeChanged(enabled);
|
||||
}
|
||||
|
||||
void PreviewClient::requestShowToolTip(const QString &text)
|
||||
{
|
||||
qDebug() << "tooltip show requested with text:" << text;
|
||||
}
|
||||
|
||||
void PreviewClient::requestHideToolTip()
|
||||
{
|
||||
qDebug() << "tooltip hide requested";
|
||||
}
|
||||
|
||||
void PreviewClient::requestClose()
|
||||
{
|
||||
emit closeRequested();
|
||||
|
|
|
@ -97,6 +97,8 @@ public:
|
|||
bool hasApplicationMenu() const override;
|
||||
bool isApplicationMenuActive() const override;
|
||||
|
||||
void requestShowToolTip(const QString &text) override;
|
||||
void requestHideToolTip() override;
|
||||
void requestClose() override;
|
||||
void requestContextHelp() override;
|
||||
void requestToggleMaximization(Qt::MouseButtons buttons) override;
|
||||
|
|
Loading…
Reference in a new issue