Moved boost limits content to divider.
This commit is contained in:
parent
f61c22b065
commit
d3aa0664a7
|
@ -194,21 +194,28 @@ InnerWidget::InnerWidget(
|
|||
const auto status = api->boostStatus();
|
||||
const auto inner = this;
|
||||
|
||||
Ui::FillBoostLimit(
|
||||
fakeShowed->events(),
|
||||
rpl::single(status.overview.isBoosted),
|
||||
inner,
|
||||
Ui::BoostBoxData{
|
||||
.boost = Ui::BoostCounters{
|
||||
.level = status.overview.level,
|
||||
.boosts = status.overview.boostCount,
|
||||
.thisLevelBoosts
|
||||
= status.overview.currentLevelBoostCount,
|
||||
.nextLevelBoosts
|
||||
= status.overview.nextLevelBoostCount,
|
||||
.mine = status.overview.isBoosted,
|
||||
}
|
||||
});
|
||||
{
|
||||
auto dividerContent = object_ptr<Ui::VerticalLayout>(inner);
|
||||
Ui::FillBoostLimit(
|
||||
fakeShowed->events(),
|
||||
rpl::single(status.overview.isBoosted),
|
||||
dividerContent.data(),
|
||||
Ui::BoostBoxData{
|
||||
.boost = Ui::BoostCounters{
|
||||
.level = status.overview.level,
|
||||
.boosts = status.overview.boostCount,
|
||||
.thisLevelBoosts
|
||||
= status.overview.currentLevelBoostCount,
|
||||
.nextLevelBoosts
|
||||
= status.overview.nextLevelBoostCount,
|
||||
.mine = status.overview.isBoosted,
|
||||
}
|
||||
});
|
||||
inner->add(object_ptr<Ui::DividerLabel>(
|
||||
inner,
|
||||
std::move(dividerContent),
|
||||
st::statisticsLimitsDividerPadding));
|
||||
}
|
||||
|
||||
FillOverview(inner, status);
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ statisticsShowMoreButton: SettingsButton(defaultSettingsButton) {
|
|||
statisticsShowMoreButtonArrowPosition: point(29px, 13px);
|
||||
statisticsShowMoreButtonArrowSize: 7px;
|
||||
|
||||
statisticsLimitsDividerPadding: margins(22px, -26px, 22px, 16px);
|
||||
boostsButton: SettingsButton(defaultSettingsButton) {
|
||||
textFg: lightButtonFg;
|
||||
textFgOver: lightButtonFgOver;
|
||||
|
|
|
@ -191,6 +191,7 @@ premiumGiftBox: Box(premiumPreviewBox) {
|
|||
boostSkipTop: 37px;
|
||||
boostLimits: PremiumLimits(defaultPremiumLimits) {
|
||||
gradientFromLeft: true;
|
||||
nonPremiumBg: windowBgRipple;
|
||||
}
|
||||
boostBubble: PremiumBubble(defaultPremiumBubble) {
|
||||
height: 32px;
|
||||
|
|
|
@ -737,10 +737,12 @@ Line::Line(
|
|||
_ratio = ratio;
|
||||
}, lifetime());
|
||||
|
||||
sizeValue(
|
||||
) | rpl::filter([](QSize size) {
|
||||
return !size.isEmpty();
|
||||
}) | rpl::start_with_next([=](QSize size) {
|
||||
rpl::combine(
|
||||
sizeValue(),
|
||||
parent->widthValue()
|
||||
) | rpl::filter([](const QSize &size, int parentWidth) {
|
||||
return !size.isEmpty() && parentWidth;
|
||||
}) | rpl::start_with_next([=](const QSize &size, int) {
|
||||
recache(size);
|
||||
update();
|
||||
}, lifetime());
|
||||
|
|
Loading…
Reference in New Issue