mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Use outline premium icon.
This commit is contained in:
parent
80fb506f84
commit
5285f74b13
7 changed files with 35 additions and 29 deletions
BIN
Telegram/Resources/icons/menu/premium.png
Normal file
BIN
Telegram/Resources/icons/menu/premium.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 687 B |
BIN
Telegram/Resources/icons/menu/premium@2x.png
Normal file
BIN
Telegram/Resources/icons/menu/premium@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/menu/premium@3x.png
Normal file
BIN
Telegram/Resources/icons/menu/premium@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
|
@ -53,8 +53,8 @@ namespace {
|
|||
tr::lng_profile_hide_participants(),
|
||||
rpl::single(QString()),
|
||||
[] {},
|
||||
st::manageGroupTopicsButton,
|
||||
{ &st::menuIconHideMembers }
|
||||
st::manageGroupNoIconButton,
|
||||
{}
|
||||
))->toggleOn(rpl::single(
|
||||
(megagroup->flags() & ChannelDataFlag::ParticipantsHidden) != 0
|
||||
) | rpl::then(state->toggled.events()));
|
||||
|
|
|
@ -600,15 +600,20 @@ manageGroupTopicsButton: SettingsCountButton(manageGroupTopButtonWithText) {
|
|||
}
|
||||
}
|
||||
}
|
||||
manageGroupNoIconButtonInner: SettingsButton(infoProfileButton) {
|
||||
padding: margins(25px, 11px, 24px, 8px);
|
||||
}
|
||||
manageGroupNoIconButton: SettingsCountButton(manageGroupTopButtonWithText) {
|
||||
button: manageGroupNoIconButtonInner;
|
||||
labelPosition: point(22px, 11px);
|
||||
iconPosition: point(0px, 0px);
|
||||
}
|
||||
|
||||
manageDeleteGroupButton: SettingsCountButton(manageGroupTopButtonWithText) {
|
||||
button: SettingsButton(infoProfileButton) {
|
||||
padding: margins(25px, 11px, 24px, 8px);
|
||||
manageDeleteGroupButton: SettingsCountButton(manageGroupNoIconButton) {
|
||||
button: SettingsButton(manageGroupNoIconButtonInner) {
|
||||
textFg: attentionButtonFg;
|
||||
textFgOver: attentionButtonFg;
|
||||
}
|
||||
labelPosition: point(22px, 11px);
|
||||
iconPosition: point(0px, 0px);
|
||||
}
|
||||
|
||||
infoEmptyFg: windowSubTextFg;
|
||||
|
|
|
@ -312,9 +312,6 @@ void SetupSections(
|
|||
st::settingsButton,
|
||||
std::move(descriptor)
|
||||
)->addClickHandler([=] {
|
||||
if (type == PremiumId()) {
|
||||
controller->setPremiumRef("settings");
|
||||
}
|
||||
showOther(type);
|
||||
});
|
||||
};
|
||||
|
@ -398,27 +395,28 @@ void SetupSections(
|
|||
SetupPowerSavingButton(&controller->window(), container);
|
||||
SetupLanguageButton(&controller->window(), container);
|
||||
|
||||
if (controller->session().premiumPossible()) {
|
||||
AddSkip(container);
|
||||
AddDivider(container);
|
||||
AddSkip(container);
|
||||
AddSkip(container);
|
||||
}
|
||||
|
||||
const auto icon = &st::settingsPremiumIconStar;
|
||||
auto gradient = QLinearGradient(
|
||||
0,
|
||||
icon->height(),
|
||||
icon->width() + icon->width() / 3,
|
||||
0 - icon->height() / 3);
|
||||
gradient.setStops(QGradientStops{
|
||||
{ 0.0, st::premiumButtonBg1->c },
|
||||
{ 1.0, st::premiumButtonBg3->c },
|
||||
});
|
||||
addSection(
|
||||
tr::lng_premium_summary_title(),
|
||||
PremiumId(),
|
||||
{ .icon = icon, .backgroundBrush = QBrush(gradient) });
|
||||
void SetupPremium(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
Fn<void(Type)> showOther) {
|
||||
if (!controller->session().premiumPossible()) {
|
||||
return;
|
||||
}
|
||||
AddDivider(container);
|
||||
AddSkip(container);
|
||||
|
||||
AddButton(
|
||||
container,
|
||||
tr::lng_premium_summary_title(),
|
||||
st::settingsButton,
|
||||
{ .icon = &st::menuIconPremium }
|
||||
)->addClickHandler([=] {
|
||||
controller->setPremiumRef("settings");
|
||||
showOther(PremiumId());
|
||||
});
|
||||
AddSkip(container);
|
||||
}
|
||||
|
||||
|
@ -686,6 +684,9 @@ void Main::setupContent(not_null<Window::SessionController*> controller) {
|
|||
SetupInterfaceScale(&controller->window(), content);
|
||||
AddSkip(content);
|
||||
}
|
||||
SetupPremium(controller, content, [=](Type type) {
|
||||
_showOther.fire_copy(type);
|
||||
});
|
||||
SetupHelp(controller, content);
|
||||
|
||||
Ui::ResizeFitChild(this, content);
|
||||
|
|
|
@ -134,7 +134,7 @@ menuIconSigned: icon {{ "menu/signed", menuIconColor }};
|
|||
menuIconAntispam: icon {{ "menu/antispam", menuIconColor }};
|
||||
menuIconChatDiscuss: icon {{ "menu/chat_discuss", menuIconColor }};
|
||||
menuIconBotCommands: icon {{ "menu/bot_commands", menuIconColor }};
|
||||
menuIconHideMembers: icon {{ "menu/hide_members", menuIconColor }};
|
||||
menuIconPremium: icon {{ "menu/premium", menuIconColor }};
|
||||
|
||||
menuIconTTLAny: icon {{ "menu/auto_delete_plain", menuIconColor }};
|
||||
menuIconTTLAnyTextPosition: point(11px, 22px);
|
||||
|
|
Loading…
Add table
Reference in a new issue