Slightly improved style of boosts info.
BIN
Telegram/Resources/icons/boosts/boost_unclaimed.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
Telegram/Resources/icons/boosts/boost_unclaimed@2x.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
Telegram/Resources/icons/boosts/boost_unclaimed@3x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/boosts/boost_unknown.png
Normal file
After Width: | Height: | Size: 621 B |
BIN
Telegram/Resources/icons/boosts/boost_unknown@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/boosts/boost_unknown@3x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/boosts/mini_gift.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
Telegram/Resources/icons/boosts/mini_gift@2x.png
Normal file
After Width: | Height: | Size: 630 B |
BIN
Telegram/Resources/icons/boosts/mini_gift@3x.png
Normal file
After Width: | Height: | Size: 841 B |
BIN
Telegram/Resources/icons/boosts/mini_giveaway.png
Normal file
After Width: | Height: | Size: 368 B |
BIN
Telegram/Resources/icons/boosts/mini_giveaway@2x.png
Normal file
After Width: | Height: | Size: 648 B |
BIN
Telegram/Resources/icons/boosts/mini_giveaway@3x.png
Normal file
After Width: | Height: | Size: 864 B |
|
@ -24,7 +24,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "statistics/widgets/chart_header_widget.h"
|
#include "statistics/widgets/chart_header_widget.h"
|
||||||
#include "ui/boxes/boost_box.h"
|
#include "ui/boxes/boost_box.h"
|
||||||
#include "ui/controls/invite_link_buttons.h"
|
|
||||||
#include "ui/controls/invite_link_label.h"
|
#include "ui/controls/invite_link_label.h"
|
||||||
#include "ui/rect.h"
|
#include "ui/rect.h"
|
||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
|
@ -181,8 +180,35 @@ void FillShareLink(
|
||||||
) | rpl::start_with_next(copyLink, label->lifetime());
|
) | rpl::start_with_next(copyLink, label->lifetime());
|
||||||
const auto copyShareWrap = content->add(
|
const auto copyShareWrap = content->add(
|
||||||
object_ptr<Ui::VerticalLayout>(content));
|
object_ptr<Ui::VerticalLayout>(content));
|
||||||
Ui::AddCopyShareLinkButtons(copyShareWrap, copyLink, shareLink);
|
{
|
||||||
copyShareWrap->widgetAt(0)->showChildren();
|
const auto wrap = content->add(
|
||||||
|
object_ptr<Ui::FixedHeightWidget>(
|
||||||
|
content,
|
||||||
|
st::inviteLinkButton.height),
|
||||||
|
st::inviteLinkButtonsPadding);
|
||||||
|
const auto copy = CreateChild<Ui::RoundButton>(
|
||||||
|
wrap,
|
||||||
|
tr::lng_group_invite_context_copy(),
|
||||||
|
st::inviteLinkCopy);
|
||||||
|
copy->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
|
||||||
|
copy->setClickedCallback(copyLink);
|
||||||
|
const auto share = CreateChild<Ui::RoundButton>(
|
||||||
|
wrap,
|
||||||
|
tr::lng_group_invite_context_share(),
|
||||||
|
st::inviteLinkShare);
|
||||||
|
share->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
|
||||||
|
share->setClickedCallback(shareLink);
|
||||||
|
|
||||||
|
wrap->widthValue(
|
||||||
|
) | rpl::start_with_next([=](int width) {
|
||||||
|
const auto buttonWidth = (width - st::inviteLinkButtonsSkip) / 2;
|
||||||
|
copy->setFullWidth(buttonWidth);
|
||||||
|
share->setFullWidth(buttonWidth);
|
||||||
|
copy->moveToLeft(0, 0, width);
|
||||||
|
share->moveToRight(0, 0, width);
|
||||||
|
}, wrap->lifetime());
|
||||||
|
wrap->showChildren();
|
||||||
|
}
|
||||||
::Settings::AddSkip(content, st::boostsLinkFieldPadding.bottom());
|
::Settings::AddSkip(content, st::boostsLinkFieldPadding.bottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,6 +392,7 @@ void InnerWidget::fill() {
|
||||||
::Settings::AddDividerText(inner, tr::lng_boosts_list_subtext());
|
::Settings::AddDividerText(inner, tr::lng_boosts_list_subtext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::Settings::AddSkip(inner);
|
||||||
::Settings::AddSkip(inner);
|
::Settings::AddSkip(inner);
|
||||||
AddHeader(inner, tr::lng_boosts_link_title);
|
AddHeader(inner, tr::lng_boosts_link_title);
|
||||||
::Settings::AddSkip(inner, st::boostsLinkSkip);
|
::Settings::AddSkip(inner, st::boostsLinkSkip);
|
||||||
|
|
|
@ -476,6 +476,11 @@ PaintRoundImageCallback BoostRow::generatePaintUserpicCallback(bool force) {
|
||||||
}
|
}
|
||||||
return [=](Painter &p, int x, int y, int outerWidth, int size) mutable {
|
return [=](Painter &p, int x, int y, int outerWidth, int size) mutable {
|
||||||
_userpic.paintCircle(p, x, y, outerWidth, size);
|
_userpic.paintCircle(p, x, y, outerWidth, size);
|
||||||
|
(_boost.isUnclaimed
|
||||||
|
? st::boostsListUnclaimedIcon
|
||||||
|
: st::boostsListUnknownIcon).paintInCenter(
|
||||||
|
p,
|
||||||
|
{ x, y, size, size });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,9 +159,11 @@ boostsListBadgeHeight: 16px;
|
||||||
boostsListRightBadgeTextStyle: TextStyle(defaultTextStyle) {
|
boostsListRightBadgeTextStyle: TextStyle(defaultTextStyle) {
|
||||||
font: font(12px semibold);
|
font: font(12px semibold);
|
||||||
}
|
}
|
||||||
boostsListRightBadgeTextPadding: margins(16px, 1px, 6px, 0px);
|
boostsListRightBadgeTextPadding: margins(22px, 1px, 8px, 0px);
|
||||||
boostsListRightBadgePadding: margins(4px, 5px, 8px, 0px);
|
boostsListRightBadgePadding: margins(4px, 5px, 12px, 0px);
|
||||||
boostsListRightBadgeHeight: 20px;
|
boostsListRightBadgeHeight: 20px;
|
||||||
boostsListGiftMiniIconPadding: margins(1px, 2px, 0px, 0px);
|
boostsListGiftMiniIconPadding: margins(4px, 2px, 0px, 0px);
|
||||||
boostsListGiftMiniIcon: icon{{ "boosts/boost_mini2", historyPeer8UserpicBg2 }};
|
boostsListGiftMiniIcon: icon{{ "boosts/mini_gift", historyPeer8UserpicBg2 }};
|
||||||
boostsListGiveawayMiniIcon: icon{{ "boosts/boost_mini2", historyPeer4UserpicBg2 }};
|
boostsListGiveawayMiniIcon: icon{{ "boosts/mini_giveaway", historyPeer4UserpicBg2 }};
|
||||||
|
boostsListUnclaimedIcon: icon{{ "boosts/boost_unknown", premiumButtonFg }};
|
||||||
|
boostsListUnknownIcon: icon{{ "boosts/boost_unclaimed", premiumButtonFg }};
|
||||||
|
|