From c4ce9a6420dfbfd5326fc6f97a4e60a5367842fc Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 23 Aug 2026 16:51:35 +0400 Subject: [PATCH] Count a line of an article in Ui::Fixed instead of QFixed. --- .../iv/markdown/iv_markdown_article_layout_blocks.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/iv/markdown/iv_markdown_article_layout_blocks.cpp b/Telegram/SourceFiles/iv/markdown/iv_markdown_article_layout_blocks.cpp index c8d7d44650..372ef0f8c5 100644 --- a/Telegram/SourceFiles/iv/markdown/iv_markdown_article_layout_blocks.cpp +++ b/Telegram/SourceFiles/iv/markdown/iv_markdown_article_layout_blocks.cpp @@ -1822,11 +1822,11 @@ int TextLineHeight(const style::TextStyle &style) { int TextLineAscent(const style::TextStyle &style) { if (style.qtextEditLineMetrics) { - const auto lineHeight = QFixed(TextLineHeight(style)); - const auto leading = std::max(style.font->fleading, QFixed()); + const auto lineHeight = Ui::Fixed(TextLineHeight(style)); + const auto leading = std::max(style.font->fleading, Ui::Fixed()); return std::clamp( (lineHeight * 4 / 5) - leading, - QFixed(), + Ui::Fixed(), lineHeight).toInt(); } const auto lineHeight = TextLineHeight(style);