From 38d6c5bed923d212b9a6cc8faba2ae0fa5cbd153 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 1 Jan 2010 19:31:44 +0000 Subject: [PATCH] don't cut halos svn path=/trunk/KDE/kdelibs/; revision=1068658 --- private/tooltip.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/private/tooltip.cpp b/private/tooltip.cpp index 2b52a4721..8ba00d3ee 100644 --- a/private/tooltip.cpp +++ b/private/tooltip.cpp @@ -91,7 +91,7 @@ public: QTextLine line; for (int i = 0; i < layout->lineCount(); ++i) { line = layout->lineAt(i); - m_haloRects.append(line.naturalTextRect().translated(layout->position().toPoint()).toRect()); + m_haloRects.append(line.naturalTextRect().translated(layout->position().toPoint()).toRect().translated(m_margin, m_margin)); } update(); @@ -99,7 +99,7 @@ public: QSize minimumSizeHint() const { - return m_document->size().toSize(); + return m_document->size().toSize() + QSize(m_margin, m_margin)*2; } QSize maximumSizeHint() const @@ -115,6 +115,7 @@ public: Plasma::PaintUtils::drawHalo(&p, rect); } + p.translate(m_margin, m_margin); m_document->drawContents(&p, event->rect()); } @@ -145,6 +146,7 @@ private: QTextDocument *m_document; QString m_anchor; QList m_haloRects; + static const int m_margin = 6; }; class ToolTipPrivate