fix decoration tooltips style

This commit is contained in:
MouseZhang 2022-12-02 09:59:16 +08:00
parent 12a53b86c7
commit 60d039c3ea
1 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include <QDebug>
#include <QStyle>
#include <QToolTip>
#include <QPalette>
namespace KWin
{
@ -93,6 +94,11 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
int fallAsleepDelay = QApplication::style()->styleHint(QStyle::SH_ToolTip_FallAsleepDelay);
this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay);
QPalette p = QToolTip::palette();
p.setColor(QPalette::ToolTipBase, this->client()->palette().base().color());
p.setColor(QPalette::ToolTipText, this->client()->palette().text().color());
QToolTip::setPalette(p);
QToolTip::showText(Cursors::self()->mouse()->pos(), this->m_toolTipText);
m_toolTipShowing = true;
}