2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow layers with fixed-bottom to stick-to-bottom.

This commit is contained in:
John Preston
2022-05-23 15:45:43 +04:00
parent ff030d0252
commit 62f42eabb0
4 changed files with 2 additions and 21 deletions

View File

@@ -550,17 +550,7 @@ QPointer<Ui::RpWidget> Premium::createPinnedToBottom(
st::premiumPreviewBox.button.textTop,
outer);
}, label->lifetime());
auto padding = st::settingsPremiumButtonPadding;
const auto paddingBottom = padding.bottom();
padding.setBottom(paddingBottom - st::boxRadius);
content->add(std::move(result), padding);
content->add(
object_ptr<Ui::SlideWrap<Ui::FixedHeightWidget>>(
content,
object_ptr<Ui::FixedHeightWidget>(content, st::boxRadius))
)->setDuration(0)->toggleOn(_wrap.value(
) | rpl::map(rpl::mappers::_1 != Info::Wrap::Layer));
content->add(std::move(result), st::settingsPremiumButtonPadding);
return Ui::MakeWeak(not_null<Ui::RpWidget*>{ content });
}