Unified element sizes in all cloud password sections.

This commit is contained in:
23rd 2022-05-12 02:27:46 +03:00
parent 6e8fb2ec06
commit 910d0a7e47
3 changed files with 10 additions and 6 deletions

View file

@ -131,9 +131,8 @@ void SetupHeader(
) | rpl::start_with_next([animate = std::move(icon.animate)] { ) | rpl::start_with_next([animate = std::move(icon.animate)] {
animate(anim::repeat::once); animate(anim::repeat::once);
}, content->lifetime()); }, content->lifetime());
AddSkip(content);
} }
AddSkip(content);
content->add( content->add(
object_ptr<Ui::CenterWrap<>>( object_ptr<Ui::CenterWrap<>>(
@ -146,11 +145,14 @@ void SetupHeader(
{ {
const auto &st = st::settingLocalPasscodeDescription; const auto &st = st::settingLocalPasscodeDescription;
content->add( const auto wrap = content->add(
object_ptr<Ui::CenterWrap<>>( object_ptr<Ui::CenterWrap<>>(
content, content,
object_ptr<Ui::FlatLabel>(content, std::move(about), st)), object_ptr<Ui::FlatLabel>(content, std::move(about), st)),
st::changePhoneDescriptionPadding); st::changePhoneDescriptionPadding);
wrap->resize(
wrap->width(),
st::settingLocalPasscodeDescriptionHeight);
} }
} }
@ -254,7 +256,8 @@ void AddSkipInsteadOfError(not_null<Ui::VerticalLayout*> content) {
content, content,
tr::lng_language_name(tr::now), tr::lng_language_name(tr::now),
st::settingLocalPasscodeError); st::settingLocalPasscodeError);
AddSkip(content, dummy->height()); const auto &padding = st::changePhoneDescriptionPadding;
AddSkip(content, dummy->height() + padding.top() + padding.bottom());
dummy = nullptr; dummy = nullptr;
} }

View file

@ -167,8 +167,8 @@ void Input::setupContent() {
{ {
.name = u"cloud_password/password_input"_q, .name = u"cloud_password/password_input"_q,
.sizeOverride = { .sizeOverride = {
st::changePhoneIconSize, st::settingsCloudPasswordIconSize,
st::changePhoneIconSize st::settingsCloudPasswordIconSize
}, },
}, },
st::settingLocalPasscodeIconPadding); st::settingLocalPasscodeIconPadding);

View file

@ -149,6 +149,7 @@ settingLocalPasscodeInputField: InputField(defaultInputField) {
settingLocalPasscodeDescription: FlatLabel(changePhoneDescription) { settingLocalPasscodeDescription: FlatLabel(changePhoneDescription) {
minWidth: 256px; minWidth: 256px;
} }
settingLocalPasscodeDescriptionHeight: 52px;
settingLocalPasscodeError: FlatLabel(changePhoneError) { settingLocalPasscodeError: FlatLabel(changePhoneError) {
minWidth: 256px; minWidth: 256px;
} }