Add a footer to EditLinkedChatBox.

This commit is contained in:
John Preston 2019-05-24 13:48:50 +02:00
parent 4e10552c12
commit 0a86e732cd
2 changed files with 16 additions and 1 deletions

View file

@ -976,4 +976,4 @@ urlAuthCheckbox: Checkbox(defaultBoxCheckbox) {
} }
linkedChatAbout: membersAbout; linkedChatAbout: membersAbout;
linkedChatAboutPadding: margins(12px, 20px, 12px, 20px); linkedChatAboutPadding: margins(20px, 20px, 20px, 20px);

View file

@ -158,6 +158,18 @@ object_ptr<Ui::RpWidget> SetupAbout(
return std::move(about); return std::move(about);
} }
object_ptr<Ui::RpWidget> SetupFooter(
not_null<QWidget*> parent,
not_null<ChannelData*> channel) {
return object_ptr<Ui::FlatLabel>(
parent,
lang(channel->isBroadcast()
? lng_manage_discussion_group_posted
: lng_manage_linked_channel_posted),
Ui::FlatLabel::InitType::Simple,
st::linkedChatAbout);
}
object_ptr<Ui::RpWidget> SetupCreateGroup( object_ptr<Ui::RpWidget> SetupCreateGroup(
not_null<QWidget*> parent, not_null<QWidget*> parent,
not_null<ChannelData*> channel, not_null<ChannelData*> channel,
@ -237,6 +249,9 @@ object_ptr<Ui::RpWidget> EditLinkedChatBox::setupContent(
if (chat) { if (chat) {
result->add(SetupUnlink(result, channel, callback)); result->add(SetupUnlink(result, channel, callback));
} }
result->add(
SetupFooter(result, channel),
st::linkedChatAboutPadding);
return result; return result;
} }