mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Put "View" in the middle of the toast.
This commit is contained in:
parent
1d64a03804
commit
a480fc9d7c
1 changed files with 8 additions and 3 deletions
|
@ -84,9 +84,14 @@ void StickerToast::showFor(not_null<DocumentData*> document) {
|
||||||
st::historyPremiumViewSet);
|
st::historyPremiumViewSet);
|
||||||
button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
|
button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
|
||||||
button->show();
|
button->show();
|
||||||
widget->widthValue(
|
rpl::combine(
|
||||||
) | rpl::start_with_next([=](int width) {
|
widget->sizeValue(),
|
||||||
button->moveToRight(0, 0, width);
|
button->sizeValue()
|
||||||
|
) | rpl::start_with_next([=](QSize outer, QSize inner) {
|
||||||
|
button->moveToRight(
|
||||||
|
0,
|
||||||
|
(outer.height() - inner.height()) / 2,
|
||||||
|
outer.width());
|
||||||
}, widget->lifetime());
|
}, widget->lifetime());
|
||||||
const auto preview = Ui::CreateChild<Ui::RpWidget>(widget.get());
|
const auto preview = Ui::CreateChild<Ui::RpWidget>(widget.get());
|
||||||
preview->moveToLeft(skip, skip);
|
preview->moveToLeft(skip, skip);
|
||||||
|
|
Loading…
Add table
Reference in a new issue