mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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(),
|
tr::lng_profile_hide_participants(),
|
||||||
rpl::single(QString()),
|
rpl::single(QString()),
|
||||||
[] {},
|
[] {},
|
||||||
st::manageGroupTopicsButton,
|
st::manageGroupNoIconButton,
|
||||||
{ &st::menuIconHideMembers }
|
{}
|
||||||
))->toggleOn(rpl::single(
|
))->toggleOn(rpl::single(
|
||||||
(megagroup->flags() & ChannelDataFlag::ParticipantsHidden) != 0
|
(megagroup->flags() & ChannelDataFlag::ParticipantsHidden) != 0
|
||||||
) | rpl::then(state->toggled.events()));
|
) | 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) {
|
manageDeleteGroupButton: SettingsCountButton(manageGroupNoIconButton) {
|
||||||
button: SettingsButton(infoProfileButton) {
|
button: SettingsButton(manageGroupNoIconButtonInner) {
|
||||||
padding: margins(25px, 11px, 24px, 8px);
|
|
||||||
textFg: attentionButtonFg;
|
textFg: attentionButtonFg;
|
||||||
textFgOver: attentionButtonFg;
|
textFgOver: attentionButtonFg;
|
||||||
}
|
}
|
||||||
labelPosition: point(22px, 11px);
|
|
||||||
iconPosition: point(0px, 0px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
infoEmptyFg: windowSubTextFg;
|
infoEmptyFg: windowSubTextFg;
|
||||||
|
|
|
@ -312,9 +312,6 @@ void SetupSections(
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
std::move(descriptor)
|
std::move(descriptor)
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
if (type == PremiumId()) {
|
|
||||||
controller->setPremiumRef("settings");
|
|
||||||
}
|
|
||||||
showOther(type);
|
showOther(type);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -398,27 +395,28 @@ void SetupSections(
|
||||||
SetupPowerSavingButton(&controller->window(), container);
|
SetupPowerSavingButton(&controller->window(), container);
|
||||||
SetupLanguageButton(&controller->window(), container);
|
SetupLanguageButton(&controller->window(), container);
|
||||||
|
|
||||||
if (controller->session().premiumPossible()) {
|
AddSkip(container);
|
||||||
AddSkip(container);
|
}
|
||||||
AddDivider(container);
|
|
||||||
AddSkip(container);
|
|
||||||
|
|
||||||
const auto icon = &st::settingsPremiumIconStar;
|
void SetupPremium(
|
||||||
auto gradient = QLinearGradient(
|
not_null<Window::SessionController*> controller,
|
||||||
0,
|
not_null<Ui::VerticalLayout*> container,
|
||||||
icon->height(),
|
Fn<void(Type)> showOther) {
|
||||||
icon->width() + icon->width() / 3,
|
if (!controller->session().premiumPossible()) {
|
||||||
0 - icon->height() / 3);
|
return;
|
||||||
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) });
|
|
||||||
}
|
}
|
||||||
|
AddDivider(container);
|
||||||
|
AddSkip(container);
|
||||||
|
|
||||||
|
AddButton(
|
||||||
|
container,
|
||||||
|
tr::lng_premium_summary_title(),
|
||||||
|
st::settingsButton,
|
||||||
|
{ .icon = &st::menuIconPremium }
|
||||||
|
)->addClickHandler([=] {
|
||||||
|
controller->setPremiumRef("settings");
|
||||||
|
showOther(PremiumId());
|
||||||
|
});
|
||||||
AddSkip(container);
|
AddSkip(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,6 +684,9 @@ void Main::setupContent(not_null<Window::SessionController*> controller) {
|
||||||
SetupInterfaceScale(&controller->window(), content);
|
SetupInterfaceScale(&controller->window(), content);
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
}
|
}
|
||||||
|
SetupPremium(controller, content, [=](Type type) {
|
||||||
|
_showOther.fire_copy(type);
|
||||||
|
});
|
||||||
SetupHelp(controller, content);
|
SetupHelp(controller, content);
|
||||||
|
|
||||||
Ui::ResizeFitChild(this, content);
|
Ui::ResizeFitChild(this, content);
|
||||||
|
|
|
@ -134,7 +134,7 @@ menuIconSigned: icon {{ "menu/signed", menuIconColor }};
|
||||||
menuIconAntispam: icon {{ "menu/antispam", menuIconColor }};
|
menuIconAntispam: icon {{ "menu/antispam", menuIconColor }};
|
||||||
menuIconChatDiscuss: icon {{ "menu/chat_discuss", menuIconColor }};
|
menuIconChatDiscuss: icon {{ "menu/chat_discuss", menuIconColor }};
|
||||||
menuIconBotCommands: icon {{ "menu/bot_commands", 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 }};
|
menuIconTTLAny: icon {{ "menu/auto_delete_plain", menuIconColor }};
|
||||||
menuIconTTLAnyTextPosition: point(11px, 22px);
|
menuIconTTLAnyTextPosition: point(11px, 22px);
|
||||||
|
|
Loading…
Add table
Reference in a new issue