From 1f7e1ca483a946641d85d71bbbd335c23eaa3da1 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 21 May 2026 10:23:51 +0300 Subject: [PATCH] Fixed Info top bar title overlap with right-side buttons on long titles. --- Telegram/SourceFiles/info/info_top_bar.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/info/info_top_bar.cpp b/Telegram/SourceFiles/info/info_top_bar.cpp index f89dceea3c..7f8d402443 100644 --- a/Telegram/SourceFiles/info/info_top_bar.cpp +++ b/Telegram/SourceFiles/info/info_top_bar.cpp @@ -393,10 +393,17 @@ void TopBar::updateDefaultControlsGeometry(int newWidth) { const auto y = _subtitle ? _st.titleWithSubtitlePosition.y() : _st.titlePosition.y(); + const auto available = std::max(newWidth - right - x, 0); + _title->entity()->resizeToWidth(available); _title->moveToLeft(x, y, newWidth); if (_subtitle) { + const auto subtitleX = _back + ? _st.back.width + : _st.subtitlePosition.x(); + _subtitle->entity()->resizeToWidth( + std::max(newWidth - right - subtitleX, 0)); _subtitle->moveToLeft( - _back ? _st.back.width : _st.subtitlePosition.x(), + subtitleX, _st.subtitlePosition.y(), newWidth); }