mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Replaced chart emoji with themed poll icon in reply view.
This commit is contained in:
@@ -48,6 +48,8 @@ historyPollRadio: Radio(defaultRadio) {
|
||||
rippleAreaPadding: 8px;
|
||||
}
|
||||
historyPollCheckboxRadius: 3px;
|
||||
historyPollReplyIcon: icon {{ "dialogs/dialogs_chatlist_poll-17x17", windowFg }};
|
||||
historyPollReplyIconSkip: 3px;
|
||||
historyPollRadioOpacity: 0.7;
|
||||
historyPollRadioOpacityOver: 1.;
|
||||
historyPollDuration: 300;
|
||||
|
||||
@@ -391,6 +391,7 @@ void Reply::update(
|
||||
_displaying = data->displaying() ? 1 : 0;
|
||||
_multiline = data->multiline() ? 1 : 0;
|
||||
_replyToStory = (fields.storyId != 0);
|
||||
_replyToPoll = (messagePoll && !pollAnswer) ? 1 : 0;
|
||||
const auto hasQuoteIcon = _displaying
|
||||
&& fields.manualQuote
|
||||
&& !fields.quote.empty();
|
||||
@@ -418,6 +419,8 @@ void Reply::update(
|
||||
.image = MakePollAnswerImage(),
|
||||
.margin = QMargins(0, st::lineWidth, st::lineWidth, 0),
|
||||
})).append(pollAnswer->text)
|
||||
: messagePoll
|
||||
? TextWithEntities().append(messagePoll->question)
|
||||
: (message && (fields.quote.empty() || !fields.manualQuote))
|
||||
? message->inReplyText()
|
||||
: !fields.quote.empty()
|
||||
@@ -1023,6 +1026,16 @@ void Reply::paint(
|
||||
firstLineSkip += st::dialogsMiniReplyStory.skipText
|
||||
+ st::dialogsMiniReplyStory.icon.icon.width();
|
||||
}
|
||||
if (_replyToPoll) {
|
||||
st::historyPollReplyIcon.paint(
|
||||
p,
|
||||
textLeft + firstLineSkip,
|
||||
textTop,
|
||||
w + 2 * x,
|
||||
replyToTextPalette->linkFg->c);
|
||||
firstLineSkip += st::historyPollReplyIconSkip
|
||||
+ st::historyPollReplyIcon.width();
|
||||
}
|
||||
_text.draw(p, {
|
||||
.position = { textLeft, textTop },
|
||||
.geometry = textGeometry(textw, firstLineSkip),
|
||||
|
||||
@@ -153,6 +153,7 @@ private:
|
||||
uint8 _hiddenSenderColorIndexPlusOne : 7 = 0;
|
||||
uint8 _hasQuoteIcon : 1 = 0;
|
||||
uint8 _replyToStory : 1 = 0;
|
||||
uint8 _replyToPoll : 1 = 0;
|
||||
uint8 _expanded : 1 = 0;
|
||||
mutable uint8 _expandable : 1 = 0;
|
||||
mutable uint8 _minHeightExpandable : 1 = 0;
|
||||
|
||||
Reference in New Issue
Block a user