Fix line spacing being wrong for some people (partially cut off ChatLines)
[quassel.git] / src / qtui / chatitem.cpp
index 9519d60..50d74f5 100644 (file)
@@ -63,7 +63,6 @@ qreal ChatItem::setGeometry(qreal w, qreal h) {
   prepareGeometryChange();
   _boundingRect.setWidth(w);
   if(h < 0) h = computeHeight();
-  //if(h < 0) h = fontMetrics()->lineSpacing(); // only contents can be multi-line
   _boundingRect.setHeight(h);
   if(haveLayout()) updateLayout();
   return h;
@@ -296,7 +295,7 @@ void ContentsChatItem::updateLayout() {
     int col = finder.nextWrapColumn();
     line.setNumColumns(col >= 0 ? col - line.textStart() : layout()->text().length());
     line.setPosition(QPointF(0, h));
-    h += line.height() + fontMetrics()->leading();
+    h += fontMetrics()->lineSpacing();
   }
   layout()->endLayout();
 }