mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Pause spoilers in reply / edit panels.
This commit is contained in:
parent
187f5fa4f3
commit
0b7a2c18a2
4 changed files with 17 additions and 7 deletions
Telegram/SourceFiles/history
|
@ -474,6 +474,8 @@ void HistoryMessageReply::paint(
|
|||
? stm->replyTextPalette
|
||||
: st->imgReplyTextPalette()),
|
||||
.spoiler = Ui::Text::DefaultSpoilerCache(),
|
||||
.now = context.now,
|
||||
.paused = context.paused,
|
||||
.elisionLines = 1,
|
||||
});
|
||||
p.setTextPalette(stm->textPalette);
|
||||
|
|
|
@ -7509,6 +7509,8 @@ void HistoryWidget::drawField(Painter &p, const QRect &rect) {
|
|||
.availableWidth = width() - replyLeft - _fieldBarCancel->width() - st::msgReplyPadding.right(),
|
||||
.palette = &st::historyComposeAreaPalette,
|
||||
.spoiler = Ui::Text::DefaultSpoilerCache(),
|
||||
.now = crl::now(),
|
||||
.paused = p.inactive(),
|
||||
.elisionLines = 1,
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -460,6 +460,8 @@ void FieldHeader::init() {
|
|||
paintRequest(
|
||||
) | rpl::start_with_next([=] {
|
||||
Painter p(this);
|
||||
p.setInactive(
|
||||
_controller->isGifPausedAtLeastFor(Window::GifPauseReason::Any));
|
||||
p.fillRect(rect(), st::historyComposeAreaBg);
|
||||
|
||||
const auto position = st::historyReplyIconPosition;
|
||||
|
@ -795,6 +797,8 @@ void FieldHeader::paintEditOrReplyToMessage(Painter &p) {
|
|||
.availableWidth = availableWidth,
|
||||
.palette = &st::historyComposeAreaPalette,
|
||||
.spoiler = Ui::Text::DefaultSpoilerCache(),
|
||||
.now = crl::now(),
|
||||
.paused = p.inactive(),
|
||||
.elisionLines = 1,
|
||||
});
|
||||
}
|
||||
|
@ -926,15 +930,15 @@ ComposeControls::ComposeControls(
|
|||
_wrap.get(),
|
||||
st::historyBotCommandStart))
|
||||
, _autocomplete(std::make_unique<FieldAutocomplete>(
|
||||
parent,
|
||||
window))
|
||||
parent,
|
||||
window))
|
||||
, _header(std::make_unique<FieldHeader>(_wrap.get(), _window))
|
||||
, _voiceRecordBar(std::make_unique<VoiceRecordBar>(
|
||||
_wrap.get(),
|
||||
parent,
|
||||
window,
|
||||
_send,
|
||||
st::historySendSize.height()))
|
||||
_wrap.get(),
|
||||
parent,
|
||||
window,
|
||||
_send,
|
||||
st::historySendSize.height()))
|
||||
, _sendMenuType(sendMenuType)
|
||||
, _unavailableEmojiPasted(unavailableEmojiPasted)
|
||||
, _saveDraftTimer([=] { saveDraft(); })
|
||||
|
|
|
@ -354,6 +354,8 @@ void ForwardPanel::paint(
|
|||
.availableWidth = available,
|
||||
.palette = &st::historyComposeAreaPalette,
|
||||
.spoiler = Ui::Text::DefaultSpoilerCache(),
|
||||
.now = crl::now(),
|
||||
.paused = p.inactive(),
|
||||
.elisionLines = 1,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue