mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Moved boost limits content to divider.
This commit is contained in:
parent
f61c22b065
commit
d3aa0664a7
4 changed files with 30 additions and 19 deletions
|
@ -194,10 +194,12 @@ InnerWidget::InnerWidget(
|
||||||
const auto status = api->boostStatus();
|
const auto status = api->boostStatus();
|
||||||
const auto inner = this;
|
const auto inner = this;
|
||||||
|
|
||||||
|
{
|
||||||
|
auto dividerContent = object_ptr<Ui::VerticalLayout>(inner);
|
||||||
Ui::FillBoostLimit(
|
Ui::FillBoostLimit(
|
||||||
fakeShowed->events(),
|
fakeShowed->events(),
|
||||||
rpl::single(status.overview.isBoosted),
|
rpl::single(status.overview.isBoosted),
|
||||||
inner,
|
dividerContent.data(),
|
||||||
Ui::BoostBoxData{
|
Ui::BoostBoxData{
|
||||||
.boost = Ui::BoostCounters{
|
.boost = Ui::BoostCounters{
|
||||||
.level = status.overview.level,
|
.level = status.overview.level,
|
||||||
|
@ -209,6 +211,11 @@ InnerWidget::InnerWidget(
|
||||||
.mine = status.overview.isBoosted,
|
.mine = status.overview.isBoosted,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
inner->add(object_ptr<Ui::DividerLabel>(
|
||||||
|
inner,
|
||||||
|
std::move(dividerContent),
|
||||||
|
st::statisticsLimitsDividerPadding));
|
||||||
|
}
|
||||||
|
|
||||||
FillOverview(inner, status);
|
FillOverview(inner, status);
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,7 @@ statisticsShowMoreButton: SettingsButton(defaultSettingsButton) {
|
||||||
statisticsShowMoreButtonArrowPosition: point(29px, 13px);
|
statisticsShowMoreButtonArrowPosition: point(29px, 13px);
|
||||||
statisticsShowMoreButtonArrowSize: 7px;
|
statisticsShowMoreButtonArrowSize: 7px;
|
||||||
|
|
||||||
|
statisticsLimitsDividerPadding: margins(22px, -26px, 22px, 16px);
|
||||||
boostsButton: SettingsButton(defaultSettingsButton) {
|
boostsButton: SettingsButton(defaultSettingsButton) {
|
||||||
textFg: lightButtonFg;
|
textFg: lightButtonFg;
|
||||||
textFgOver: lightButtonFgOver;
|
textFgOver: lightButtonFgOver;
|
||||||
|
|
|
@ -191,6 +191,7 @@ premiumGiftBox: Box(premiumPreviewBox) {
|
||||||
boostSkipTop: 37px;
|
boostSkipTop: 37px;
|
||||||
boostLimits: PremiumLimits(defaultPremiumLimits) {
|
boostLimits: PremiumLimits(defaultPremiumLimits) {
|
||||||
gradientFromLeft: true;
|
gradientFromLeft: true;
|
||||||
|
nonPremiumBg: windowBgRipple;
|
||||||
}
|
}
|
||||||
boostBubble: PremiumBubble(defaultPremiumBubble) {
|
boostBubble: PremiumBubble(defaultPremiumBubble) {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
|
|
@ -737,10 +737,12 @@ Line::Line(
|
||||||
_ratio = ratio;
|
_ratio = ratio;
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
sizeValue(
|
rpl::combine(
|
||||||
) | rpl::filter([](QSize size) {
|
sizeValue(),
|
||||||
return !size.isEmpty();
|
parent->widthValue()
|
||||||
}) | rpl::start_with_next([=](QSize size) {
|
) | rpl::filter([](const QSize &size, int parentWidth) {
|
||||||
|
return !size.isEmpty() && parentWidth;
|
||||||
|
}) | rpl::start_with_next([=](const QSize &size, int) {
|
||||||
recache(size);
|
recache(size);
|
||||||
update();
|
update();
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
Loading…
Add table
Reference in a new issue