From 2fc5b69465f101f7ff00f7be8b53652077fa6190 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 26 Nov 2018 11:32:37 +0400 Subject: [PATCH] Fix auto word wrap in intro description. --- Telegram/SourceFiles/intro/intro.style | 1 + Telegram/SourceFiles/intro/introwidget.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/intro/intro.style b/Telegram/SourceFiles/intro/intro.style index 19535cd8f..3754dd367 100644 --- a/Telegram/SourceFiles/intro/intro.style +++ b/Telegram/SourceFiles/intro/intro.style @@ -59,6 +59,7 @@ introTitle: FlatLabel(defaultFlatLabel) { } introTitleTop: 1px; introDescription: FlatLabel(defaultFlatLabel) { + minWidth: 300px; textFg: introDescriptionFg; style: TextStyle(defaultTextStyle) { lineHeight: 20px; diff --git a/Telegram/SourceFiles/intro/introwidget.cpp b/Telegram/SourceFiles/intro/introwidget.cpp index 48444bcc8..696ce8909 100644 --- a/Telegram/SourceFiles/intro/introwidget.cpp +++ b/Telegram/SourceFiles/intro/introwidget.cpp @@ -658,6 +658,7 @@ void Widget::Step::updateLabelsPosition() { _description->moveToLeft((width() - _description->width()) / 2, contentTop() + st::introCoverDescriptionTop); } else { _title->moveToLeft(contentLeft() + st::buttonRadius, contentTop() + st::introTitleTop); + _description->resizeToWidth(st::introDescription.minWidth); _description->moveToLeft(contentLeft() + st::buttonRadius, contentTop() + st::introDescriptionTop); } if (_error) {