mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Slightly improved style of channel earn info section.
This commit is contained in:
parent
bb438880e3
commit
2795af8c7f
2 changed files with 16 additions and 9 deletions
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
using "ui/basic.style";
|
||||
using "boxes/boxes.style";
|
||||
using "statistics/statistics.style";
|
||||
|
||||
channelEarnLearnArrowMargins: margins(-2px, 5px, 0px, 0px);
|
||||
|
||||
|
@ -34,6 +35,10 @@ channelEarnSemiboldLabel: FlatLabel(channelEarnOverviewMajorLabel) {
|
|||
style: TextStyle(semiboldTextStyle) {
|
||||
}
|
||||
}
|
||||
channelEarnHeaderLabel: FlatLabel(channelEarnOverviewMajorLabel) {
|
||||
style: TextStyle(statisticsHeaderTitleTextStyle) {
|
||||
}
|
||||
}
|
||||
channelEarnHistorySubLabel: FlatLabel(channelEarnOverviewSubMinorLabel) {
|
||||
style: TextStyle(defaultTextStyle) {
|
||||
font: font(12px);
|
||||
|
|
|
@ -124,7 +124,7 @@ void AddHeader(
|
|||
object_ptr<Ui::FlatLabel>(
|
||||
content,
|
||||
text(),
|
||||
st::channelEarnSemiboldLabel),
|
||||
st::channelEarnHeaderLabel),
|
||||
st::boxRowPadding);
|
||||
header->resizeToWidth(header->width());
|
||||
}
|
||||
|
@ -515,11 +515,13 @@ void InnerWidget::fill() {
|
|||
widget->setChartData(chart, Type::StackBar);
|
||||
widget->setTitle(tr::lng_channel_earn_chart_revenue());
|
||||
}
|
||||
}
|
||||
if (data.topHoursGraph.chart || data.revenueGraph.chart) {
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddDivider(container);
|
||||
Ui::AddSkip(container);
|
||||
}
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddDivider(container);
|
||||
Ui::AddSkip(container);
|
||||
{
|
||||
AddHeader(container, tr::lng_channel_earn_overview_title);
|
||||
Ui::AddSkip(container, st::channelEarnOverviewTitleSkip);
|
||||
|
@ -540,7 +542,7 @@ void InnerWidget::fill() {
|
|||
st::channelEarnOverviewMinorLabel);
|
||||
const auto secondMinorLabel = Ui::CreateChild<Ui::FlatLabel>(
|
||||
line,
|
||||
ToUsd(value, multiplier),
|
||||
value ? ToUsd(value, multiplier) : QString(),
|
||||
st::channelEarnOverviewSubMinorLabel);
|
||||
rpl::combine(
|
||||
line->widthValue(),
|
||||
|
@ -688,7 +690,7 @@ void InnerWidget::fill() {
|
|||
: tr::lng_channel_earn_balance_about_temp);
|
||||
Ui::AddSkip(container);
|
||||
}
|
||||
{
|
||||
if (!data.firstHistorySlice.list.empty()) {
|
||||
AddHeader(container, tr::lng_channel_earn_history_title);
|
||||
Ui::AddSkip(container);
|
||||
|
||||
|
@ -995,10 +997,10 @@ void InnerWidget::fill() {
|
|||
}
|
||||
});
|
||||
}
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddDivider(container);
|
||||
Ui::AddSkip(container);
|
||||
}
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddDivider(container);
|
||||
Ui::AddSkip(container);
|
||||
if (channel) {
|
||||
constexpr auto kMaxCPM = 50; // Debug.
|
||||
const auto requiredLevel = Data::LevelLimits(session)
|
||||
|
|
Loading…
Add table
Reference in a new issue