From 9229c57e7add48386092ca8780602a120278d692 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 9 Nov 2022 12:51:06 +0400 Subject: [PATCH] Fix monospace-wide comments thread root message. Fixes #16343. --- Telegram/SourceFiles/history/view/history_view_message.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 5f0938895..d48cff0e2 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -3129,7 +3129,9 @@ QRect Message::countGeometry() const { contentLeft += (availableWidth - contentWidth) / 2; } } else if (contentWidth < availableWidth && commentsRoot) { - contentLeft += ((st::msgMaxWidth + 2 * st::msgPhotoSkip) - contentWidth) / 2; + contentLeft += std::max( + ((st::msgMaxWidth + 2 * st::msgPhotoSkip) - contentWidth) / 2, + 0); } const auto contentTop = marginTop();