mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Beta version 3.6.3: Fix emoji in ReactionsSettingsBox on non-Retina.
This commit is contained in:
parent
59fc9d3bfd
commit
5cf3b621ee
3 changed files with 20 additions and 18 deletions
|
@ -206,12 +206,14 @@ void AddMessage(
|
||||||
view->draw(p, context);
|
view->draw(p, context);
|
||||||
}, widget->lifetime());
|
}, widget->lifetime());
|
||||||
|
|
||||||
rpl::duplicate(
|
auto selectedEmoji = rpl::duplicate(emojiValue);
|
||||||
emojiValue
|
std::move(
|
||||||
) | rpl::start_with_next([=,
|
selectedEmoji
|
||||||
emojiValue = std::move(emojiValue),
|
) | rpl::start_with_next([
|
||||||
iconSize = st::settingsReactionMessageSize](
|
=,
|
||||||
const QString &emoji) {
|
emojiValue = std::move(emojiValue),
|
||||||
|
iconSize = st::settingsReactionMessageSize
|
||||||
|
](const QString &emoji) {
|
||||||
const auto &reactions = controller->session().data().reactions();
|
const auto &reactions = controller->session().data().reactions();
|
||||||
for (const auto &r : reactions.list(Data::Reactions::Type::All)) {
|
for (const auto &r : reactions.list(Data::Reactions::Type::All)) {
|
||||||
if (emoji != r.emoji) {
|
if (emoji != r.emoji) {
|
||||||
|
@ -308,8 +310,7 @@ void AddReactionLottieIcon(
|
||||||
const auto update = crl::guard(widget, [=] { widget->update(); });
|
const auto update = crl::guard(widget, [=] { widget->update(); });
|
||||||
|
|
||||||
widget->paintRequest(
|
widget->paintRequest(
|
||||||
) | rpl::start_with_next([=,
|
) | rpl::start_with_next([=] {
|
||||||
frameSize = (iconSize / style::DevicePixelRatio())] {
|
|
||||||
Painter p(widget);
|
Painter p(widget);
|
||||||
|
|
||||||
if (state->finalAnimation.animating()) {
|
if (state->finalAnimation.animating()) {
|
||||||
|
@ -328,10 +329,10 @@ void AddReactionLottieIcon(
|
||||||
const auto frame = animation->frame();
|
const auto frame = animation->frame();
|
||||||
p.drawImage(
|
p.drawImage(
|
||||||
QRect(
|
QRect(
|
||||||
(widget->width() - frameSize) / 2,
|
(widget->width() - iconSize) / 2,
|
||||||
(widget->height() - frameSize) / 2,
|
(widget->height() - iconSize) / 2,
|
||||||
frameSize,
|
iconSize,
|
||||||
frameSize),
|
iconSize),
|
||||||
frame);
|
frame);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -370,13 +370,13 @@ settingsPeerToPeerSkip: 9px;
|
||||||
|
|
||||||
settingsIconRadius: 6px;
|
settingsIconRadius: 6px;
|
||||||
|
|
||||||
settingsReactionSize: 50px;
|
settingsReactionSize: 25px;
|
||||||
settingsReactionRightSkip: -10px;
|
settingsReactionRightSkip: 0px;
|
||||||
settingsReactionCornerSize: size(28px, 22px);
|
settingsReactionCornerSize: size(28px, 22px);
|
||||||
settingsReactionCornerSkip: point(11px, -6px);
|
settingsReactionCornerSkip: point(11px, -6px);
|
||||||
settingsReactionMessageSize: 36px;
|
settingsReactionMessageSize: 18px;
|
||||||
|
|
||||||
settingsReactionRightIcon: 40px;
|
settingsReactionRightIcon: 20px;
|
||||||
|
|
||||||
notifyPreviewMargins: margins(40px, 20px, 40px, 58px);
|
notifyPreviewMargins: margins(40px, 20px, 40px, 58px);
|
||||||
notifyPreviewUserpicSize: 36px;
|
notifyPreviewUserpicSize: 36px;
|
||||||
|
|
|
@ -881,8 +881,9 @@ void SetupMessages(
|
||||||
) | rpl::filter([](const QString &emoji) {
|
) | rpl::filter([](const QString &emoji) {
|
||||||
return !emoji.isEmpty();
|
return !emoji.isEmpty();
|
||||||
});
|
});
|
||||||
rpl::duplicate(
|
auto selectedEmoji = rpl::duplicate(emojiValue);
|
||||||
emojiValue
|
std::move(
|
||||||
|
selectedEmoji
|
||||||
) | rpl::start_with_next([=, emojiValue = std::move(emojiValue)](
|
) | rpl::start_with_next([=, emojiValue = std::move(emojiValue)](
|
||||||
const QString &emoji) {
|
const QString &emoji) {
|
||||||
const auto &reactions = controller->session().data().reactions();
|
const auto &reactions = controller->session().data().reactions();
|
||||||
|
|
Loading…
Add table
Reference in a new issue