mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Rename reactionBottom* to reactionInline* styles.
This commit is contained in:
parent
604a827a52
commit
2dec1b72f7
3 changed files with 21 additions and 21 deletions
|
@ -142,7 +142,7 @@ QImage Reactions::resolveImageFor(
|
|||
};
|
||||
if (set.bottomInfo.isNull() && set.icon) {
|
||||
resolve(set.bottomInfo, st::reactionInfoImage);
|
||||
resolve(set.inlineList, st::reactionBottomImage);
|
||||
resolve(set.inlineList, st::reactionInlineImage);
|
||||
crl::async([icon = std::move(set.icon)]{});
|
||||
}
|
||||
switch (size) {
|
||||
|
|
|
@ -117,15 +117,15 @@ QSize InlineList::countOptimalSize() {
|
|||
return _skipBlock;
|
||||
}
|
||||
const auto left = (_data.flags & InlineListData::Flag::InBubble)
|
||||
? st::reactionBottomInBubbleLeft
|
||||
? st::reactionInlineInBubbleLeft
|
||||
: 0;
|
||||
auto x = left;
|
||||
const auto between = st::reactionBottomBetween;
|
||||
const auto padding = st::reactionBottomPadding;
|
||||
const auto size = st::reactionBottomSize;
|
||||
const auto between = st::reactionInlineBetween;
|
||||
const auto padding = st::reactionInlinePadding;
|
||||
const auto size = st::reactionInlineSize;
|
||||
const auto widthBase = padding.left()
|
||||
+ size
|
||||
+ st::reactionBottomSkip
|
||||
+ st::reactionInlineSkip
|
||||
+ padding.right();
|
||||
const auto height = padding.top() + size + padding.bottom();
|
||||
for (auto &button : _buttons) {
|
||||
|
@ -143,9 +143,9 @@ QSize InlineList::countCurrentSize(int newWidth) {
|
|||
return optimalSize();
|
||||
}
|
||||
using Flag = InlineListData::Flag;
|
||||
const auto between = st::reactionBottomBetween;
|
||||
const auto between = st::reactionInlineBetween;
|
||||
const auto inBubble = (_data.flags & Flag::InBubble);
|
||||
const auto left = inBubble ? st::reactionBottomInBubbleLeft : 0;
|
||||
const auto left = inBubble ? st::reactionInlineInBubbleLeft : 0;
|
||||
auto x = left;
|
||||
auto y = 0;
|
||||
for (auto &button : _buttons) {
|
||||
|
@ -186,9 +186,9 @@ void InlineList::paint(
|
|||
const QRect &clip) const {
|
||||
const auto st = context.st;
|
||||
const auto stm = context.messageStyle();
|
||||
const auto padding = st::reactionBottomPadding;
|
||||
const auto size = st::reactionBottomSize;
|
||||
const auto skip = (size - st::reactionBottomImage) / 2;
|
||||
const auto padding = st::reactionInlinePadding;
|
||||
const auto size = st::reactionInlineSize;
|
||||
const auto skip = (size - st::reactionInlineImage) / 2;
|
||||
const auto inbubble = (_data.flags & InlineListData::Flag::InBubble);
|
||||
const auto animated = (_animation && context.reactionEffects)
|
||||
? _animation->playingAroundEmoji()
|
||||
|
@ -234,7 +234,7 @@ void InlineList::paint(
|
|||
}
|
||||
const auto image = QRect(
|
||||
inner.topLeft() + QPoint(skip, skip),
|
||||
QSize(st::reactionBottomImage, st::reactionBottomImage));
|
||||
QSize(st::reactionInlineImage, st::reactionInlineImage));
|
||||
if (!button.image.isNull() && !skipImage) {
|
||||
p.drawImage(image.topLeft(), button.image);
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ void InlineList::paint(
|
|||
const auto textTop = geometry.y()
|
||||
+ ((geometry.height() - st::semiboldFont->height) / 2);
|
||||
p.drawText(
|
||||
inner.x() + size + st::reactionBottomSkip,
|
||||
inner.x() + size + st::reactionInlineSkip,
|
||||
textTop + st::semiboldFont->ascent,
|
||||
button.countText);
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ bool InlineList::getState(
|
|||
QPoint point,
|
||||
not_null<TextState*> outResult) const {
|
||||
const auto left = (_data.flags & InlineListData::Flag::InBubble)
|
||||
? st::reactionBottomInBubbleLeft
|
||||
? st::reactionInlineInBubbleLeft
|
||||
: 0;
|
||||
if (!QRect(left, 0, width() - left, height()).contains(point)) {
|
||||
return false;
|
||||
|
@ -296,7 +296,7 @@ void InlineList::animateSend(
|
|||
_owner,
|
||||
std::move(args),
|
||||
std::move(repaint),
|
||||
st::reactionBottomImage);
|
||||
st::reactionInlineImage);
|
||||
}
|
||||
|
||||
std::unique_ptr<SendAnimation> InlineList::takeSendAnimation() {
|
||||
|
|
|
@ -963,12 +963,12 @@ sendAsButton: SendAsButton {
|
|||
duration: 150;
|
||||
}
|
||||
|
||||
reactionBottomPadding: margins(5px, 2px, 7px, 2px);
|
||||
reactionBottomSize: 16px;
|
||||
reactionBottomImage: 28px;
|
||||
reactionBottomSkip: 3px;
|
||||
reactionBottomBetween: 4px;
|
||||
reactionBottomInBubbleLeft: -3px;
|
||||
reactionInlinePadding: margins(5px, 2px, 7px, 2px);
|
||||
reactionInlineSize: 16px;
|
||||
reactionInlineImage: 28px;
|
||||
reactionInlineSkip: 3px;
|
||||
reactionInlineBetween: 4px;
|
||||
reactionInlineInBubbleLeft: -3px;
|
||||
|
||||
reactionInfoSize: 15px;
|
||||
reactionInfoImage: 30px;
|
||||
|
|
Loading…
Add table
Reference in a new issue