mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed emoji display in header of link for dialog filters.
This commit is contained in:
parent
d6e5e1e8f7
commit
bf9d90ca4e
3 changed files with 20 additions and 9 deletions
|
@ -1114,7 +1114,7 @@ QString FilterChatStatusText(not_null<PeerData*> peer) {
|
||||||
? tr::lng_chat_status_subscribers
|
? tr::lng_chat_status_subscribers
|
||||||
: tr::lng_chat_status_members)(
|
: tr::lng_chat_status_members)(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_count,
|
lt_count_decimal,
|
||||||
channel->membersCount());
|
channel->membersCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -560,9 +560,9 @@ filterLinkPreviewRadius: 13px;
|
||||||
filterLinkPreviewTop: 30px;
|
filterLinkPreviewTop: 30px;
|
||||||
filterLinkPreviewColumn: 65px;
|
filterLinkPreviewColumn: 65px;
|
||||||
filterLinkPreviewAllBottom: 18px;
|
filterLinkPreviewAllBottom: 18px;
|
||||||
filterLinkPreviewAllTop: 17px;
|
filterLinkPreviewAllTop: 15px;
|
||||||
filterLinkPreviewMyBottom: 74px;
|
filterLinkPreviewMyBottom: 74px;
|
||||||
filterLinkPreviewMyTop: 73px;
|
filterLinkPreviewMyTop: 71px;
|
||||||
filterLinkPreviewChatSize: 36px;
|
filterLinkPreviewChatSize: 36px;
|
||||||
filterLinkPreviewChatSkip: 10px;
|
filterLinkPreviewChatSkip: 10px;
|
||||||
filterLinkPreviewBadgeLeft: 40px;
|
filterLinkPreviewBadgeLeft: 40px;
|
||||||
|
|
|
@ -105,11 +105,22 @@ private:
|
||||||
icon->paint(p, iconLeft, myIconTop, size);
|
icon->paint(p, iconLeft, myIconTop, size);
|
||||||
|
|
||||||
const auto paintName = [&](const QString &text, int top) {
|
const auto paintName = [&](const QString &text, int top) {
|
||||||
const auto &font = st.style.font;
|
auto string = Ui::Text::String(
|
||||||
p.drawText(
|
st.style,
|
||||||
QRect(0, top, column, font->height),
|
text,
|
||||||
font->elided(text, available),
|
kDefaultTextOptions,
|
||||||
style::al_top);
|
available);
|
||||||
|
string.draw(p, {
|
||||||
|
.position = QPoint(
|
||||||
|
std::max(
|
||||||
|
(column - string.maxWidth()) / 2,
|
||||||
|
skip),
|
||||||
|
top),
|
||||||
|
.outerWidth = available,
|
||||||
|
.availableWidth = available,
|
||||||
|
.align = style::al_left,
|
||||||
|
.elisionLines = 1,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
p.setFont(st.style.font);
|
p.setFont(st.style.font);
|
||||||
p.setPen(st.textFg);
|
p.setPen(st.textFg);
|
||||||
|
@ -456,4 +467,4 @@ object_ptr<RoundButton> FilterLinkProcessButton(
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
Loading…
Add table
Reference in a new issue