From 8dca3195452c499e362311c0be0573ea8dc90862 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 23 Jan 2015 13:20:40 +0300 Subject: [PATCH] fixed FlatLabel for large texts --- Telegram/SourceFiles/gui/flatlabel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/gui/flatlabel.cpp b/Telegram/SourceFiles/gui/flatlabel.cpp index 1b935f077..1774996a8 100644 --- a/Telegram/SourceFiles/gui/flatlabel.cpp +++ b/Telegram/SourceFiles/gui/flatlabel.cpp @@ -36,8 +36,8 @@ _text(st.width ? st.width : QFIXED_MAX), _st(st), _tst(tst), _opacity(1) { void FlatLabel::setText(const QString &text) { textstyleSet(&_tst); _text.setText(_st.font, text, _labelOptions); - textstyleRestore(); int32 w = _st.width ? _st.width : _text.maxWidth(), h = _text.countHeight(w); + textstyleRestore(); resize(w, h); } @@ -45,8 +45,8 @@ void FlatLabel::setRichText(const QString &text) { textstyleSet(&_tst); const char *t = text.toUtf8().constData(); _text.setRichText(_st.font, text, _labelOptions); - textstyleRestore(); int32 w = _st.width ? _st.width : _text.maxWidth(), h = _text.countHeight(w); + textstyleRestore(); resize(w, h); setMouseTracking(_text.hasLinks()); }