mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 parent = parentWidget();
|
||||||
const auto me = Ui::MapFrom(_outerContainer, parent, geometry());
|
const auto me = Ui::MapFrom(_outerContainer, parent, geometry());
|
||||||
const auto anyTop = me.y() - st::historyRecordLockPosition.y();
|
const auto anyTop = me.y() - st::historyRecordLockPosition.y();
|
||||||
|
const auto ttlFrom = anyTop - _ttlButton->height() * 2;
|
||||||
if (type == TTLAnimationType::RightLeft) {
|
if (type == TTLAnimationType::RightLeft) {
|
||||||
const auto finalRight = _outerContainer->width()
|
const auto finalRight = _outerContainer->width()
|
||||||
- rect::right(me)
|
- rect::right(me)
|
||||||
|
@ -1302,7 +1303,7 @@ void VoiceRecordBar::updateTTLGeometry(
|
||||||
|
|
||||||
const auto from = -_ttlButton->width();
|
const auto from = -_ttlButton->width();
|
||||||
const auto right = anim::interpolate(from, finalRight, progress);
|
const auto right = anim::interpolate(from, finalRight, progress);
|
||||||
_ttlButton->moveToRight(right, _ttlButton->y());
|
_ttlButton->moveToRight(right, ttlFrom);
|
||||||
#if 0
|
#if 0
|
||||||
} else if (type == TTLAnimationType::TopBottom) {
|
} else if (type == TTLAnimationType::TopBottom) {
|
||||||
const auto ttlFrom = anyTop - _ttlButton->height() * 2;
|
const auto ttlFrom = anyTop - _ttlButton->height() * 2;
|
||||||
|
@ -1312,9 +1313,7 @@ void VoiceRecordBar::updateTTLGeometry(
|
||||||
anim::interpolate(ttlFrom, ttlTo, 1. - progress));
|
anim::interpolate(ttlFrom, ttlTo, 1. - progress));
|
||||||
#endif
|
#endif
|
||||||
} else if (type == TTLAnimationType::RightTopStatic) {
|
} else if (type == TTLAnimationType::RightTopStatic) {
|
||||||
_ttlButton->moveToRight(
|
_ttlButton->moveToRight(-_ttlButton->width(), ttlFrom);
|
||||||
-_ttlButton->width(),
|
|
||||||
anyTop - _ttlButton->height() * 2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue