Show full title tooltip when chat name is truncated#30514
Open
re-void wants to merge 1 commit intotelegramdesktop:devfrom
Open
Show full title tooltip when chat name is truncated#30514re-void wants to merge 1 commit intotelegramdesktop:devfrom
re-void wants to merge 1 commit intotelegramdesktop:devfrom
Conversation
ilya-fedin
reviewed
Apr 3, 2026
| && _activeChat.section == Section::Replies) { | ||
| const auto &topicName = topic->chatListNameText(); | ||
| if (topicName.maxWidth() > namewidth) { | ||
| QToolTip::showText( |
Contributor
There was a problem hiding this comment.
tdesktop uses AbstractTooltipShower
When the chat title in the top bar is too long and gets elided, hovering over it now shows a tooltip with the full name. This works for both regular chats and forum topics. Fixes telegramdesktop#1502
19783ce to
2bafd7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a chat title is too long, it gets truncated with ellipsis in the top bar. There is no way to view the full name without resizing the window — and even that doesn't always help.
Solution
Added
QEvent::ToolTiphandling inTopBarWidget. When hovering over the title area, a tooltip with the full chat name is shown only if the text is actually truncated (maxWidth() > availableWidth).Works for both regular chats and forum topics.
Changes
history_view_top_bar_widget.h— addedbool event(QEvent *e) overridehistory_view_top_bar_widget.cpp— tooltip logic inevent(), added<QtWidgets/QToolTip>includeFixes #1502