mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Fixed top of ttl button in voice record bar with float media player.
This commit is contained in:
parent
a670095294
commit
5561bdeb5e
1 changed files with 3 additions and 4 deletions
|
@ -1295,6 +1295,7 @@ void VoiceRecordBar::updateTTLGeometry(
|
|||
const auto parent = parentWidget();
|
||||
const auto me = Ui::MapFrom(_outerContainer, parent, geometry());
|
||||
const auto anyTop = me.y() - st::historyRecordLockPosition.y();
|
||||
const auto ttlFrom = anyTop - _ttlButton->height() * 2;
|
||||
if (type == TTLAnimationType::RightLeft) {
|
||||
const auto finalRight = _outerContainer->width()
|
||||
- rect::right(me)
|
||||
|
@ -1302,7 +1303,7 @@ void VoiceRecordBar::updateTTLGeometry(
|
|||
|
||||
const auto from = -_ttlButton->width();
|
||||
const auto right = anim::interpolate(from, finalRight, progress);
|
||||
_ttlButton->moveToRight(right, _ttlButton->y());
|
||||
_ttlButton->moveToRight(right, ttlFrom);
|
||||
#if 0
|
||||
} else if (type == TTLAnimationType::TopBottom) {
|
||||
const auto ttlFrom = anyTop - _ttlButton->height() * 2;
|
||||
|
@ -1312,9 +1313,7 @@ void VoiceRecordBar::updateTTLGeometry(
|
|||
anim::interpolate(ttlFrom, ttlTo, 1. - progress));
|
||||
#endif
|
||||
} else if (type == TTLAnimationType::RightTopStatic) {
|
||||
_ttlButton->moveToRight(
|
||||
-_ttlButton->width(),
|
||||
anyTop - _ttlButton->height() * 2);
|
||||
_ttlButton->moveToRight(-_ttlButton->width(), ttlFrom);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue