void PhoneWidget::resizeEvent(QResizeEvent *e) { Step::resizeEvent(e); _country->moveToLeft(contentLeft(), contentTop() + st::introStepFieldTop); auto phoneTop = _country->y() + _country->height() + st::introPhoneTop; _code->moveToLeft(contentLeft(), phoneTop); _phone->moveToLeft(contentLeft() + _country->width() - st::introPhone.width, phoneTop); updateSignupGeometry(); }
void PhoneWidget::showSignup() { showPhoneError(langFactory(lng_bad_phone_noreg)); if (!_signup) { auto signupText = lng_phone_notreg(lt_link_start, textcmdStartLink(1), lt_link_end, textcmdStopLink(), lt_signup_start, textcmdStartLink(2), lt_signup_end, textcmdStopLink()); auto inner = object_ptr<Ui::FlatLabel>(this, signupText, Ui::FlatLabel::InitType::Rich, st::introDescription); _signup.create(this, std::move(inner)); _signup->entity()->setLink(1, std::make_shared<UrlClickHandler>(qsl("https://telegram.org"), false)); _signup->entity()->setLink(2, std::make_shared<LambdaClickHandler>([this] { toSignUp(); })); _signup->hide(anim::type::instant); updateSignupGeometry(); } _signup->show(anim::type::normal); hideDescription(); }