diff --git a/Telegram/Resources/icons/settings_set_photo.png b/Telegram/Resources/icons/settings_set_photo.png deleted file mode 100644 index e350c5c364..0000000000 Binary files a/Telegram/Resources/icons/settings_set_photo.png and /dev/null differ diff --git a/Telegram/Resources/icons/settings_set_photo@2x.png b/Telegram/Resources/icons/settings_set_photo@2x.png deleted file mode 100644 index da5023ae69..0000000000 Binary files a/Telegram/Resources/icons/settings_set_photo@2x.png and /dev/null differ diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 4a47a022b0..5c42a506c0 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -267,7 +267,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_bio_placeholder" = "Bio"; "lng_bio_about" = "You can add a few lines about yourself. Anyone who opens your profile will see this text."; -"lng_settings_section_info" = "Info"; +"lng_settings_section_info" = "My info"; "lng_settings_username" = "Username:"; "lng_settings_choose_username" = "Choose username"; "lng_settings_empty_bio" = "None"; @@ -353,6 +353,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_settings_calls_title" = "Calls"; "lng_settings_peer_to_peer" = "Peer-to-Peer"; "lng_settings_peer_to_peer_about" = "Disabling peer-to-peer will relay all calls through Telegram servers to avoid revealing your IP address, but may slightly decrease audio quality."; +"lng_settings_advanced" = "Advanced"; +"lng_settings_stickers_emoji" = "Stickers and emoji"; +"lng_settings_themes" = "Themes"; +"lng_settings_chat_other" = "Other"; "lng_backgrounds_header" = "Choose your new chat background"; "lng_theme_sure_keep" = "Keep this theme?"; diff --git a/Telegram/SourceFiles/boxes/local_storage_box.cpp b/Telegram/SourceFiles/boxes/local_storage_box.cpp index a88b79346c..53442a7b45 100644 --- a/Telegram/SourceFiles/boxes/local_storage_box.cpp +++ b/Telegram/SourceFiles/boxes/local_storage_box.cpp @@ -192,7 +192,7 @@ void LocalStorageBox::Row::step_radial(TimeMs ms, bool timer) { } rpl::producer<> LocalStorageBox::Row::clearRequests() const { - return _clear->clicks(); + return _clear->clicks() | rpl::map([] { return rpl::empty_value(); }); } int LocalStorageBox::Row::resizeGetHeight(int newWidth) { diff --git a/Telegram/SourceFiles/export/view/export_view_progress.cpp b/Telegram/SourceFiles/export/view/export_view_progress.cpp index 301fafadd2..45dad93303 100644 --- a/Telegram/SourceFiles/export/view/export_view_progress.cpp +++ b/Telegram/SourceFiles/export/view/export_view_progress.cpp @@ -266,7 +266,7 @@ ProgressWidget::ProgressWidget( rpl::producer<> ProgressWidget::cancelClicks() const { return _cancel - ? _cancel->clicks() + ? (_cancel->clicks() | rpl::map([] { return rpl::empty_value(); })) : (rpl::never<>() | rpl::type_erased()); } @@ -322,7 +322,10 @@ void ProgressWidget::showDone() { if (_done->width() < desired) { _done->setFullWidth(desired); } - _done->clicks() | rpl::start_to_stream(_doneClicks, _done->lifetime()); + _done->clicks( + ) | rpl::map([] { + return rpl::empty_value(); + }) | rpl::start_to_stream(_doneClicks, _done->lifetime()); setupBottomButton(_done.get()); } diff --git a/Telegram/SourceFiles/export/view/export_view_settings.cpp b/Telegram/SourceFiles/export/view/export_view_settings.cpp index 7a3c8da687..f4e5d953c1 100644 --- a/Telegram/SourceFiles/export/view/export_view_settings.cpp +++ b/Telegram/SourceFiles/export/view/export_view_settings.cpp @@ -524,7 +524,10 @@ void SettingsWidget::refreshButtons( : nullptr; if (start) { start->show(); - _startClicks = start->clicks(); + _startClicks = start->clicks( + ) | rpl::map([] { + return rpl::empty_value(); + }); container->sizeValue( ) | rpl::start_with_next([=](QSize size) { @@ -539,7 +542,10 @@ void SettingsWidget::refreshButtons( langFactory(lng_cancel), st::defaultBoxButton); cancel->show(); - _cancelClicks = cancel->clicks(); + _cancelClicks = cancel->clicks( + ) | rpl::map([] { + return rpl::empty_value(); + }); rpl::combine( container->sizeValue(), diff --git a/Telegram/SourceFiles/export/view/export_view_top_bar.cpp b/Telegram/SourceFiles/export/view/export_view_top_bar.cpp index b2cdef9b45..925a40acca 100644 --- a/Telegram/SourceFiles/export/view/export_view_top_bar.cpp +++ b/Telegram/SourceFiles/export/view/export_view_top_bar.cpp @@ -30,7 +30,7 @@ TopBar::TopBar(QWidget *parent, Content &&content) updateData(std::move(content)); } -rpl::producer<> TopBar::clicks() const { +rpl::producer TopBar::clicks() const { return _button->clicks(); } diff --git a/Telegram/SourceFiles/export/view/export_view_top_bar.h b/Telegram/SourceFiles/export/view/export_view_top_bar.h index 07b54299e0..c27a52d20f 100644 --- a/Telegram/SourceFiles/export/view/export_view_top_bar.h +++ b/Telegram/SourceFiles/export/view/export_view_top_bar.h @@ -25,7 +25,7 @@ class TopBar : public Ui::RpWidget { public: TopBar(QWidget *parent, Content &&content); - rpl::producer<> clicks() const; + rpl::producer clicks() const; void updateData(Content &&content); diff --git a/Telegram/SourceFiles/info/info_content_widget.h b/Telegram/SourceFiles/info/info_content_widget.h index b964e9cb71..7c989c8fda 100644 --- a/Telegram/SourceFiles/info/info_content_widget.h +++ b/Telegram/SourceFiles/info/info_content_widget.h @@ -50,7 +50,7 @@ public: rpl::producer scrollHeightValue() const; rpl::producer desiredHeightValue() const override; - rpl::producer desiredShadowVisibility() const; + virtual rpl::producer desiredShadowVisibility() const; bool hasTopBarShadow() const; virtual void setInnerFocus(); diff --git a/Telegram/SourceFiles/info/info_top_bar.cpp b/Telegram/SourceFiles/info/info_top_bar.cpp index 763f062845..af8f614476 100644 --- a/Telegram/SourceFiles/info/info_top_bar.cpp +++ b/Telegram/SourceFiles/info/info_top_bar.cpp @@ -99,8 +99,10 @@ void TopBar::enableBackButton() { st::infoTopBarScale); _back->setDuration(st::infoTopBarDuration); _back->toggle(!selectionMode(), anim::type::instant); - _back->entity()->clicks() - | rpl::start_to_stream(_backClicks, _back->lifetime()); + _back->entity()->clicks( + ) | rpl::map([] { + return rpl::empty_value(); + }) | rpl::start_to_stream(_backClicks, _back->lifetime()); registerToggleControlCallback(_back.data(), [=] { return !selectionMode(); }); @@ -434,7 +436,9 @@ void TopBar::createSelectionControls() { st::infoTopBarScale)); _cancelSelection->setDuration(st::infoTopBarDuration); _cancelSelection->entity()->clicks( - ) | rpl::start_to_stream( + ) | rpl::map([] { + return rpl::empty_value(); + }) | rpl::start_to_stream( _cancelSelectionClicks, _cancelSelection->lifetime()); _selectionText = wrap(Ui::CreateChild>( @@ -605,7 +609,7 @@ rpl::producer TitleValue( case Section::SettingsType::PrivacySecurity: return lng_settings_section_privacy; case Section::SettingsType::General: - return lng_settings_section_general; + return lng_settings_advanced; case Section::SettingsType::Chat: return lng_settings_section_chat_settings; } diff --git a/Telegram/SourceFiles/info/profile/info_profile_button.cpp b/Telegram/SourceFiles/info/profile/info_profile_button.cpp index 7980d80c54..89f87b6a69 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_button.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_button.cpp @@ -71,7 +71,7 @@ void Button::paintEvent(QPaintEvent *e) { Painter p(this); auto ms = getms(); - auto paintOver = (isOver() || isDown()); + auto paintOver = (isOver() || isDown()) && !isDisabled(); p.fillRect(e->rect(), paintOver ? _st.textBgOver : _st.textBg); paintRipple(p, 0, 0, ms); @@ -113,10 +113,13 @@ int Button::resizeGetHeight(int newWidth) { void Button::onStateChanged( State was, StateChangeSource source) { - RippleButton::onStateChanged(was, source); + if (!isDisabled() || !isDown()) { + RippleButton::onStateChanged(was, source); + } if (_toggle) { _toggle->setStyle(isOver() ? _st.toggleOver : _st.toggle); } + setPointerCursor(!isDisabled()); } void Button::setText(QString &&text) { diff --git a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp index 6d571ab33f..fb4656f0b7 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp @@ -294,6 +294,8 @@ void Cover::initViewers() { ) | rpl::start_with_next( [this] { refreshUploadPhotoOverlay(); }, lifetime()); + } else if (_peer->isSelf()) { + refreshUploadPhotoOverlay(); } VerifiedValue( _peer @@ -304,12 +306,12 @@ void Cover::initViewers() { void Cover::refreshUploadPhotoOverlay() { _userpic->switchChangePhotoOverlay([&] { - if (auto chat = _peer->asChat()) { + if (const auto chat = _peer->asChat()) { return chat->canEdit(); - } else if (auto channel = _peer->asChannel()) { + } else if (const auto channel = _peer->asChannel()) { return channel->canEditInformation(); } - return false; + return _peer->isSelf(); }()); } diff --git a/Telegram/SourceFiles/info/settings/info_settings_widget.cpp b/Telegram/SourceFiles/info/settings/info_settings_widget.cpp index a9bb64cbdd..494a3e5f77 100644 --- a/Telegram/SourceFiles/info/settings/info_settings_widget.cpp +++ b/Telegram/SourceFiles/info/settings/info_settings_widget.cpp @@ -86,6 +86,12 @@ void Widget::saveChanges(FnMut done) { _inner->sectionSaveChanges(std::move(done)); } +rpl::producer Widget::desiredShadowVisibility() const { + return (_type == Type::Main || _type == Type::Information) + ? ContentWidget::desiredShadowVisibility() + : rpl::single(true); +} + std::unique_ptr Widget::doCreateMemento() { auto result = std::make_unique(self(), _type); saveState(result.get()); diff --git a/Telegram/SourceFiles/info/settings/info_settings_widget.h b/Telegram/SourceFiles/info/settings/info_settings_widget.h index 11bf1b1fb1..d6a8845e75 100644 --- a/Telegram/SourceFiles/info/settings/info_settings_widget.h +++ b/Telegram/SourceFiles/info/settings/info_settings_widget.h @@ -66,6 +66,8 @@ public: rpl::producer canSaveChanges() const override; void saveChanges(FnMut done) override; + rpl::producer desiredShadowVisibility() const override; + private: void saveState(not_null memento); void restoreState(not_null memento); diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp index 9213665818..881f0ecebe 100644 --- a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp @@ -81,10 +81,12 @@ public: void setError(bool error); rpl::producer<> deleteClicks() const { - return _delete->entity()->clicks(); + return _delete->entity()->clicks( + ) | rpl::map([] { return rpl::empty_value(); }); } rpl::producer<> restoreClicks() const { - return _restore->entity()->clicks(); + return _restore->entity()->clicks( + ) | rpl::map([] { return rpl::empty_value(); }); } protected: diff --git a/Telegram/SourceFiles/settings/settings.style b/Telegram/SourceFiles/settings/settings.style index affab851d3..54528607b9 100644 --- a/Telegram/SourceFiles/settings/settings.style +++ b/Telegram/SourceFiles/settings/settings.style @@ -10,7 +10,6 @@ using "ui/widgets/widgets.style"; using "info/info.style"; using "boxes/boxes.style"; -settingsFirstDividerSkip: 3px; settingsSectionButton: InfoProfileButton(infoProfileButton) { font: boxTextFont; padding: margins(79px, 13px, 22px, 11px); @@ -22,7 +21,7 @@ settingsButton: InfoProfileButton(settingsSectionButton) { padding: margins(22px, 13px, 22px, 11px); } settingsSectionSkip: 9px; -settingsSectionIconPosition: point(22px, 9px); +settingsSectionIconLeft: 22px; settingsSeparatorPadding: margins(22px, infoProfileSkip, 0px, infoProfileSkip); settingsButtonRightPosition: point(28px, 13px); settingsButtonRight: FlatLabel(defaultFlatLabel) { @@ -48,7 +47,6 @@ settingsUpdate: InfoProfileButton(infoMainButton, settingsButton) { settingsUpdateStatePosition: point(24px, 29px); settingsDividerLabelPadding: margins(22px, 10px, 22px, 19px); -settingsIconSetPhoto: icon {{ "settings_set_photo", menuIconFg }}; settingsIconInformation: icon {{ "settings_information", menuIconFg }}; settingsIconNotifications: icon {{ "settings_notifications", menuIconFg }}; settingsIconChat: icon {{ "settings_chat", menuIconFg }}; @@ -68,6 +66,7 @@ settingsLink: boxLinkButton; settingsAdvancedNotificationsPadding: margins(22px, 20px, 10px, 10px); settingsLinkLabel: defaultFlatLabel; settingsCheckboxesSkip: 12px; +settingsStickersEmojiPadding: 17px; settingsSendType: settingsCheckbox; settingsSendTypePadding: margins(22px, 5px, 10px, 5px); @@ -100,7 +99,20 @@ settingsCloudPasswordLabel: FlatLabel(defaultFlatLabel) { } settingsCloudPasswordLabelPadding: margins(22px, 8px, 10px, 8px); -settingsInfoRowHeight: 62px; +settingsInfoPhotoHeight: 175px; +settingsInfoPhotoSize: 84px; +settingsInfoPhoto: UserpicButton(defaultUserpicButton) { + size: size(settingsInfoPhotoSize, settingsInfoPhotoSize); + photoSize: settingsInfoPhotoSize; +} +settingsInfoPhotoTop: 17px; +settingsInfoPhotoSkip: 16px; +settingsInfoPhotoSet: defaultActiveButton; + +settingsInfoRow: InfoProfileButton(settingsButton) { + height: 62px; + padding: margins(0px, 0px, 0px, 0px); +} settingsInfoIconPosition: point(22px, 18px); settingsInfoValue: FlatLabel(defaultFlatLabel) { textFg: windowFg; @@ -114,24 +126,11 @@ settingsInfoAbout: FlatLabel(settingsInfoValue) { } settingsInfoAboutPosition: point(78px, 34px); settingsInfoRightSkip: 60px; -settingsInfoEditPosition: point(0px, 6px); -settingsInfoEdit: IconButton(defaultIconButton) { - width: 56px; - height: 56px; - - icon: icon {{ "settings_edit", menuIconFg }}; - iconOver: icon {{ "settings_edit", menuIconFgOver }}; - iconPosition: point(14px, 14px); - - rippleAreaPosition: point(8px, 8px); - rippleAreaSize: 40px; - ripple: RippleAnimation(defaultRippleAnimation) { - color: windowBgOver; - } -} +settingsInfoEditRight: 14px; +settingsInfoEditIconOver: icon {{ "settings_edit", menuIconFgOver }}; settingsBio: InputField(defaultInputField) { textBg: transparent; - textMargins: margins(2px, 7px, 2px, 0px); + textMargins: margins(0px, 7px, 0px, 13px); placeholderFg: placeholderFg; placeholderFgActive: placeholderFgActive; @@ -140,9 +139,6 @@ settingsBio: InputField(defaultInputField) { placeholderScale: 0.; placeholderFont: normalFont; - border: 0px; - borderActive: 0px; - heightMin: 32px; font: boxTextFont; @@ -157,3 +153,4 @@ settingsBioCountdown: FlatLabel(defaultFlatLabel) { style: boxTextStyle; textFg: windowSubTextFg; } +settingsBioLabelPadding: margins(22px, 11px, 22px, 0px); diff --git a/Telegram/SourceFiles/settings/settings_chat.cpp b/Telegram/SourceFiles/settings/settings_chat.cpp index 4a5e61fabd..9e787dfddc 100644 --- a/Telegram/SourceFiles/settings/settings_chat.cpp +++ b/Telegram/SourceFiles/settings/settings_chat.cpp @@ -369,9 +369,10 @@ void DownloadPathRow::setupControls() { #endif // OS_WIN_STORE -void SetupChatOptions(not_null container) { - AddDivider(container); - AddSkip(container, st::settingsCheckboxesSkip); +void SetupStickersEmoji(not_null container) { + AddSkip(container, st::settingsStickersEmojiPadding); + + AddSubsectionTitle(container, lng_settings_stickers_emoji); auto wrap = object_ptr(container); const auto inner = wrap.data(); @@ -422,65 +423,31 @@ void SetupChatOptions(not_null container) { Local::writeUserSettings(); }); - const auto dontask = inner->add( - checkbox( - lng_download_path_dont_ask, - !Global::AskDownloadPath()), -#ifndef OS_WIN_STORE - st::settingsAskPathPadding); -#else // OS_WIN_STORE - st::settingsCheckboxPadding); -#endif // OS_WIN_STORE - -#ifndef OS_WIN_STORE - const auto showpath = Ui::AttachAsChild( - dontask, - rpl::event_stream()); - const auto padding = st::settingsDownloadPathPadding; - const auto path = container->add( - object_ptr>( - container, - object_ptr(container), - QMargins( - (padding.left() - + st::settingsCheckbox.checkPosition.x() - + st::defaultCheck.diameter - + st::settingsCheckbox.textPosition.x() - - st::settingsCheckbox.margin.left()), - padding.top(), - padding.right(), - padding.bottom()))); - AddSkip(container, st::settingsCheckboxPadding.bottom()); - path->toggleOn( - showpath->events_starting_with(!Global::AskDownloadPath())); -#endif // OS_WIN_STORE - - base::ObservableViewer( - dontask->checkedChanged - ) | rpl::start_with_next([=](bool checked) { - Global::SetAskDownloadPath(!checked); - Local::writeUserSettings(); - -#ifndef OS_WIN_STORE - showpath->fire_copy(checked); -#endif // OS_WIN_STORE - - }, inner->lifetime()); + AddButton( + container, + lng_stickers_you_have, + st::settingsButton + )->addClickHandler([] { + Ui::show(Box(StickersBox::Section::Installed)); + }); AddSkip(container, st::settingsCheckboxesSkip); } -void SetupSendKey(not_null container) { +void SetupChatOther(not_null container) { AddDivider(container); - const auto skip = st::settingsSendTypeSkip; - const auto full = st::settingsCheckboxesSkip + skip; - AddSkip(container, full); + AddSkip(container, st::settingsSectionSkip); + + AddSubsectionTitle(container, lng_settings_chat_other); + + AddSkip(container, st::settingsSendTypeSkip); enum class SendByType { Enter, CtrlEnter, }; + const auto skip = st::settingsSendTypeSkip; const auto group = std::make_shared>( cCtrlEnter() ? SendByType::CtrlEnter : SendByType::Enter); auto wrap = object_ptr(container); @@ -491,8 +458,6 @@ void SetupSendKey(not_null container) { std::move(wrap), QMargins(0, skip, 0, skip))); - AddSkip(container, full); - const auto add = [&]( SendByType value, LangKey key, @@ -525,11 +490,55 @@ void SetupSendKey(not_null container) { } Local::writeUserSettings(); }); -} -void SetupMediaOptions(not_null container) { - AddDivider(container); - AddSkip(container); + AddSkip(inner, st::settingsCheckboxesSkip); + + const auto dontask = inner->add( + object_ptr( + inner, + lang(lng_download_path_dont_ask), + !Global::AskDownloadPath(), + st::settingsCheckbox), +#ifndef OS_WIN_STORE + st::settingsAskPathPadding); +#else // OS_WIN_STORE + st::settingsCheckboxPadding); +#endif // OS_WIN_STORE + +#ifndef OS_WIN_STORE + const auto showpath = Ui::AttachAsChild( + dontask, + rpl::event_stream()); + const auto padding = st::settingsDownloadPathPadding; + const auto path = container->add( + object_ptr>( + container, + object_ptr(container), + QMargins( + (padding.left() + + st::settingsCheckbox.checkPosition.x() + + st::defaultCheck.diameter + + st::settingsCheckbox.textPosition.x() + - st::settingsCheckbox.margin.left()), + padding.top(), + padding.right(), + padding.bottom()))); + AddSkip(container, st::settingsCheckboxPadding.bottom()); + path->toggleOn( + showpath->events_starting_with(!Global::AskDownloadPath())); +#endif // OS_WIN_STORE + + base::ObservableViewer( + dontask->checkedChanged + ) | rpl::start_with_next([=](bool checked) { + Global::SetAskDownloadPath(!checked); + Local::writeUserSettings(); + +#ifndef OS_WIN_STORE + showpath->fire_copy(checked); +#endif // OS_WIN_STORE + + }, inner->lifetime()); AddButton( container, @@ -539,20 +548,12 @@ void SetupMediaOptions(not_null container) { Ui::show(Box()); }); - AddButton( - container, - lng_stickers_you_have, - st::settingsButton - )->addClickHandler([] { - Ui::show(Box(StickersBox::Section::Installed)); - }); - - AddSkip(container); + AddSkip(container, st::settingsCheckboxesSkip); } void SetupChatBackground(not_null container) { AddDivider(container); - AddSkip(container, st::settingsCheckboxesSkip); + AddSkip(container, st::settingsSectionSkip); AddSubsectionTitle(container, lng_settings_section_background); @@ -673,6 +674,8 @@ void SetupThemeOptions(not_null container) { AddDivider(container); AddSkip(container); + AddSubsectionTitle(container, lng_settings_themes); + SetupNightMode(container); AddButton( @@ -698,12 +701,10 @@ Chat::Chat(QWidget *parent, not_null self) void Chat::setupContent() { const auto content = Ui::CreateChild(this); - AddSkip(content, st::settingsFirstDividerSkip); - SetupChatOptions(content); - SetupSendKey(content); - SetupMediaOptions(content); + SetupStickersEmoji(content); SetupChatBackground(content); SetupThemeOptions(content); + SetupChatOther(content); Ui::ResizeFitChild(this, content); } diff --git a/Telegram/SourceFiles/settings/settings_common.cpp b/Telegram/SourceFiles/settings/settings_common.cpp index 9ca8056e60..f4de90b11d 100644 --- a/Telegram/SourceFiles/settings/settings_common.cpp +++ b/Telegram/SourceFiles/settings/settings_common.cpp @@ -32,17 +32,17 @@ object_ptr
CreateSection( UserData *self) { switch (type) { case Type::Main: - return object_ptr<::Settings::Main>(parent, controller, self); + return object_ptr
(parent, controller, self); case Type::Information: - return object_ptr<::Settings::Information>(parent, self); + return object_ptr(parent, controller, self); case Type::Notifications: - return object_ptr<::Settings::Notifications>(parent, self); + return object_ptr(parent, self); case Type::PrivacySecurity: - return object_ptr<::Settings::PrivacySecurity>(parent, self); + return object_ptr(parent, self); case Type::General: - return object_ptr<::Settings::General>(parent, self); + return object_ptr(parent, self); case Type::Chat: - return object_ptr<::Settings::Chat>(parent, self); + return object_ptr(parent, self); } Unexpected("Settings section type in Widget::createInnerWidget."); } @@ -78,26 +78,36 @@ not_null AddButton( LangKey text, const style::InfoProfileButton &st, const style::icon *leftIcon) { + return AddButton(container, Lang::Viewer(text), st, leftIcon); +} + +not_null AddButton( + not_null container, + rpl::producer text, + const style::InfoProfileButton &st, + const style::icon *leftIcon) { const auto result = container->add(object_ptr