Skip to content

Show full title tooltip when chat name is truncated#30514

Open
re-void wants to merge 1 commit intotelegramdesktop:devfrom
re-void:fix/1502-chat-title-tooltip
Open

Show full title tooltip when chat name is truncated#30514
re-void wants to merge 1 commit intotelegramdesktop:devfrom
re-void:fix/1502-chat-title-tooltip

Conversation

@re-void
Copy link
Copy Markdown

@re-void re-void commented Apr 2, 2026

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::ToolTip handling in TopBarWidget. 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 — added bool event(QEvent *e) override
  • history_view_top_bar_widget.cpp — tooltip logic in event(), added <QtWidgets/QToolTip> include

Fixes #1502

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 2, 2026

CLA assistant check
All committers have signed the CLA.

&& _activeChat.section == Section::Replies) {
const auto &topicName = topic->chatListNameText();
if (topicName.maxWidth() > namewidth) {
QToolTip::showText(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@re-void re-void force-pushed the fix/1502-chat-title-tooltip branch from 19783ce to 2bafd7f Compare April 4, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hovering chat title should show the full title in tooltip

3 participants