mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-25 08:44:38 +00:00
parent
56cb5ac9c6
commit
7b4393ba48
@ -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) {
|
||||
|
@ -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() {
|
||||
|
@ -33,7 +33,7 @@ void SelfDestructionBox::prepare() {
|
||||
auto fake = object_ptr<Ui::FlatLabel>(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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user