Slightly improved style of learn more box in channel earn info section.
BIN
Telegram/Resources/icons/sponsored/channel.png
Normal file
After Width: | Height: | Size: 642 B |
BIN
Telegram/Resources/icons/sponsored/channel@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Telegram/Resources/icons/sponsored/channel@3x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/sponsored/large_earn.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/sponsored/large_earn@2x.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
Telegram/Resources/icons/sponsored/large_earn@3x.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
Telegram/Resources/icons/sponsored/withdrawals.png
Normal file
After Width: | Height: | Size: 680 B |
BIN
Telegram/Resources/icons/sponsored/withdrawals@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/sponsored/withdrawals@3x.png
Normal file
After Width: | Height: | Size: 2 KiB |
|
@ -113,3 +113,7 @@ sponsoredAboutTitleIcon: icon {{ "sponsored/large_about", activeButtonFg }};
|
|||
sponsoredAboutPrivacyIcon: icon {{ "sponsored/privacy_about", boxTextFg }};
|
||||
sponsoredAboutRemoveIcon: icon {{ "sponsored/remove_about", boxTextFg }};
|
||||
sponsoredAboutSplitIcon: icon {{ "sponsored/revenue_split", boxTextFg }};
|
||||
|
||||
channelEarnLearnTitleIcon: icon {{ "sponsored/large_earn", activeButtonFg }};
|
||||
channelEarnLearnChannelIcon: icon {{ "sponsored/channel", boxTextFg }};
|
||||
channelEarnLearnWithdrawalsIcon: icon {{ "sponsored/withdrawals", boxTextFg }};
|
||||
|
|
|
@ -226,33 +226,6 @@ void InnerWidget::fill() {
|
|||
makeContext(label));
|
||||
};
|
||||
|
||||
{
|
||||
using Type = Statistic::ChartViewType;
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddSkip(container);
|
||||
if (data.topHoursGraph.chart) {
|
||||
const auto widget = container->add(
|
||||
object_ptr<Statistic::ChartWidget>(container),
|
||||
st::statisticsLayerMargins);
|
||||
|
||||
widget->setChartData(data.topHoursGraph.chart, Type::Linear);
|
||||
widget->setTitle(tr::lng_channel_earn_chart_top_hours());
|
||||
}
|
||||
if (data.revenueGraph.chart) {
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddDivider(container);
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddSkip(container);
|
||||
const auto widget = container->add(
|
||||
object_ptr<Statistic::ChartWidget>(container),
|
||||
st::statisticsLayerMargins);
|
||||
|
||||
widget->setChartData(data.revenueGraph.chart, Type::StackBar);
|
||||
widget->setTitle(tr::lng_channel_earn_chart_revenue());
|
||||
}
|
||||
Ui::AddSkip(container);
|
||||
}
|
||||
|
||||
const auto arrow = Ui::Text::SingleCustomEmoji(
|
||||
session->data().customEmojiManager().registerInternalEmoji(
|
||||
st::topicButtonArrow,
|
||||
|
@ -285,6 +258,26 @@ void InnerWidget::fill() {
|
|||
Ui::AddSkip(content);
|
||||
Ui::AddSkip(content);
|
||||
Ui::AddSkip(content);
|
||||
{
|
||||
const auto &icon = st::channelEarnLearnTitleIcon;
|
||||
const auto rect = Rect(icon.size() * 1.4);
|
||||
auto owned = object_ptr<Ui::RpWidget>(content);
|
||||
owned->resize(rect.size());
|
||||
const auto widget = box->addRow(
|
||||
object_ptr<Ui::CenterWrap<>>(
|
||||
content,
|
||||
std::move(owned)))->entity();
|
||||
widget->paintRequest(
|
||||
) | rpl::start_with_next([=] {
|
||||
auto p = Painter(widget);
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(st::activeButtonBg);
|
||||
p.drawEllipse(rect);
|
||||
icon.paintInCenter(p, rect);
|
||||
}, widget->lifetime());
|
||||
}
|
||||
Ui::AddSkip(content);
|
||||
Ui::AddSkip(content);
|
||||
box->addRow(object_ptr<Ui::CenterWrap<>>(
|
||||
content,
|
||||
object_ptr<Ui::FlatLabel>(
|
||||
|
@ -336,19 +329,19 @@ void InnerWidget::fill() {
|
|||
addEntry(
|
||||
tr::lng_channel_earn_learn_in_subtitle(),
|
||||
tr::lng_channel_earn_learn_in_about(),
|
||||
st::getBoostsButtonIcon);
|
||||
st::channelEarnLearnChannelIcon);
|
||||
Ui::AddSkip(content);
|
||||
Ui::AddSkip(content);
|
||||
addEntry(
|
||||
tr::lng_channel_earn_learn_split_subtitle(),
|
||||
tr::lng_channel_earn_learn_split_about(),
|
||||
st::getBoostsButtonIcon);
|
||||
st::sponsoredAboutSplitIcon);
|
||||
Ui::AddSkip(content);
|
||||
Ui::AddSkip(content);
|
||||
addEntry(
|
||||
tr::lng_channel_earn_learn_out_subtitle(),
|
||||
tr::lng_channel_earn_learn_out_about(),
|
||||
st::getBoostsButtonIcon);
|
||||
st::channelEarnLearnWithdrawalsIcon);
|
||||
Ui::AddSkip(content);
|
||||
Ui::AddSkip(content);
|
||||
}
|
||||
|
@ -428,6 +421,34 @@ void InnerWidget::fill() {
|
|||
RectPart::Top | RectPart::Bottom));
|
||||
};
|
||||
addAboutWithLearn(tr::lng_channel_earn_about);
|
||||
{
|
||||
using Type = Statistic::ChartViewType;
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddSkip(container);
|
||||
if (data.topHoursGraph.chart) {
|
||||
const auto widget = container->add(
|
||||
object_ptr<Statistic::ChartWidget>(container),
|
||||
st::statisticsLayerMargins);
|
||||
|
||||
widget->setChartData(data.topHoursGraph.chart, Type::Linear);
|
||||
widget->setTitle(tr::lng_channel_earn_chart_top_hours());
|
||||
}
|
||||
if (data.revenueGraph.chart) {
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddDivider(container);
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddSkip(container);
|
||||
const auto widget = container->add(
|
||||
object_ptr<Statistic::ChartWidget>(container),
|
||||
st::statisticsLayerMargins);
|
||||
|
||||
widget->setChartData(data.revenueGraph.chart, Type::StackBar);
|
||||
widget->setTitle(tr::lng_channel_earn_chart_revenue());
|
||||
}
|
||||
Ui::AddSkip(container);
|
||||
}
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddDivider(container);
|
||||
Ui::AddSkip(container);
|
||||
{
|
||||
AddHeader(container, tr::lng_channel_earn_overview_title);
|
||||
|
|