mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Redesign web pages preview.
This commit is contained in:
@@ -780,9 +780,11 @@ void HistoryMessageReply::paint(
|
||||
auto replyToTextPosition = QPoint(
|
||||
x + textLeft,
|
||||
y + st::historyReplyPadding.top() + st::msgServiceNameFont->height);
|
||||
const auto replyToTextPalette = &(inBubble
|
||||
? stm->replyTextPalette
|
||||
: st->imgReplyTextPalette());
|
||||
auto replyToTextPalette = &(!inBubble
|
||||
? st->imgReplyTextPalette()
|
||||
: _colorIndexPlusOne
|
||||
? st->coloredTextPalette(selected, _colorIndexPlusOne - 1)
|
||||
: stm->replyTextPalette);
|
||||
if (_fields.storyId) {
|
||||
st::dialogsMiniReplyStory.icon.icon.paint(
|
||||
p,
|
||||
@@ -794,6 +796,14 @@ void HistoryMessageReply::paint(
|
||||
+ st::dialogsMiniReplyStory.icon.icon.width(),
|
||||
0);
|
||||
}
|
||||
auto owned = std::optional<style::owned_color>();
|
||||
auto copy = std::optional<style::TextPalette>();
|
||||
if (inBubble && _colorIndexPlusOne) {
|
||||
copy.emplace(*replyToTextPalette);
|
||||
owned.emplace(cache->outline);
|
||||
copy->linkFg = owned->color();
|
||||
replyToTextPalette = &*copy;
|
||||
}
|
||||
_text.draw(p, {
|
||||
.position = replyToTextPosition,
|
||||
.availableWidth = w,
|
||||
|
Reference in New Issue
Block a user