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

View File

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

View File

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