Blob Blame History Raw
From 312e4e22251aa2f040f1385f970b5b28a73bb598 Mon Sep 17 00:00:00 2001
From: Eike Hein <hein@kde.org>
Date: Sat, 13 Dec 2014 16:58:15 +0100
Subject: [PATCH 11/24] Fix layout and size hint calc for topic label to take
 descenders into account.

---
 src/viewer/topiclabel.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/viewer/topiclabel.cpp b/src/viewer/topiclabel.cpp
index 88a513d..6a8b433 100644
--- a/src/viewer/topiclabel.cpp
+++ b/src/viewer/topiclabel.cpp
@@ -48,7 +48,7 @@ namespace Konversation
 
     QSize TopicLabel::minimumSizeHint() const
     {
-        int minHeight = fontMetrics().lineSpacing() + fontMetrics().descent();
+        int minHeight = fontMetrics().ascent() + fontMetrics().descent();
         return QSize(0, minHeight);
     }
 
@@ -219,7 +219,7 @@ namespace Konversation
 
         text = tagUrls(text, m_channelName);
 
-        if(height() < (fontMetrics().lineSpacing() * 2))
+        if(height() < ((fontMetrics().ascent() + fontMetrics().descent()) * 2))
         {
             text = rPixelSqueeze(text, width() - 10);
             setWordWrap(false);
-- 
2.1.0