mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Show "No languages found." label.
This commit is contained in:
parent
5ad2900c9c
commit
cfa60df134
1 changed files with 24 additions and 0 deletions
|
@ -907,6 +907,30 @@ void Content::setupContent(
|
|||
content,
|
||||
object_ptr<Ui::BoxContentDivider>(content)));
|
||||
const auto other = add(official, true);
|
||||
const auto empty = content->add(
|
||||
object_ptr<Ui::SlideWrap<Ui::FixedHeightWidget>>(
|
||||
content,
|
||||
object_ptr<Ui::FixedHeightWidget>(
|
||||
content,
|
||||
st::membersAbout.style.font->height * 9)));
|
||||
const auto label = Ui::CreateChild<Ui::FlatLabel>(
|
||||
empty->entity(),
|
||||
tr::lng_languages_none(),
|
||||
st::membersAbout);
|
||||
empty->entity()->sizeValue(
|
||||
) | rpl::start_with_next([=](QSize size) {
|
||||
label->move(
|
||||
(size.width() - label->width()) / 2,
|
||||
(size.height() - label->height()) / 2);
|
||||
}, label->lifetime());
|
||||
|
||||
empty->toggleOn(
|
||||
rpl::combine(
|
||||
main ? main->isEmpty() : rpl::single(true),
|
||||
other ? other->isEmpty() : rpl::single(true),
|
||||
_1 && _2),
|
||||
anim::type::instant);
|
||||
|
||||
Ui::ResizeFitChild(this, content);
|
||||
|
||||
if (main && other) {
|
||||
|
|
Loading…
Add table
Reference in a new issue