Slightly improved style of menu for sponsored messages.
BIN
Telegram/Resources/icons/menu/channel.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
Telegram/Resources/icons/menu/channel@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Telegram/Resources/icons/menu/channel@3x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 463 B |
Before Width: | Height: | Size: 949 B After Width: | Height: | Size: 1,016 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -158,7 +158,7 @@ void FillSponsoredMessagesMenu(
|
|||
auto item = base::make_unique_q<Ui::Menu::MultilineAction>(
|
||||
menu,
|
||||
st::defaultMenu,
|
||||
st::historyHasCustomEmoji,
|
||||
st::historySponsorInfoItem,
|
||||
st::historyHasCustomEmojiPosition,
|
||||
base::duplicate(i));
|
||||
item->clicks(
|
||||
|
@ -173,29 +173,14 @@ void FillSponsoredMessagesMenu(
|
|||
CreateAddActionCallback(menu)(MenuCallback::Args{
|
||||
.text = tr::lng_sponsored_info_menu(tr::now),
|
||||
.handler = nullptr,
|
||||
.icon = nullptr,
|
||||
.icon = &st::menuIconChannel,
|
||||
.fillSubmenu = std::move(fillSubmenu),
|
||||
});
|
||||
menu->addSeparator();
|
||||
menu->addSeparator(&st::expandedMenuSeparator);
|
||||
}
|
||||
{
|
||||
auto item = base::make_unique_q<Ui::Menu::MultilineAction>(
|
||||
menu,
|
||||
st::menuWithIcons,
|
||||
st::historyHasCustomEmoji,
|
||||
st::historySponsoredAboutMenuLabelPosition,
|
||||
TextWithEntities{ tr::lng_sponsored_title(tr::now) },
|
||||
&st::menuIconInfo);
|
||||
item->clicks(
|
||||
) | rpl::start_with_next([=] {
|
||||
controller->show(Box(Ui::AboutSponsoredBox));
|
||||
}, item->lifetime());
|
||||
menu->addAction(std::move(item));
|
||||
}
|
||||
menu->addSeparator();
|
||||
menu->addAction(tr::lng_sponsored_hide_ads(tr::now), [=] {
|
||||
Settings::ShowPremium(controller, "no_ads");
|
||||
}, &st::menuIconBlock);
|
||||
}, &st::menuIconCancel);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -2530,6 +2515,21 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
HistoryView::CopyPostLink(controller, itemId, HistoryView::Context::History);
|
||||
}, &st::menuIconLink);
|
||||
}
|
||||
if (item && item->isSponsored()) {
|
||||
_menu->addSeparator(&st::expandedMenuSeparator);
|
||||
auto item = base::make_unique_q<Ui::Menu::MultilineAction>(
|
||||
_menu,
|
||||
st::menuWithIcons,
|
||||
st::historyHasCustomEmoji,
|
||||
st::historySponsoredAboutMenuLabelPosition,
|
||||
TextWithEntities{ tr::lng_sponsored_title(tr::now) },
|
||||
&st::menuIconInfo);
|
||||
item->clicks(
|
||||
) | rpl::start_with_next([=] {
|
||||
controller->show(Box(Ui::AboutSponsoredBox));
|
||||
}, item->lifetime());
|
||||
_menu->addAction(std::move(item));
|
||||
}
|
||||
if (isUponSelected > 1) {
|
||||
if (selectedState.count > 0 && selectedState.count == selectedState.canForwardCount) {
|
||||
_menu->addAction(tr::lng_context_forward_selected(tr::now), [=] {
|
||||
|
|
|
@ -1232,6 +1232,13 @@ msgServiceGiftBoxTitlePadding: margins(0px, 5px, 0px, 2px);
|
|||
msgServiceGiftBoxStickerTop: -19px;
|
||||
msgServiceGiftBoxStickerSize: size(140px, 140px);
|
||||
|
||||
historySponsorInfoItem: FlatLabel(defaultFlatLabel) {
|
||||
style: TextStyle(defaultTextStyle) {
|
||||
font: font(12px);
|
||||
}
|
||||
minWidth: 136px;
|
||||
maxHeight: 40px;
|
||||
}
|
||||
historyHasCustomEmoji: FlatLabel(defaultFlatLabel) {
|
||||
style: TextStyle(defaultTextStyle) {
|
||||
font: font(11px);
|
||||
|
|
|
@ -103,6 +103,7 @@ menuIconPhotoSuggest: icon {{ "menu/photo_suggest", menuIconColor }};
|
|||
menuIconNewWindow: icon {{ "menu/new_window", menuIconColor }};
|
||||
menuIconChatBubble: icon {{ "menu/chat_bubble", menuIconColor }};
|
||||
menuIconPhone: icon {{ "menu/phone", menuIconColor }};
|
||||
menuIconChannel: icon {{ "menu/channel", menuIconColor }};
|
||||
|
||||
menuIconTTLAny: icon {{ "menu/auto_delete_plain", menuIconColor }};
|
||||
menuIconTTLAnyTextPosition: point(11px, 22px);
|
||||
|
|