mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Fixed boost bubble position on resize container.
This commit is contained in:
parent
ec82d5674f
commit
1c28495162
1 changed files with 11 additions and 0 deletions
|
@ -241,6 +241,17 @@ BubbleWidget::BubbleWidget(
|
|||
) | rpl::start_with_next([=](BubbleRowState state) {
|
||||
animateTo(state);
|
||||
}, lifetime());
|
||||
|
||||
parent->widthValue() | rpl::start_with_next([=](int w) {
|
||||
if (!_appearanceAnimation.animating()) {
|
||||
const auto x = base::SafeRound(
|
||||
w * _state.current().ratio - width() / 2);
|
||||
const auto padding = _spaceForDeflection.width();
|
||||
moveToLeft(
|
||||
std::clamp(int(x), -padding, w - width() + padding),
|
||||
y());
|
||||
}
|
||||
}, lifetime());
|
||||
}, lifetime());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue