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