diff --git a/Telegram/SourceFiles/boxes/autolock_box.cpp b/Telegram/SourceFiles/boxes/autolock_box.cpp index 92ef5046c9..ab30e51c18 100644 --- a/Telegram/SourceFiles/boxes/autolock_box.cpp +++ b/Telegram/SourceFiles/boxes/autolock_box.cpp @@ -44,7 +44,7 @@ void AutoLockBox::prepare() { } group->setChangedCallback([this](int value) { durationChanged(value); }); - setDimensions(st::langsWidth, st::boxOptionListPadding.top() + count * st::langsButton.height + (count - 1) * st::boxOptionListSkip + st::boxOptionListPadding.bottom() + st::boxPadding.bottom()); + setDimensions(st::langsWidth, st::boxOptionListPadding.top() + count * _options.back()->heightNoMargins() + (count - 1) * st::boxOptionListSkip + st::boxOptionListPadding.bottom() + st::boxPadding.bottom()); } void AutoLockBox::durationChanged(int seconds) { diff --git a/Telegram/SourceFiles/boxes/language_box.cpp b/Telegram/SourceFiles/boxes/language_box.cpp index 577fc3444a..7a084ed260 100644 --- a/Telegram/SourceFiles/boxes/language_box.cpp +++ b/Telegram/SourceFiles/boxes/language_box.cpp @@ -131,8 +131,7 @@ void LanguageBox::refresh() { refreshLanguages(); _inner->refresh(); - auto maxHeight = st::boxOptionListPadding.top() + st::langsButton.margin.top() + _languages.size() * (st::langsButton.height + st::boxOptionListSkip) - st::boxOptionListSkip + st::boxOptionListPadding.bottom() + st::langsButton.margin.bottom() + st::boxPadding.bottom(); - setDimensions(st::langsWidth, qMin(maxHeight, st::boxMaxListHeight)); + setDimensions(st::langsWidth, qMin(_inner->height(), st::boxMaxListHeight)); } void LanguageBox::refreshLanguages() { diff --git a/Telegram/SourceFiles/boxes/self_destruction_box.cpp b/Telegram/SourceFiles/boxes/self_destruction_box.cpp index afc0d9d3c2..ebd03b616d 100644 --- a/Telegram/SourceFiles/boxes/self_destruction_box.cpp +++ b/Telegram/SourceFiles/boxes/self_destruction_box.cpp @@ -33,7 +33,7 @@ void SelfDestructionBox::prepare() { auto fake = object_ptr(this, lang(lng_self_destruct_description), Ui::FlatLabel::InitType::Simple, st::boxLabel); auto boxHeight = st::boxOptionListPadding.top() + fake->height() + st::boxMediumSkip - + _ttlValues.size() * (st::langsButton.height + st::boxOptionListSkip) - st::boxOptionListSkip + + _ttlValues.size() * (st::defaultRadio.diameter + st::boxOptionListSkip) - st::boxOptionListSkip + st::boxOptionListPadding.bottom() + st::boxPadding.bottom(); fake.destroy();