From 32cebc0d9b2207854a3328d3b815007fc9e61881 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 16 Nov 2022 12:42:47 +0300 Subject: [PATCH] Fixed position of show more button in translate box. --- Telegram/SourceFiles/boxes/translate_box.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/boxes/translate_box.cpp b/Telegram/SourceFiles/boxes/translate_box.cpp index 1b5555358..c011cfdb4 100644 --- a/Telegram/SourceFiles/boxes/translate_box.cpp +++ b/Telegram/SourceFiles/boxes/translate_box.cpp @@ -173,10 +173,12 @@ void TranslateBox( container.get(), object_ptr(container)); show->hide(anim::type::instant); - original->geometryValue( - ) | rpl::start_with_next([=](const QRect &rect) { + rpl::combine( + container->widthValue(), + original->geometryValue() + ) | rpl::start_with_next([=](int width, const QRect &rect) { show->moveToLeft( - rect.x() + rect.width() - show->width(), + width - show->width() - st::boxRowPadding.right(), rect.y() + std::abs(lineHeight - show->height()) / 2); }, show->lifetime()); original->entity()->heightValue(