2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-06 09:35:12 +00:00

Cross-fade login QR.

This commit is contained in:
John Preston
2019-11-26 17:27:09 +03:00
parent f4bf79b067
commit a0152557ec
11 changed files with 78 additions and 41 deletions

View File

@@ -179,11 +179,14 @@ void Step::updateLabelsPosition() {
}
Ui::SendPendingMoveResizeEvents(_error->entity());
auto errorLeft = _errorCentered ? 0 : (contentLeft() + st::buttonRadius);
auto errorTop = contentTop() + (_errorBelowLink ? st::introErrorBelowLinkTop : st::introErrorTop);
_error->moveToLeft(errorLeft, errorTop);
_error->moveToLeft(errorLeft, errorTop());
}
}
int Step::errorTop() const {
return contentTop() + st::introErrorTop;
}
void Step::setTitleText(rpl::producer<QString> titleText) {
_titleText = std::move(titleText);
}
@@ -364,13 +367,6 @@ void Step::setErrorCentered(bool centered) {
_error.destroy();
}
void Step::setErrorBelowLink(bool below) {
_errorBelowLink = below;
if (_error) {
updateLabelsPosition();
}
}
void Step::showError(rpl::producer<QString> text) {
_errorText = std::move(text);
}