Update icons for gifts privacy.

This commit is contained in:
John Preston 2025-03-21 18:04:03 +04:00
parent 696be858f6
commit 7312e34f46
11 changed files with 9 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -25,10 +25,10 @@ enum class UnarchiveOnNewMessage {
};
enum class DisallowedGiftType : uchar {
Premium = 0x01,
Limited = 0x01,
Unlimited = 0x02,
Limited = 0x04,
Unique = 0x08,
Unique = 0x04,
Premium = 0x08,
SendHide = 0x10,
};
inline constexpr bool is_flag_type(DisallowedGiftType) { return true; }

View file

@ -1132,8 +1132,8 @@ historyScheduledToggle: IconButton(historyAttach) {
};
}
historyGiftToUser: IconButton(historyAttach) {
icon: icon {{ "menu/gift_premium", historyComposeIconFg }};
iconOver: icon {{ "menu/gift_premium", historyComposeIconFgOver }};
icon: icon {{ "chat/input_gift", historyComposeIconFg }};
iconOver: icon {{ "chat/input_gift", historyComposeIconFgOver }};
}
historyAttachEmojiInner: IconButton(historyAttach) {

View file

@ -3044,6 +3044,7 @@ void HistoryWidget::refreshSendGiftToggle() {
&& !user->isSelf()
&& !user->isBot()
&& ((disallowed & Type::SendHide)
|| (session().user()->disallowedGiftTypes() & Type::SendHide)
|| Data::IsBirthdayToday(user->birthday()))
&& ((disallowed & all) != all);
if (!_giftToUser && has) {

View file

@ -686,6 +686,6 @@ settingsChatLinkField: InputField(defaultInputField) {
settingsQuickDialogActionsTriggerFont: font(11px);
settingsGiftIconEmoji: IconEmoji {
icon: icon{{ "menu/gift_premium", windowFg }};
padding: margins(0px, 1px, 0px, 0px);
icon: icon{{ "settings/mini_gift", windowFg }};
padding: margins(1px, 2px, 1px, 0px);
}

View file

@ -1734,8 +1734,8 @@ object_ptr<Ui::RpWidget> GiftsAutoSavePrivacyController::setupBelowWidget(
content,
tr::lng_edit_privacy_gifts_types());
const auto types = base::flat_map<Type, rpl::producer<QString>>{
{ Type::Unlimited, tr::lng_edit_privacy_gifts_unlimited() },
{ Type::Limited, tr::lng_edit_privacy_gifts_limited() },
{ Type::Unlimited, tr::lng_edit_privacy_gifts_unlimited() },
{ Type::Unique, tr::lng_edit_privacy_gifts_unique() },
{ Type::Premium, tr::lng_edit_privacy_gifts_premium() },
};