From kde-commits Wed Dec 29 19:36:25 2010 From: Diego Casella Date: Wed, 29 Dec 2010 19:36:25 +0000 To: kde-commits Subject: KDE/kdelibs/plasma/private Message-Id: <20101229193625.1E87A3E1F1 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129365142732763 SVN commit 1210143 by casella: * Prevent plasma tooltips to draw halos on empty lines. Closes review request #6233 M +4 -0 tooltip.cpp --- trunk/KDE/kdelibs/plasma/private/tooltip.cpp #1210142:1210143 @@ -91,8 +91,12 @@ QTextLine line; for (int i = 0; i < layout->lineCount(); ++i) { line = layout->lineAt(i); + + // Add halo rect only when a non empty line is found + if (line.naturalTextWidth()) { m_haloRects.append(line.naturalTextRect().translated(layout->position().toPoint()).toRect().translated(m_margin, m_margin)); } + } update(); }