From 487ec24b70b35d3f040489eff2b4a02db5c165a5 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Sun, 27 Dec 2020 23:28:54 +0300 Subject: [PATCH] Support emoji in section titles --- .../history/view/history_view_top_bar_widget.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index 61db25109..67de42292 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -371,16 +371,17 @@ void TopBarWidget::paintTopBar(Painter &p) { || _activeChat.section == Section::Scheduled || _activeChat.section == Section::Pinned) { p.setPen(st::ktgTopBarNameFg); - p.setFont(st::semiboldFont); - p.drawTextLeft( - nameleft, - nametop, - width(), + + Ui::Text::String textStr; + textStr.setText( + st::semiboldTextStyle, (_activeChat.section == Section::Replies ? tr::lng_manage_discussion_group(tr::now) : history->peer->isSelf() ? tr::lng_saved_messages(tr::now) - : history->peer->topBarNameText().toString())); + : history->peer->topBarNameText().toString()), + Ui::NameTextOptions()); + textStr.drawElided(p, nameleft, nametop, width()); p.setFont(st::dialogsTextFont); if (!paintConnectingState(p, nameleft, statustop, width())