Fix voice recording indicator.

This commit is contained in:
John Preston 2023-07-21 12:58:36 +04:00
parent b7370127ff
commit 315b95a214
1 changed files with 5 additions and 2 deletions

View File

@ -1352,8 +1352,11 @@ void VoiceRecordBar::initLevelGeometry() {
_send->geometryValue(),
geometryValue(),
static_cast<Ui::RpWidget*>(parentWidget())->geometryValue()
) | rpl::start_with_next([=](QRect send, QRect me, QRect parent) {
const auto mapped = Ui::MapFrom(_outerContainer, this, send);
) | rpl::start_with_next([=](QRect send, auto, auto) {
const auto mapped = Ui::MapFrom(
_outerContainer,
_send->parentWidget(),
send);
const auto center = (send.width() - _level->width()) / 2;
_level->moveToLeft(mapped.x() + center, mapped.y() + center);
}, lifetime());