mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
parent
64aa5480ad
commit
ef10bb2bd6
2 changed files with 10 additions and 4 deletions
|
@ -408,10 +408,14 @@ TextState GroupedMedia::textState(QPoint point, StateRequest request) const {
|
|||
- (isBubbleBottom() ? st::msgPadding.bottom() : 0)
|
||||
- _caption.countHeight(captionw);
|
||||
if (QRect(st::msgPadding.left(), captiony, captionw, height() - captiony).contains(point)) {
|
||||
return TextState(_parent->data(), _caption.getState(
|
||||
point - QPoint(st::msgPadding.left(), captiony),
|
||||
captionw,
|
||||
request.forText()));
|
||||
return TextState(
|
||||
_captionItem
|
||||
? _captionItem
|
||||
: _parent->data().get(),
|
||||
_caption.getState(
|
||||
point - QPoint(st::msgPadding.left(), captiony),
|
||||
captionw,
|
||||
request.forText()));
|
||||
}
|
||||
} else if (_parent->media() == this) {
|
||||
auto fullRight = width();
|
||||
|
@ -667,6 +671,7 @@ void GroupedMedia::updateNeedBubbleState() {
|
|||
if (captionItem) {
|
||||
_caption = createCaption(captionItem);
|
||||
}
|
||||
_captionItem = captionItem;
|
||||
_needBubble = computeNeedBubble();
|
||||
}
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@ private:
|
|||
[[nodiscard]] QMargins groupedPadding() const;
|
||||
|
||||
Ui::Text::String _caption;
|
||||
HistoryItem *_captionItem = nullptr;
|
||||
std::vector<Part> _parts;
|
||||
Mode _mode = Mode::Grid;
|
||||
bool _needBubble = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue