mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 03:50:43 +00:00
Removed LanguageBox::createMultiSelect method.
This commit is contained in:
parent
32cebc0d9b
commit
b72fce4894
@ -1095,7 +1095,14 @@ void LanguageBox::prepare() {
|
|||||||
|
|
||||||
setTitle(tr::lng_languages());
|
setTitle(tr::lng_languages());
|
||||||
|
|
||||||
const auto select = createMultiSelect();
|
const auto topContainer = Ui::CreateChild<Ui::VerticalLayout>(this);
|
||||||
|
|
||||||
|
const auto select = topContainer->add(
|
||||||
|
object_ptr<Ui::MultiSelect>(
|
||||||
|
topContainer,
|
||||||
|
st::defaultMultiSelect,
|
||||||
|
tr::lng_participant_filter()));
|
||||||
|
topContainer->resizeToWidth(st::boxWidth);
|
||||||
|
|
||||||
using namespace rpl::mappers;
|
using namespace rpl::mappers;
|
||||||
|
|
||||||
@ -1103,13 +1110,13 @@ void LanguageBox::prepare() {
|
|||||||
const auto inner = setInnerWidget(
|
const auto inner = setInnerWidget(
|
||||||
object_ptr<Content>(this, recent, official),
|
object_ptr<Content>(this, recent, official),
|
||||||
st::boxScroll,
|
st::boxScroll,
|
||||||
select->height());
|
topContainer->height());
|
||||||
inner->resizeToWidth(st::boxWidth);
|
inner->resizeToWidth(st::boxWidth);
|
||||||
|
|
||||||
const auto max = lifetime().make_state<int>(0);
|
const auto max = lifetime().make_state<int>(0);
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
inner->heightValue(),
|
inner->heightValue(),
|
||||||
select->heightValue(),
|
topContainer->heightValue(),
|
||||||
_1 + _2
|
_1 + _2
|
||||||
) | rpl::start_with_next([=](int height) {
|
) | rpl::start_with_next([=](int height) {
|
||||||
accumulate_max(*max, height);
|
accumulate_max(*max, height);
|
||||||
@ -1180,16 +1187,6 @@ void LanguageBox::setInnerFocus() {
|
|||||||
_setInnerFocus();
|
_setInnerFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
not_null<Ui::MultiSelect*> LanguageBox::createMultiSelect() {
|
|
||||||
const auto result = Ui::CreateChild<Ui::MultiSelect>(
|
|
||||||
this,
|
|
||||||
st::defaultMultiSelect,
|
|
||||||
tr::lng_participant_filter());
|
|
||||||
result->resizeToWidth(st::boxWidth);
|
|
||||||
result->moveToLeft(0, 0);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
base::binary_guard LanguageBox::Show() {
|
base::binary_guard LanguageBox::Show() {
|
||||||
auto result = base::binary_guard();
|
auto result = base::binary_guard();
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
using Languages = Lang::CloudManager::Languages;
|
using Languages = Lang::CloudManager::Languages;
|
||||||
|
|
||||||
not_null<Ui::MultiSelect*> createMultiSelect();
|
|
||||||
int rowsInPage() const;
|
int rowsInPage() const;
|
||||||
|
|
||||||
Fn<void()> _setInnerFocus;
|
Fn<void()> _setInnerFocus;
|
||||||
|
Loading…
Reference in New Issue
Block a user