mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Removed skip translation setting when it is disabled.
This commit is contained in:
parent
f8a17bd9c9
commit
11165abc09
1 changed files with 13 additions and 1 deletions
|
@ -1118,8 +1118,16 @@ void LanguageBox::prepare() {
|
|||
}, translateEnabled->lifetime());
|
||||
|
||||
const auto label = lifetime().make_state<rpl::event_stream<QLocale>>();
|
||||
const auto translateSkipWrap = topContainer->add(
|
||||
object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
|
||||
topContainer,
|
||||
object_ptr<Ui::VerticalLayout>(topContainer)));
|
||||
translateSkipWrap->toggle(
|
||||
translateEnabled->toggled(),
|
||||
anim::type::normal);
|
||||
translateSkipWrap->toggleOn(translateEnabled->toggledValue());
|
||||
const auto translateSkip = Settings::AddButtonWithLabel(
|
||||
topContainer,
|
||||
translateSkipWrap->entity(),
|
||||
tr::lng_translate_settings_choose(),
|
||||
label->events() | rpl::map(Ui::LanguageName),
|
||||
st::settingsButtonNoIcon);
|
||||
|
@ -1177,6 +1185,10 @@ void LanguageBox::prepare() {
|
|||
accumulate_max(*max, height);
|
||||
setDimensions(st::boxWidth, qMin(*max, st::boxMaxListHeight));
|
||||
}, inner->lifetime());
|
||||
topContainer->heightValue(
|
||||
) | rpl::start_with_next([=](int height) {
|
||||
setInnerTopSkip(height);
|
||||
}, inner->lifetime());
|
||||
|
||||
select->setSubmittedCallback([=](Qt::KeyboardModifiers) {
|
||||
inner->activateBySubmit();
|
||||
|
|
Loading…
Add table
Reference in a new issue