2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Support emoji in section titles

This commit is contained in:
RadRussianRus
2020-12-27 23:28:54 +03:00
parent c528820713
commit 487ec24b70

View File

@@ -371,16 +371,17 @@ void TopBarWidget::paintTopBar(Painter &p) {
|| _activeChat.section == Section::Scheduled || _activeChat.section == Section::Scheduled
|| _activeChat.section == Section::Pinned) { || _activeChat.section == Section::Pinned) {
p.setPen(st::ktgTopBarNameFg); p.setPen(st::ktgTopBarNameFg);
p.setFont(st::semiboldFont);
p.drawTextLeft( Ui::Text::String textStr;
nameleft, textStr.setText(
nametop, st::semiboldTextStyle,
width(),
(_activeChat.section == Section::Replies (_activeChat.section == Section::Replies
? tr::lng_manage_discussion_group(tr::now) ? tr::lng_manage_discussion_group(tr::now)
: history->peer->isSelf() : history->peer->isSelf()
? tr::lng_saved_messages(tr::now) ? 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); p.setFont(st::dialogsTextFont);
if (!paintConnectingState(p, nameleft, statustop, width()) if (!paintConnectingState(p, nameleft, statustop, width())