diff --git a/Telegram/SourceFiles/boxes/about_box.cpp b/Telegram/SourceFiles/boxes/about_box.cpp index 06ff4addaf..a40f7f6346 100644 --- a/Telegram/SourceFiles/boxes/about_box.cpp +++ b/Telegram/SourceFiles/boxes/about_box.cpp @@ -302,9 +302,8 @@ void ArchiveHintBox( auto button = object_ptr( box, tr::lng_archive_hint_button(), - st::defaultActiveButton); - button->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultActiveButton, + Ui::RoundButtonTextNoTransform); button->resizeToWidth(box->width() - st.buttonPadding.left() - st.buttonPadding.left()); diff --git a/Telegram/SourceFiles/boxes/about_sponsored_box.cpp b/Telegram/SourceFiles/boxes/about_sponsored_box.cpp index f377c34782..113217a177 100644 --- a/Telegram/SourceFiles/boxes/about_sponsored_box.cpp +++ b/Telegram/SourceFiles/boxes/about_sponsored_box.cpp @@ -35,10 +35,10 @@ void AboutSponsoredBox(not_null box) { const auto button = Ui::CreateChild( row, rpl::single(kUrl.utf8()), - st); + st, + RoundButtonTextNoTransform); button->setBrushOverride(Qt::NoBrush); button->setPenOverride(QPen(st::historyLinkInFg)); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); rpl::combine( row->sizeValue(), button->sizeValue() diff --git a/Telegram/SourceFiles/boxes/background_preview_box.cpp b/Telegram/SourceFiles/boxes/background_preview_box.cpp index 24cd9b852b..6a95ecfb28 100644 --- a/Telegram/SourceFiles/boxes/background_preview_box.cpp +++ b/Telegram/SourceFiles/boxes/background_preview_box.cpp @@ -758,7 +758,8 @@ void BackgroundPreviewBox::applyForPeer() { const auto forMe = CreateChild( overlay, tr::lng_background_apply_me(), - st::backgroundConfirm); + st::backgroundConfirm, + RoundButtonTextNoTransform); forMe->setClickedCallback([=] { applyForPeer(false); }); @@ -769,6 +770,7 @@ void BackgroundPreviewBox::applyForPeer() { lt_user, rpl::single(_forPeer->shortName())), st::backgroundConfirm, + RoundButtonTextNoTransform, Data::AmPremiumValue(&_forPeer->session()) | rpl::map(!_1)); forBoth->setClickedCallback([=] { if (_forPeer->session().premium()) { @@ -782,7 +784,8 @@ void BackgroundPreviewBox::applyForPeer() { const auto cancel = CreateChild( overlay, tr::lng_cancel(), - st::backgroundConfirmCancel); + st::backgroundConfirmCancel, + RoundButtonTextNoTransform); cancel->setClickedCallback([=] { const auto raw = _forBothOverlay.release(); raw->shownValue() | rpl::filter( @@ -792,10 +795,6 @@ void BackgroundPreviewBox::applyForPeer() { }), raw->lifetime()); raw->toggle(false, anim::type::normal); }); - forMe->setTextTransform(RoundButton::TextTransform::NoTransform); - forBoth->setTextTransform(RoundButton::TextTransform::NoTransform); - cancel->setTextTransform(RoundButton::TextTransform::NoTransform); - overlay->sizeValue( ) | rpl::on_next([=](QSize size) { const auto padding = st::backgroundConfirmPadding; diff --git a/Telegram/SourceFiles/boxes/local_storage_box.cpp b/Telegram/SourceFiles/boxes/local_storage_box.cpp index 3936aeb492..1bdac1a7f0 100644 --- a/Telegram/SourceFiles/boxes/local_storage_box.cpp +++ b/Telegram/SourceFiles/boxes/local_storage_box.cpp @@ -168,8 +168,7 @@ LocalStorageBox::Row::Row( this, sizeText(data), st::localStorageRowSize) -, _clear(this, std::move(clear), st::localStorageClear) { - _clear->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); +, _clear(this, std::move(clear), st::localStorageClear, Ui::RoundButtonTextNoTransform) { _clear->setVisible(data.count != 0); } diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp index fe2e90d5cf..72c15bac6d 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp @@ -1546,7 +1546,6 @@ not_null CreateProfilePreview( } void ProcessButton(not_null button) { - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); // Raise to be above right emoji from buttons. crl::on_main(button, [=] { button->raise(); }); } @@ -2425,11 +2424,13 @@ void EditPeerColorBox( const auto profileButton = Ui::CreateChild( buttonContainer, tr::lng_settings_color_apply(), - box->getDelegate()->style().button); + box->getDelegate()->style().button, + Ui::RoundButtonTextToUpper); const auto nameButton = Ui::CreateChild( buttonContainer, tr::lng_settings_color_apply(), - box->getDelegate()->style().button); + box->getDelegate()->style().button, + Ui::RoundButtonTextToUpper); rpl::combine( buttonContainer->widthValue(), profileButton->sizeValue(), diff --git a/Telegram/SourceFiles/boxes/select_future_owner_box.cpp b/Telegram/SourceFiles/boxes/select_future_owner_box.cpp index dcefc7d68c..fc138160af 100644 --- a/Telegram/SourceFiles/boxes/select_future_owner_box.cpp +++ b/Telegram/SourceFiles/boxes/select_future_owner_box.cpp @@ -321,7 +321,8 @@ void SelectFutureOwnerbox( !adminsAreEqual ? tr::lng_select_next_owner_box() : tr::lng_select_next_owner_box_admin(), - st::defaultLightButton), + st::defaultLightButton, + Ui::RoundButtonTextNoTransform), st::boxRowPadding, style::al_justify); Ui::AddSkip(content); @@ -329,7 +330,8 @@ void SelectFutureOwnerbox( object_ptr( content, tr::lng_cancel(), - st::defaultLightButton), + st::defaultLightButton, + Ui::RoundButtonTextNoTransform), st::boxRowPadding, style::al_justify); cancel->setClickedCallback([=] { @@ -342,7 +344,8 @@ void SelectFutureOwnerbox( isGroup ? tr::lng_profile_leave_group() : tr::lng_profile_leave_channel(), - st::attentionBoxButton), + st::attentionBoxButton, + Ui::RoundButtonTextNoTransform), st::boxRowPadding, style::al_justify); leave->setClickedCallback([=, revoke = false] { @@ -476,9 +479,8 @@ void SelectFutureOwnerbox( }), tr::lng_select_next_owner_box_confirm(), tr::lng_close()), - st::defaultActiveButton); - button->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultActiveButton, + Ui::RoundButtonTextNoTransform); const auto raw = button.data(); rpl::combine( state->selectionChanges.events() | rpl::map_to(0), @@ -523,7 +525,6 @@ void SelectFutureOwnerbox( }); for (const auto &b : { select, cancel, leave }) { b->setFullRadius(true); - b->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); } box->setStyle(st::futureOwnerBox); } \ No newline at end of file diff --git a/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp b/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp index 81475cff97..4dc7935847 100644 --- a/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp +++ b/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp @@ -1983,9 +1983,9 @@ object_ptr MakeActiveAuctionRow( object_ptr( raw, rpl::single(QString()), - st::auctionListRaise), + st::auctionListRaise, + RoundButtonTextNoTransform), st::auctionListRaisePadding); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); auto secondsLeft = rpl::duplicate( value diff --git a/Telegram/SourceFiles/boxes/star_gift_preview_box.cpp b/Telegram/SourceFiles/boxes/star_gift_preview_box.cpp index 1c35a778e9..3ab7a4a414 100644 --- a/Telegram/SourceFiles/boxes/star_gift_preview_box.cpp +++ b/Telegram/SourceFiles/boxes/star_gift_preview_box.cpp @@ -1556,10 +1556,13 @@ void StarGiftPreviewBox( const style::RoundButton &st, const style::icon &active, Tab tab) { - auto owned = object_ptr(buttonsParent, text(), st); + auto owned = object_ptr( + buttonsParent, + text(), + st, + RoundButtonTextNoTransform); const auto raw = owned.data(); - raw->setTextTransform(RoundButton::TextTransform::NoTransform); raw->setClickedCallback([=] { state->tab = tab; }); diff --git a/Telegram/SourceFiles/boxes/url_auth_box_content.cpp b/Telegram/SourceFiles/boxes/url_auth_box_content.cpp index 291be3d8d1..232751aff1 100644 --- a/Telegram/SourceFiles/boxes/url_auth_box_content.cpp +++ b/Telegram/SourceFiles/boxes/url_auth_box_content.cpp @@ -35,7 +35,6 @@ void PrepareFullWidthRoundButton( not_null button, not_null content, const style::margins &padding) { - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); button->setFullRadius(true); const auto paddingHorizontal = padding.left() + padding.right(); content->widthValue() | rpl::on_next([=](int w) { @@ -83,7 +82,8 @@ void ShowMatchCodesBox( const auto button = Ui::CreateChild( buttons, rpl::single(emojiCode ? QString() : code), - st::urlAuthCodesButton); + st::urlAuthCodesButton, + Ui::RoundButtonTextNoTransform); if (emojiCode) { button->setTextFgOverride(QColor(Qt::transparent)); const auto overlay = Ui::CreateChild(button); @@ -165,7 +165,6 @@ void ShowMatchCodesBox( (overlay->height() - visible) / 2); }); } - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); button->setFullRadius(true); button->setClickedCallback([=] { callback(code); @@ -201,7 +200,8 @@ void ShowMatchCodesBox( object_ptr( content, tr::lng_cancel(), - st::attentionBoxButton), + st::attentionBoxButton, + Ui::RoundButtonTextNoTransform), padding); PrepareFullWidthRoundButton(button, content, padding); button->setClickedCallback([=] { @@ -550,7 +550,8 @@ void ShowDetails( object_ptr( content, tr::lng_url_auth_login_button(), - st::defaultLightButton), + st::defaultLightButton, + Ui::RoundButtonTextNoTransform), padding); PrepareFullWidthRoundButton(button, content, padding); button->setClickedCallback([=] { @@ -587,7 +588,8 @@ void ShowDetails( object_ptr( content, tr::lng_suggest_action_decline(), - st::attentionBoxButton), + st::attentionBoxButton, + Ui::RoundButtonTextNoTransform), padding); PrepareFullWidthRoundButton(button, content, padding); button->setClickedCallback([=] { diff --git a/Telegram/SourceFiles/calls/group/calls_group_rtmp.cpp b/Telegram/SourceFiles/calls/group/calls_group_rtmp.cpp index e0ed9edc27..c5e9c7c165 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_rtmp.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_rtmp.cpp @@ -257,8 +257,8 @@ void StartRtmpProcess::FillRtmpRows( auto button = Ui::CreateChild( wrap.data(), rpl::duplicate(text), - st::groupCallRtmpCopyButton); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::groupCallRtmpCopyButton, + Ui::RoundButtonTextNoTransform); button->setClickedCallback(key ? Fn([=] { QGuiApplication::clipboard()->setText(state->key.current()); diff --git a/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp b/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp index 3dfc1fa526..dcd402f419 100644 --- a/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp +++ b/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp @@ -260,12 +260,14 @@ ChooseSourceProcess::ChooseSourceProcess( CreateChild( _bottom.get(), tr::lng_group_call_screen_share_start(), - st::desktopCaptureSubmit)) + st::desktopCaptureSubmit, + RoundButtonTextToUpper)) , _finish( CreateChild( _bottom.get(), tr::lng_group_call_screen_share_stop(), - st::desktopCaptureFinish)) + st::desktopCaptureFinish, + RoundButtonTextToUpper)) , _withAudio( CreateChild( _bottom.get(), @@ -369,7 +371,8 @@ void ChooseSourceProcess::setupPanel() { const auto cancel = CreateChild( _bottom.get(), tr::lng_cancel(), - st::desktopCaptureCancel); + st::desktopCaptureCancel, + RoundButtonTextToUpper); cancel->setClickedCallback([=] { _window->close(); }); diff --git a/Telegram/SourceFiles/chat_helpers/ttl_media_layer_widget.cpp b/Telegram/SourceFiles/chat_helpers/ttl_media_layer_widget.cpp index 97a9fb73f9..f0b0aa23b0 100644 --- a/Telegram/SourceFiles/chat_helpers/ttl_media_layer_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/ttl_media_layer_widget.cpp @@ -198,10 +198,10 @@ PreviewWrap::PreviewWrap( item->out() ? tr::lng_close() : tr::lng_ttl_voice_close_in(), - st::ttlMediaButton); + st::ttlMediaButton, + Ui::RoundButtonTextNoTransform); close->setFullRadius(true); close->setClickedCallback(closeCallback); - close->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); rpl::combine( sizeValue(), diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index baa9fb1c6c..98b6f5095b 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -4333,9 +4333,8 @@ void InnerWidget::refreshEmpty() { _emptyButton.create( this, tr::lng_no_conversations_button(), - st::dialogEmptyButton); - _emptyButton->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::dialogEmptyButton, + Ui::RoundButtonTextNoTransform); _emptyButton->setVisible(isListVisible); _emptyButton->setClickedCallback([=, window = _controller] { window->show(PrepareContactsBox(window)); diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp index b88b8886d7..89bfd36bd0 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp @@ -126,13 +126,13 @@ not_null*> CreateUnconfirmedAuthContent( const auto yes = Ui::CreateChild( buttons, tr::lng_unconfirmed_auth_confirm(), - st::dialogsUnconfirmedAuthButton); + st::dialogsUnconfirmedAuthButton, + Ui::RoundButtonTextNoTransform); const auto no = Ui::CreateChild( buttons, tr::lng_unconfirmed_auth_deny(), - st::dialogsUnconfirmedAuthButtonNo); - yes->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); - no->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::dialogsUnconfirmedAuthButtonNo, + Ui::RoundButtonTextNoTransform); yes->setClickedCallback([=] { wrap->toggle(false, anim::type::normal); base::call_delayed(st::universalDuration, wrap, [=] { @@ -237,7 +237,8 @@ void ShowAuthDeniedBox( object_ptr( box, rpl::single(QString()), - st::defaultActiveButton)); + st::defaultActiveButton, + Ui::RoundButtonTextNoTransform)); confirm->setClickedCallback([=] { box->closeBox(); }); @@ -362,7 +363,8 @@ void TopBarSuggestionContent::setRightButton( _rightButton = base::make_unique_q( this, rpl::single(QString()), - st::dialogsTopBarRightButton); + st::dialogsTopBarRightButton, + RoundButtonTextNoTransform); _rightButton->setText(std::move(text)); rpl::combine( sizeValue(), @@ -372,7 +374,6 @@ void TopBarSuggestionContent::setRightButton( _rightButton->moveToRight(top, top, outer.width()); }, _rightButton->lifetime()); _rightButton->setFullRadius(true); - _rightButton->setTextTransform(RoundButton::TextTransform::NoTransform); _rightButton->setClickedCallback(std::move(callback)); _rightButton->show(); } diff --git a/Telegram/SourceFiles/dialogs/ui/posts_search_intro.cpp b/Telegram/SourceFiles/dialogs/ui/posts_search_intro.cpp index 83d4ce40de..c3a6362bd3 100644 --- a/Telegram/SourceFiles/dialogs/ui/posts_search_intro.cpp +++ b/Telegram/SourceFiles/dialogs/ui/posts_search_intro.cpp @@ -185,9 +185,9 @@ void PostsSearchIntro::setup() { object_ptr( _content.get(), rpl::single(QString()), - st::postsSearchIntroButton), + st::postsSearchIntroButton, + Ui::RoundButtonTextNoTransform), style::al_top); - _button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); _footer = _content->add( object_ptr( _content.get(), diff --git a/Telegram/SourceFiles/export/view/export_view_progress.cpp b/Telegram/SourceFiles/export/view/export_view_progress.cpp index a1746d9313..bec4905c5e 100644 --- a/Telegram/SourceFiles/export/view/export_view_progress.cpp +++ b/Telegram/SourceFiles/export/view/export_view_progress.cpp @@ -277,7 +277,8 @@ ProgressWidget::ProgressWidget( _cancel = base::make_unique_q( this, tr::lng_export_stop(), - st::exportCancelButton); + st::exportCancelButton, + Ui::RoundButtonTextNoTransform); setupBottomButton(_cancel.get()); } @@ -297,7 +298,6 @@ rpl::producer<> ProgressWidget::doneClicks() const { } void ProgressWidget::setupBottomButton(not_null button) { - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); button->show(); sizeValue( @@ -361,7 +361,8 @@ void ProgressWidget::showDone() { _done = base::make_unique_q( this, tr::lng_export_done(), - st::exportDoneButton); + st::exportDoneButton, + Ui::RoundButtonTextNoTransform); const auto desired = std::min( st::exportDoneButton.style.font->width(tr::lng_export_done(tr::now)) + st::exportDoneButton.height diff --git a/Telegram/SourceFiles/export/view/export_view_settings.cpp b/Telegram/SourceFiles/export/view/export_view_settings.cpp index 85c7061cc0..26aa8be841 100644 --- a/Telegram/SourceFiles/export/view/export_view_settings.cpp +++ b/Telegram/SourceFiles/export/view/export_view_settings.cpp @@ -885,10 +885,10 @@ void SettingsWidget::refreshButtons( ? Ui::CreateChild( container.get(), tr::lng_export_start(), - st::defaultBoxButton) + st::defaultBoxButton, + Ui::RoundButtonTextNoTransform) : nullptr; if (start) { - start->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); start->show(); _startClicks = start->clicks() | rpl::to_empty; @@ -903,8 +903,8 @@ void SettingsWidget::refreshButtons( const auto cancel = Ui::CreateChild( container.get(), tr::lng_cancel(), - st::defaultBoxButton); - cancel->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::defaultBoxButton, + Ui::RoundButtonTextNoTransform); cancel->show(); _cancelClicks = cancel->clicks() | rpl::to_empty; diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 31be1ad830..14c11d5c9d 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -5878,11 +5878,10 @@ bool HistoryWidget::updateCmdStartShown() { (_botMenu.text.isEmpty() ? tr::lng_bot_menu_button() : rpl::single(_botMenu.text)), - st::historyBotMenuButton); + st::historyBotMenuButton, + Ui::RoundButtonTextNoTransform); orderWidgets(); - _botMenu.button->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); _botMenu.button->setFullRadius(true); _botMenu.button->setClickedCallback([=] { const auto user = _peer ? _peer->asUser() : nullptr; diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index dc997eaa6d..35009d8035 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -3074,10 +3074,10 @@ void SetupRestrictionView( auto unlock = std::make_unique( widget, rpl::single(text), - st->premiumRequired.button); + st->premiumRequired.button, + RoundButtonTextNoTransform); unlock->show(); unlock->setAttribute(Qt::WA_TransparentForMouseEvents); - unlock->setTextTransform(RoundButton::TextTransform::NoTransform); unlock->setFullRadius(true); return unlock; }; diff --git a/Telegram/SourceFiles/history/view/history_view_contact_status.cpp b/Telegram/SourceFiles/history/view/history_view_contact_status.cpp index db7accde10..e2a0f1e9be 100644 --- a/Telegram/SourceFiles/history/view/history_view_contact_status.cpp +++ b/Telegram/SourceFiles/history/view/history_view_contact_status.cpp @@ -1014,13 +1014,12 @@ BusinessBotStatus::Bar::Bar(QWidget *parent) , _togglePaused( this, rpl::single(QString()), - st::historyBusinessBotToggle) + st::historyBusinessBotToggle, + Ui::RoundButtonTextNoTransform) , _settings(this, st::historyBusinessBotSettings) { _name->setAttribute(Qt::WA_TransparentForMouseEvents); _status->setAttribute(Qt::WA_TransparentForMouseEvents); _togglePaused->setFullRadius(true); - _togglePaused->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); _settings->setClickedCallback([=] { showMenu(); }); diff --git a/Telegram/SourceFiles/history/view/history_view_pinned_bar.cpp b/Telegram/SourceFiles/history/view/history_view_pinned_bar.cpp index 6636fd858c..cb514f6ffa 100644 --- a/Telegram/SourceFiles/history/view/history_view_pinned_bar.cpp +++ b/Telegram/SourceFiles/history/view/history_view_pinned_bar.cpp @@ -170,7 +170,8 @@ auto WithPinnedTitle(not_null session, PinnedId id) { auto button = object_ptr( parent, rpl::never(), // Text is handled by the inner label. - stButton); + stButton, + Ui::RoundButtonTextNoTransform); const auto label = Ui::CreateChild( button.data(), @@ -192,7 +193,6 @@ auto WithPinnedTitle(not_null session, PinnedId id) { label->setTextColorOverride(stButton.textFg->c); // Use button's text color for label. label->setAttribute(Qt::WA_TransparentForMouseEvents); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); button->setFullRadius(true); button->setClickedCallback(std::move(clickCallback)); diff --git a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp index ef854d42d2..caffea103f 100644 --- a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp @@ -1741,8 +1741,8 @@ bool ShowScheduledVideoPublished( const auto button = Ui::CreateChild( widget.get(), rpl::single(view), - st::processingVideoView); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::processingVideoView, + Ui::RoundButtonTextNoTransform); button->show(); rpl::combine( widget->sizeValue(), diff --git a/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp b/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp index 45a7dbc0f9..94131da727 100644 --- a/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp +++ b/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp @@ -201,8 +201,8 @@ void StickerToast::showWithTitle(const QString &title) { const auto button = Ui::CreateChild( widget.get(), rpl::single(view), - st::historyPremiumViewSet); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::historyPremiumViewSet, + Ui::RoundButtonTextNoTransform); button->show(); rpl::combine( widget->sizeValue(), diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index a80e5ed695..56a6f0973e 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -117,10 +117,10 @@ TopBarWidget::TopBarWidget( : RpWidget(parent) , _controller(controller) , _primaryWindow(controller->isPrimary()) -, _clear(this, tr::lng_selected_clear(), st::topBarClearButton) -, _forward(this, tr::lng_selected_forward(), st::defaultActiveButton) -, _sendNow(this, tr::lng_selected_send_now(), st::defaultActiveButton) -, _delete(this, tr::lng_selected_delete(), st::defaultActiveButton) +, _clear(this, tr::lng_selected_clear(), st::topBarClearButton, Ui::RoundButtonTextToUpper) +, _forward(this, tr::lng_selected_forward(), st::defaultActiveButton, Ui::RoundButtonTextToUpper) +, _sendNow(this, tr::lng_selected_send_now(), st::defaultActiveButton, Ui::RoundButtonTextToUpper) +, _delete(this, tr::lng_selected_delete(), st::defaultActiveButton, Ui::RoundButtonTextToUpper) , _back(this, st::historyTopBarBack) , _cancelChoose(this, st::topBarCloseChoose) , _call(this, st::topBarCall) diff --git a/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp b/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp index 887c7ff0d3..e117aa12e6 100644 --- a/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp +++ b/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp @@ -599,8 +599,8 @@ void TranslateBar::showToast( const auto button = Ui::CreateChild( widget.get(), rpl::single(buttonText), - st::historyPremiumViewSet); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::historyPremiumViewSet, + Ui::RoundButtonTextNoTransform); button->show(); rpl::combine( widget->sizeValue(), diff --git a/Telegram/SourceFiles/info/bot/starref/info_bot_starref_setup_widget.cpp b/Telegram/SourceFiles/info/bot/starref/info_bot_starref_setup_widget.cpp index ffff738e9c..af6b57b99e 100644 --- a/Telegram/SourceFiles/info/bot/starref/info_bot_starref_setup_widget.cpp +++ b/Telegram/SourceFiles/info/bot/starref/info_bot_starref_setup_widget.cpp @@ -447,7 +447,8 @@ private: auto result = object_ptr( parent, rpl::single(QString()), - st::starrefBottomButton); + st::starrefBottomButton, + Ui::RoundButtonTextToUpper); const auto raw = result.data(); rpl::combine( parent->widthValue(), diff --git a/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp b/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp index ca66330a8b..091f717cc1 100644 --- a/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp +++ b/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp @@ -1344,7 +1344,8 @@ void CreateGiveawayBox( auto button = object_ptr( box, rpl::never(), - st::giveawayGiftCodeStartButton); + st::giveawayGiftCodeStartButton, + Ui::RoundButtonTextNoTransform); AddLabelWithBadgeToButton( button, @@ -1379,7 +1380,6 @@ void CreateGiveawayBox( loadingAnimation->showOn(state->confirmButtonBusy.value()); } - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); state->typeValue.value( ) | rpl::on_next([=, raw = button.data()] { raw->resizeToWidth(box->width() diff --git a/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp b/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp index c527b7690d..cf8e330635 100644 --- a/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp +++ b/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp @@ -202,14 +202,14 @@ void FillShareLink( const auto copy = CreateChild( wrap, tr::lng_group_invite_context_copy(), - st::inviteLinkCopy); - copy->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::inviteLinkCopy, + Ui::RoundButtonTextNoTransform); copy->setClickedCallback(copyLink); const auto share = CreateChild( wrap, tr::lng_group_invite_context_share(), - st::inviteLinkShare); - share->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::inviteLinkShare, + Ui::RoundButtonTextNoTransform); share->setClickedCallback(shareLink); wrap->widthValue( diff --git a/Telegram/SourceFiles/info/channel_statistics/earn/info_channel_earn_list.cpp b/Telegram/SourceFiles/info/channel_statistics/earn/info_channel_earn_list.cpp index 64c791018b..eda9510d4f 100644 --- a/Telegram/SourceFiles/info/channel_statistics/earn/info_channel_earn_list.cpp +++ b/Telegram/SourceFiles/info/channel_statistics/earn/info_channel_earn_list.cpp @@ -144,7 +144,8 @@ void AddRecipient(not_null box, const TextWithEntities &t) { object_ptr( box, rpl::single(QString()), - st::channelEarnHistoryRecipientButton), + st::channelEarnHistoryRecipientButton, + Ui::RoundButtonTextToUpper), style::al_top); const auto label = Ui::CreateChild( container, @@ -593,9 +594,8 @@ void InnerWidget::fill() { auto button = object_ptr( container, tr::lng_channel_earn_learn_close(), - st::defaultActiveButton); - button->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultActiveButton, + Ui::RoundButtonTextNoTransform); button->resizeToWidth(box->width() - st.buttonPadding.left() - st.buttonPadding.left()); @@ -884,7 +884,8 @@ void InnerWidget::fill() { object_ptr( container, rpl::never(), - stButton), + stButton, + Ui::RoundButtonTextToUpper), st::boxRowPadding, style::al_justify); @@ -1236,7 +1237,8 @@ void InnerWidget::fill() { (!entry.successLink.isEmpty()) ? tr::lng_channel_earn_history_out_button() : tr::lng_box_ok(), - st::defaultActiveButton); + st::defaultActiveButton, + Ui::RoundButtonTextToUpper); button->resizeToWidth(box->width() - st.buttonPadding.left() - st.buttonPadding.left()); diff --git a/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_widget.cpp b/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_widget.cpp index f27c2b02dc..38512b4905 100644 --- a/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_widget.cpp +++ b/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_widget.cpp @@ -1305,15 +1305,14 @@ void InnerWidget::refreshAbout() { object_ptr( about.get(), rpl::single(QString()), - st::collectionEmptyButton), + st::collectionEmptyButton, + Ui::RoundButtonTextNoTransform), st::collectionEmptyAddMargin, style::al_top); button->setText(tr::lng_gift_collection_add_button( ) | rpl::map([](const QString &text) { return Ui::Text::IconEmoji(&st::collectionAddIcon).append(text); })); - button->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); button->setClickedCallback([=] { editCollectionGifts(collectionId); }); @@ -2496,8 +2495,8 @@ void Widget::setupBottomButton(int wasBottomHeight) { const auto button = Ui::CreateChild( bottom, rpl::single(QString()), - st::collectionEditBox.button); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::collectionEditBox.button, + Ui::RoundButtonTextNoTransform); button->setText(tr::lng_gift_collection_add_button( ) | rpl::map([](const QString &text) { return Ui::Text::IconEmoji(&st::collectionAddIcon).append(text); diff --git a/Telegram/SourceFiles/info/polls/info_polls_list_widget.cpp b/Telegram/SourceFiles/info/polls/info_polls_list_widget.cpp index 11d7521136..67d56caf45 100644 --- a/Telegram/SourceFiles/info/polls/info_polls_list_widget.cpp +++ b/Telegram/SourceFiles/info/polls/info_polls_list_widget.cpp @@ -269,9 +269,8 @@ void ListWidget::Inner::setupHistory() { _newPollButton.create( _scroll.get(), tr::lng_polls_create_title(), - st::defaultActiveButton); - _newPollButton->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultActiveButton, + Ui::RoundButtonTextNoTransform); _newPollButton->setFullRadius(true); _newPollButton->setClickedCallback([=] { Window::PeerMenuCreatePoll( diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index edf4d836bc..9c0369d112 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -394,7 +394,8 @@ base::options::toggle ShowChannelJoinedBelowAbout({ object_ptr( parent, rpl::single(QString()), - st::infoHoursOuter), + st::infoHoursOuter, + Ui::RoundButtonTextToUpper), st::infoProfileLabeledPadding - st::infoHoursOuterMargin); const auto button = result->entity(); const auto inner = Ui::CreateChild(button); @@ -632,8 +633,8 @@ base::options::toggle ShowChannelJoinedBelowAbout({ const auto link = Ui::CreateChild( labelWrap, std::move(linkText), - st::defaultTableSmallButton); - link->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::defaultTableSmallButton, + Ui::RoundButtonTextNoTransform); link->setClickedCallback([=] { state->myTimezone = !state->myTimezone.current(); state->expanded = true; @@ -882,7 +883,8 @@ void DeleteContactNote( object_ptr( parent, rpl::single(QString()), - st::infoHoursOuter), + st::infoHoursOuter, + Ui::RoundButtonTextToUpper), st::infoProfileLabeledPadding - st::infoHoursOuterMargin); result->setDuration(st::infoSlideDuration); const auto button = result->entity(); @@ -2131,10 +2133,10 @@ void DetailsFiller::setupMainApp(bool suppressBottom) { object_ptr( _wrap, tr::lng_profile_open_app(), - st::infoOpenApp), + st::infoOpenApp, + Ui::RoundButtonTextNoTransform), st::infoOpenAppMargin, style::al_justify); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); const auto user = _peer->asUser(); const auto controller = _controller->parentController(); diff --git a/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp b/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp index be55f17a7f..59f0533907 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp @@ -328,7 +328,8 @@ TopBar::TopBar( object_ptr( this, tr::lng_status_lastseen_when(), - st::infoProfileTopBarShowLastSeen)) + st::infoProfileTopBarShowLastSeen, + Ui::RoundButtonTextNoTransform)) , _forumButton([&, controller = descriptor.controller] { const auto topic = _key.topic(); if (!topic) { @@ -337,7 +338,8 @@ TopBar::TopBar( auto owned = object_ptr( this, rpl::single(QString()), - st::infoProfileTopBarTopicStatusButton); + st::infoProfileTopBarTopicStatusButton, + Ui::RoundButtonTextNoTransform); owned->setText(Info::Profile::NameValue( _peer ) | rpl::map([=](const QString &name) { @@ -345,7 +347,6 @@ TopBar::TopBar( .append(' ') .append(Ui::Text::IconEmoji(&st::textMoreIconEmoji, QString())); })); - owned->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); owned->setClickedCallback([=, peer = _peer] { if (const auto forum = peer->forum()) { if (peer->useSubsectionTabs()) { @@ -2133,8 +2134,6 @@ void TopBar::setupShowLastSeen( _showLastSeen->setOpacity(0.); - using TextTransform = Ui::RoundButton::TextTransform; - _showLastSeen->entity()->setTextTransform(TextTransform::NoTransform); _showLastSeen->entity()->setFullRadius(true); _showLastSeen->entity()->setClickedCallback([=] { diff --git a/Telegram/SourceFiles/info/similar_peers/info_similar_peers_widget.cpp b/Telegram/SourceFiles/info/similar_peers/info_similar_peers_widget.cpp index f67b18f090..9a993f9eaf 100644 --- a/Telegram/SourceFiles/info/similar_peers/info_similar_peers_widget.cpp +++ b/Telegram/SourceFiles/info/similar_peers/info_similar_peers_widget.cpp @@ -156,6 +156,7 @@ void ListController::setupUnlock() { ? tr::lng_similar_channels_show_more() : tr::lng_similar_bots_show_more()), st::similarChannelsLock, + Ui::RoundButtonTextToUpper, rpl::single(true)); button->setClickedCallback([=] { const auto window = _controller->parentController(); diff --git a/Telegram/SourceFiles/info/stories/info_stories_inner_widget.cpp b/Telegram/SourceFiles/info/stories/info_stories_inner_widget.cpp index 93b61df858..c22174e3c9 100644 --- a/Telegram/SourceFiles/info/stories/info_stories_inner_widget.cpp +++ b/Telegram/SourceFiles/info/stories/info_stories_inner_widget.cpp @@ -717,15 +717,14 @@ void InnerWidget::refreshEmpty() { object_ptr( empty.get(), rpl::single(QString()), - st::collectionEmptyButton), + st::collectionEmptyButton, + Ui::RoundButtonTextNoTransform), st::collectionEmptyAddMargin, style::al_top); button->setText(tr::lng_stories_album_add_button( ) | rpl::map([](const QString &text) { return Ui::Text::IconEmoji(&st::collectionAddIcon).append(text); })); - button->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); button->setClickedCallback([=] { editAlbumStories(albumId); }); diff --git a/Telegram/SourceFiles/info/stories/info_stories_widget.cpp b/Telegram/SourceFiles/info/stories/info_stories_widget.cpp index 4c7f98689e..e641def468 100644 --- a/Telegram/SourceFiles/info/stories/info_stories_widget.cpp +++ b/Telegram/SourceFiles/info/stories/info_stories_widget.cpp @@ -230,8 +230,8 @@ void Widget::setupBottomButton(int wasBottomHeight) { const auto button = Ui::CreateChild( bottom, rpl::single(QString()), - st::collectionEditBox.button); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::collectionEditBox.button, + Ui::RoundButtonTextNoTransform); button->setText(tr::lng_stories_album_add_button( ) | rpl::map([](const QString &text) { return Ui::Text::IconEmoji(&st::collectionAddIcon).append(text); diff --git a/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder.cpp b/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder.cpp index cb725eb0d1..e32c273f94 100644 --- a/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder.cpp +++ b/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder.cpp @@ -44,8 +44,8 @@ void ShowLayer( const auto save = Ui::CreateChild( content.get(), tr::lng_connection_save(), - st::userpicBuilderEmojiButton); - save->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::userpicBuilderEmojiButton, + Ui::RoundButtonTextNoTransform); content->sizeValue( ) | rpl::on_next([=] { const auto &p = st::userpicBuilderEmojiSavePosiiton; diff --git a/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp b/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp index c96ee1631d..672e46980e 100644 --- a/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp @@ -512,9 +512,8 @@ void Inner::refreshSwitchPmButton(const CacheEntry *entry) { _switchPmUrl = QByteArray(); } else { if (!_switchPmButton) { - _switchPmButton.create(this, nullptr, st::switchPmButton); + _switchPmButton.create(this, nullptr, st::switchPmButton, Ui::RoundButtonTextNoTransform); _switchPmButton->show(); - _switchPmButton->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); _switchPmButton->addClickHandler([=] { switchPm(); }); } _switchPmButton->setText(rpl::single(entry->switchPmText)); diff --git a/Telegram/SourceFiles/intro/intro_widget.cpp b/Telegram/SourceFiles/intro/intro_widget.cpp index 096d61ce0f..daa8f822e4 100644 --- a/Telegram/SourceFiles/intro/intro_widget.cpp +++ b/Telegram/SourceFiles/intro/intro_widget.cpp @@ -84,10 +84,11 @@ Widget::Widget( object_ptr( this, tr::lng_menu_settings(), - st::defaultBoxButton)) + st::defaultBoxButton, + Ui::RoundButtonTextToUpper)) , _next( this, - object_ptr(this, nullptr, *_nextStyle)) + object_ptr(this, nullptr, *_nextStyle, Ui::RoundButtonTextNoTransform)) , _connecting(std::make_unique( this, account, @@ -318,7 +319,8 @@ void Widget::checkUpdateStatus() { object_ptr( this, tr::lng_menu_update(), - st::defaultBoxButton)); + st::defaultBoxButton, + Ui::RoundButtonTextToUpper)); if (!_showAnimation) { _update->setVisible(true); } @@ -353,7 +355,7 @@ void Widget::setupStep() { _next.destroy(); _next.create( this, - object_ptr(this, nullptr, *nextStyle)); + object_ptr(this, nullptr, *nextStyle, Ui::RoundButtonTextNoTransform)); showControls(); updateControlsGeometry(); _next->toggle(wasShown, anim::type::instant); @@ -492,7 +494,8 @@ void Widget::showResetButton() { auto entity = object_ptr( this, tr::lng_signin_reset_account(), - st::introResetButton); + st::introResetButton, + Ui::RoundButtonTextToUpper); _resetAccount.create(this, std::move(entity)); _resetAccount->hide(anim::type::instant); _resetAccount->entity()->setClickedCallback([this] { resetAccount(); }); @@ -723,8 +726,6 @@ void Widget::showControls() { void Widget::setupNextButton() { _next->entity()->setClickedCallback([=] { getStep()->submit(); }); - _next->entity()->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); _next->entity()->setText(getStep()->nextButtonText( ) | rpl::filter([](const QString &text) { diff --git a/Telegram/SourceFiles/iv/iv_controller.cpp b/Telegram/SourceFiles/iv/iv_controller.cpp index c03e1c9877..343874b215 100644 --- a/Telegram/SourceFiles/iv/iv_controller.cpp +++ b/Telegram/SourceFiles/iv/iv_controller.cpp @@ -97,14 +97,14 @@ public: const auto reset = Ui::CreateChild( this, rpl::single(QString()), - st::ivResetZoom); + st::ivResetZoom, + Ui::RoundButtonTextNoTransform); processTooltip(reset); const auto resetLabel = Ui::CreateChild( reset, tr::lng_background_reset_default(), st::ivResetZoomLabel); resetLabel->setAttribute(Qt::WA_TransparentForMouseEvents); - reset->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); reset->setClickedCallback([this] { _delegate->ivSetZoom(0); }); diff --git a/Telegram/SourceFiles/media/stories/media_stories_controller.cpp b/Telegram/SourceFiles/media/stories/media_stories_controller.cpp index e552172244..8a1aca63c9 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_controller.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_controller.cpp @@ -265,8 +265,8 @@ void Controller::Unsupported::setup(not_null peer) { _button = std::make_unique( wrap, tr::lng_update_telegram(), - st::storiesUnsupportedUpdate); - _button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::storiesUnsupportedUpdate, + Ui::RoundButtonTextNoTransform); _button->show(); rpl::combine( diff --git a/Telegram/SourceFiles/media/stories/media_stories_stealth.cpp b/Telegram/SourceFiles/media/stories/media_stories_stealth.cpp index 89b8d533ae..494d0cd1d0 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_stealth.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_stealth.cpp @@ -240,7 +240,8 @@ struct State { auto result = object_ptr( parent, rpl::single(QString()), - st.box.button); + st.box.button, + Ui::RoundButtonTextToUpper); const auto raw = result.data(); const auto label = Ui::CreateChild( diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index bace1de7de..f2f1552b23 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -1791,12 +1791,11 @@ void OverlayWidget::refreshVoteButton() { return; } if (!_voteButton) { - using TextTransform = Ui::RoundButton::TextTransform; _voteButton.create( _body, tr::lng_polls_submit_votes(), - st::mediaviewVoteButton); - _voteButton->setTextTransform(TextTransform::NoTransform); + st::mediaviewVoteButton, + Ui::RoundButtonTextNoTransform); const auto effect = Ui::CreateChild( _voteButton.data()); effect->setOpacity(_controlsOpacity.current()); @@ -4907,12 +4906,11 @@ void OverlayWidget::initThemePreview() { _themePreviewId = 0; _themePreview = std::move(result); if (_themePreview) { - using TextTransform = Ui::RoundButton::TextTransform; _themeApply.create( _body, tr::lng_theme_preview_apply(), - st::themePreviewApplyButton); - _themeApply->setTextTransform(TextTransform::NoTransform); + st::themePreviewApplyButton, + Ui::RoundButtonTextNoTransform); _themeApply->show(); _themeApply->setClickedCallback([=] { const auto &object = Background()->themeObject(); @@ -4928,16 +4926,16 @@ void OverlayWidget::initThemePreview() { _themeCancel.create( _body, tr::lng_cancel(), - st::themePreviewCancelButton); - _themeCancel->setTextTransform(TextTransform::NoTransform); + st::themePreviewCancelButton, + Ui::RoundButtonTextNoTransform); _themeCancel->show(); _themeCancel->setClickedCallback([this] { close(); }); if (const auto slug = _themeCloudData.slug; !slug.isEmpty()) { _themeShare.create( _body, tr::lng_theme_share(), - st::themePreviewCancelButton); - _themeShare->setTextTransform(TextTransform::NoTransform); + st::themePreviewCancelButton, + Ui::RoundButtonTextNoTransform); _themeShare->show(); _themeShare->setClickedCallback([=] { QGuiApplication::clipboard()->setText( diff --git a/Telegram/SourceFiles/media/view/media_view_playback_sponsored.cpp b/Telegram/SourceFiles/media/view/media_view_playback_sponsored.cpp index 805f31003a..ce490ac96f 100644 --- a/Telegram/SourceFiles/media/view/media_view_playback_sponsored.cpp +++ b/Telegram/SourceFiles/media/view/media_view_playback_sponsored.cpp @@ -325,13 +325,13 @@ PlaybackSponsored::Message::Message( , _about(std::make_unique( this, tr::lng_search_sponsored_button(), - _aboutSt)) + _aboutSt, + Ui::RoundButtonTextNoTransform)) , _close( std::make_unique( this, _aboutSt.ripple, std::move(allowCloseAt))) { - _about->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); setMouseTracking(true); populate(); hide(); diff --git a/Telegram/SourceFiles/menu/menu_sponsored.cpp b/Telegram/SourceFiles/menu/menu_sponsored.cpp index 83340bcb03..debcbeac8b 100644 --- a/Telegram/SourceFiles/menu/menu_sponsored.cpp +++ b/Telegram/SourceFiles/menu/menu_sponsored.cpp @@ -248,7 +248,8 @@ void AboutBox( auto button = object_ptr( box, tr::lng_box_ok(), - st::defaultActiveButton); + st::defaultActiveButton, + Ui::RoundButtonTextToUpper); button->resizeToWidth(box->width() - st.buttonPadding.left() - st.buttonPadding.left()); diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp index 4f1251c9b3..dd7c1063cb 100644 --- a/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp @@ -141,15 +141,14 @@ void VerifyBox::setupControls( object_ptr( _content, tr::lng_intro_fragment_button(), - st::fragmentBoxButton), + st::fragmentBoxButton, + Ui::RoundButtonTextNoTransform), small); _content->widthValue( ) | rpl::on_next([=](int w) { button->setFullWidth(w - small.left() - small.right()); }, button->lifetime()); button->setClickedCallback([=] { ::File::OpenUrl(openUrl); }); - button->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); } if (resend) { auto link = TextWithEntities{ tr::lng_cloud_password_resend(tr::now) }; @@ -237,7 +236,8 @@ PanelEditContact::PanelEditContact( , _done( this, tr::lng_passport_save_value(), - st::passportPanelSaveValue) { + st::passportPanelSaveValue, + Ui::RoundButtonTextToUpper) { setupControls(data, existing); } diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp index e8da525cb8..830a497b0a 100644 --- a/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp @@ -221,7 +221,8 @@ PanelEditDocument::PanelEditDocument( , _done( this, tr::lng_passport_save_value(), - st::passportPanelSaveValue) { + st::passportPanelSaveValue, + Ui::RoundButtonTextToUpper) { setupControls( &error, &data, @@ -247,7 +248,8 @@ PanelEditDocument::PanelEditDocument( , _done( this, tr::lng_passport_save_value(), - st::passportPanelSaveValue) { + st::passportPanelSaveValue, + Ui::RoundButtonTextToUpper) { setupControls( nullptr, nullptr, @@ -270,7 +272,8 @@ PanelEditDocument::PanelEditDocument( , _done( this, tr::lng_passport_save_value(), - st::passportPanelSaveValue) { + st::passportPanelSaveValue, + Ui::RoundButtonTextToUpper) { setupControls(&error, &data, nullptr, nullptr, {}, {}, {}); } diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp index fcc631ce66..6d43841ee1 100644 --- a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp @@ -326,7 +326,8 @@ ScanButton::ScanButton( object_ptr( this, tr::lng_passport_delete_scan_undo(), - _st.restore)) { + _st.restore, + Ui::RoundButtonTextToUpper)) { _delete->toggle(!deleted, anim::type::instant); _restore->toggle(deleted, anim::type::instant); } diff --git a/Telegram/SourceFiles/passport/passport_panel_form.cpp b/Telegram/SourceFiles/passport/passport_panel_form.cpp index 4710c4a1ba..5ddb2f1aef 100644 --- a/Telegram/SourceFiles/passport/passport_panel_form.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_form.cpp @@ -40,7 +40,8 @@ PanelForm::PanelForm( , _submit( this, tr::lng_passport_authorize(), - st::passportPanelAuthorize) { + st::passportPanelAuthorize, + Ui::RoundButtonTextToUpper) { setupControls(); } diff --git a/Telegram/SourceFiles/passport/passport_panel_password.cpp b/Telegram/SourceFiles/passport/passport_panel_password.cpp index 1df93f51ec..b60ccd9da3 100644 --- a/Telegram/SourceFiles/passport/passport_panel_password.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_password.cpp @@ -47,7 +47,7 @@ PanelAskPassword::PanelAskPassword( this, st::defaultInputField, tr::lng_passport_password_placeholder()) -, _submit(this, tr::lng_passport_next(), st::passportPasswordSubmit) +, _submit(this, tr::lng_passport_next(), st::passportPasswordSubmit, Ui::RoundButtonTextToUpper) , _forgot(this, tr::lng_signin_recover(tr::now), st::defaultLinkButton) { connect(_password, &Ui::PasswordInput::submitted, this, [=] { submit(); @@ -227,7 +227,8 @@ void PanelNoPassword::refreshBottom() { object_ptr( _inner, tr::lng_passport_password_create(), - st::defaultBoxButton), + st::defaultBoxButton, + Ui::RoundButtonTextToUpper), style::al_top); button->addClickHandler([=] { _controller->setupPassword(); @@ -240,18 +241,16 @@ void PanelNoPassword::refreshBottom() { const auto cancel = Ui::CreateChild( container, tr::lng_cancel(), - st::defaultBoxButton); - cancel->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultBoxButton, + Ui::RoundButtonTextNoTransform); cancel->addClickHandler([=] { _controller->cancelPasswordSubmit(); }); const auto validate = Ui::CreateChild( container, tr::lng_passport_email_validate(), - st::defaultBoxButton); - validate->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultBoxButton, + Ui::RoundButtonTextNoTransform); validate->addClickHandler([=] { _controller->validateRecoveryEmail(); }); diff --git a/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp b/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp index 7dbcbee985..05e93e9e7d 100644 --- a/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp @@ -216,11 +216,13 @@ EditCard::EditCard( , _submit( this, tr::lng_about_done(), - st::paymentsPanelButton) + st::paymentsPanelButton, + RoundButtonTextToUpper) , _cancel( this, tr::lng_cancel(), - st::paymentsPanelButton) { + st::paymentsPanelButton, + RoundButtonTextToUpper) { setupControls(); } diff --git a/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp b/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp index 7f15574587..fe5c8261cb 100644 --- a/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp @@ -47,11 +47,13 @@ EditInformation::EditInformation( , _submit( this, tr::lng_settings_save(), - st::paymentsPanelButton) + st::paymentsPanelButton, + RoundButtonTextToUpper) , _cancel( this, tr::lng_cancel(), - st::paymentsPanelButton) { + st::paymentsPanelButton, + RoundButtonTextToUpper) { setupControls(); } diff --git a/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp b/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp index 00e5ec49eb..9718e67499 100644 --- a/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp @@ -83,13 +83,15 @@ FormSummary::FormSummary( tr::lng_payments_pay_amount( lt_amount, rpl::single(formatAmount(computeTotalAmount()))), - st::paymentsPanelSubmit)) + st::paymentsPanelSubmit, + RoundButtonTextNoTransform)) , _cancel( this, (_invoice.receipt.paid ? tr::lng_about_done() : tr::lng_cancel()), - st::paymentsPanelButton) + st::paymentsPanelButton, + RoundButtonTextNoTransform) , _tipLightBg(TransparentColor(st::paymentsTipActive, kLightOpacity)) , _tipLightRipple( TransparentColor(st::paymentsTipActive, kLightRippleOpacity)) @@ -170,13 +172,10 @@ void FormSummary::setupControls() { setupContent(_layout.get()); if (_submit) { - _submit->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); _submit->addClickHandler([=] { _delegate->panelSubmit(); }); } - _cancel->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); _cancel->addClickHandler([=] { _delegate->panelRequestClose(); }); @@ -398,7 +397,8 @@ void FormSummary::setupSuggestedTips(not_null layout) { .widget = CreateChild( outer, rpl::single(formatAmount(amount, true)), - st), + st, + RoundButtonTextNoTransform), }); auto &button = state->buttons.back(); button.widget->show(); diff --git a/Telegram/SourceFiles/settings/cloud_password/settings_cloud_password_common.cpp b/Telegram/SourceFiles/settings/cloud_password/settings_cloud_password_common.cpp index b9917e268b..1f2ce04990 100644 --- a/Telegram/SourceFiles/settings/cloud_password/settings_cloud_password_common.cpp +++ b/Telegram/SourceFiles/settings/cloud_password/settings_cloud_password_common.cpp @@ -229,10 +229,10 @@ not_null AddDoneButton( object_ptr( content, std::move(text), - st::changePhoneButton), + st::changePhoneButton, + Ui::RoundButtonTextNoTransform), st::settingLocalPasscodeButtonPadding, style::al_top); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); return button; } diff --git a/Telegram/SourceFiles/settings/sections/settings_credits.cpp b/Telegram/SourceFiles/settings/sections/settings_credits.cpp index 942f63d67a..21b9fc0b56 100644 --- a/Telegram/SourceFiles/settings/sections/settings_credits.cpp +++ b/Telegram/SourceFiles/settings/sections/settings_credits.cpp @@ -496,7 +496,8 @@ void Credits::setupContent() { object_ptr( content, nullptr, - st::creditsSettingsBigBalanceButton), + st::creditsSettingsBigBalanceButton, + Ui::RoundButtonTextNoTransform), st::boxRowPadding, style::al_top); button->setContext([&]() -> Ui::Text::MarkedContext { @@ -534,7 +535,6 @@ void Credits::setupContent() { lt_emoji, rpl::single(Ui::Text::SingleCustomEmoji(u"+"_q)), tr::marked))); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); const auto show = controller()->uiShow(); if (isCurrency) { const auto url = tr::lng_suggest_low_ton_fragment_url(tr::now); @@ -866,7 +866,8 @@ void BuildCurrencyWithdrawalSection( object_ptr( container, rpl::never(), - stButton), + stButton, + Ui::RoundButtonTextToUpper), st::boxRowPadding, style::al_top); diff --git a/Telegram/SourceFiles/settings/sections/settings_folders.cpp b/Telegram/SourceFiles/settings/sections/settings_folders.cpp index 952c17ad41..d19dcfb1ed 100644 --- a/Telegram/SourceFiles/settings/sections/settings_folders.cpp +++ b/Telegram/SourceFiles/settings/sections/settings_folders.cpp @@ -180,15 +180,14 @@ FilterRowButton::FilterRowButton( : RippleButton(parent, st::defaultRippleAnimation) , _session(session) , _remove(this, st::filtersRemove) -, _restore(this, tr::lng_filters_restore(), st::settingsFilterAddRecommended) +, _restore(this, tr::lng_filters_restore(), st::settingsFilterAddRecommended, Ui::RoundButtonTextNoTransform) , _add( this, tr::lng_filters_recommended_add(), - st::settingsFilterAddRecommended) + st::settingsFilterAddRecommended, + Ui::RoundButtonTextNoTransform) , _state(description.isEmpty() ? State::Normal : State::Suggested) { - _restore.setTextTransform(Ui::RoundButton::TextTransform::NoTransform); _restore.setFullRadius(true); - _add.setTextTransform(Ui::RoundButton::TextTransform::NoTransform); _add.setFullRadius(true); setup(filter, description.isEmpty() ? ComputeCountString(session, filter) diff --git a/Telegram/SourceFiles/settings/sections/settings_local_passcode.cpp b/Telegram/SourceFiles/settings/sections/settings_local_passcode.cpp index 7b44182a85..2bcc29a511 100644 --- a/Telegram/SourceFiles/settings/sections/settings_local_passcode.cpp +++ b/Telegram/SourceFiles/settings/sections/settings_local_passcode.cpp @@ -209,10 +209,10 @@ void LocalPasscodeEnter::setupContent() { : isCheck ? tr::lng_passcode_check_button() : tr::lng_passcode_change_button()), - st::changePhoneButton), + st::changePhoneButton, + Ui::RoundButtonTextNoTransform), st::settingLocalPasscodeButtonPadding, style::al_top); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); button->setClickedCallback([=] { const auto newText = newPasscode->text(); const auto reenterText = reenterPasscode diff --git a/Telegram/SourceFiles/settings/sections/settings_main.cpp b/Telegram/SourceFiles/settings/sections/settings_main.cpp index b8d8bb7fcd..fa48873808 100644 --- a/Telegram/SourceFiles/settings/sections/settings_main.cpp +++ b/Telegram/SourceFiles/settings/sections/settings_main.cpp @@ -852,8 +852,8 @@ void SetupValidatePhoneNumberSuggestion( const auto yes = Ui::CreateChild( wrap, tr::lng_box_yes(), - st::inviteLinkButton); - yes->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::inviteLinkButton, + Ui::RoundButtonTextNoTransform); yes->setClickedCallback([=] { controller->session().promoSuggestions().dismiss( kSugValidatePhone.utf8()); @@ -862,8 +862,8 @@ void SetupValidatePhoneNumberSuggestion( const auto no = Ui::CreateChild( wrap, tr::lng_box_no(), - st::inviteLinkButton); - no->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::inviteLinkButton, + Ui::RoundButtonTextNoTransform); no->setClickedCallback([=] { const auto sharedLabel = std::make_shared>(); const auto height = st::boxLabel.style.font->height; @@ -954,8 +954,8 @@ void SetupValidatePasswordSuggestion( const auto yes = Ui::CreateChild( wrap, tr::lng_settings_suggestion_password_yes(), - st::inviteLinkButton); - yes->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::inviteLinkButton, + Ui::RoundButtonTextNoTransform); yes->setClickedCallback([=] { controller->session().promoSuggestions().dismiss( Data::PromoSuggestions::SugValidatePassword()); @@ -964,8 +964,8 @@ void SetupValidatePasswordSuggestion( const auto no = Ui::CreateChild( wrap, tr::lng_settings_suggestion_password_no(), - st::inviteLinkButton); - no->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::inviteLinkButton, + Ui::RoundButtonTextNoTransform); no->setClickedCallback([=] { showOther(Settings::CloudPasswordSuggestionInputId()); }); diff --git a/Telegram/SourceFiles/settings/sections/settings_passkeys.cpp b/Telegram/SourceFiles/settings/sections/settings_passkeys.cpp index f762a3a0df..bc3f869d4c 100644 --- a/Telegram/SourceFiles/settings/sections/settings_passkeys.cpp +++ b/Telegram/SourceFiles/settings/sections/settings_passkeys.cpp @@ -453,9 +453,9 @@ void PasskeysNoneBox( canRegister ? tr::lng_settings_passkeys_none_button() : tr::lng_settings_passkeys_none_button_unsupported(), - st::defaultActiveButton); + st::defaultActiveButton, + Ui::RoundButtonTextNoTransform); const auto createButton = button.data(); - button->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); button->resizeToWidth(box->width() - st.buttonPadding.left() - st.buttonPadding.left()); diff --git a/Telegram/SourceFiles/settings/sections/settings_premium.cpp b/Telegram/SourceFiles/settings/sections/settings_premium.cpp index b3f606f975..3cde34a72b 100644 --- a/Telegram/SourceFiles/settings/sections/settings_premium.cpp +++ b/Telegram/SourceFiles/settings/sections/settings_premium.cpp @@ -1937,11 +1937,13 @@ not_null CreateLockedButton( not_null parent, rpl::producer text, const style::RoundButton &st, + Ui::RoundButtonTextTransform transform, rpl::producer locked) { const auto result = Ui::CreateChild( parent.get(), rpl::single(QString()), - st); + st, + transform); const auto labelSt = result->lifetime().make_state( st::defaultFlatLabel); diff --git a/Telegram/SourceFiles/settings/sections/settings_premium.h b/Telegram/SourceFiles/settings/sections/settings_premium.h index 894e07c352..275234bb42 100644 --- a/Telegram/SourceFiles/settings/sections/settings_premium.h +++ b/Telegram/SourceFiles/settings/sections/settings_premium.h @@ -17,6 +17,10 @@ namespace style { struct RoundButton; } // namespace style +namespace Ui { +enum class RoundButtonTextTransform : uchar; +} // namespace Ui + namespace ChatHelpers { class Show; } // namespace ChatHelpers @@ -93,6 +97,7 @@ struct SubscribeButtonArgs final { not_null parent, rpl::producer text, const style::RoundButton &st, + Ui::RoundButtonTextTransform transform, rpl::producer locked); [[nodiscard]] not_null CreateSubscribeButton( diff --git a/Telegram/SourceFiles/settings/settings_credits_graphics.cpp b/Telegram/SourceFiles/settings/settings_credits_graphics.cpp index c2d14bf90a..9a15348c94 100644 --- a/Telegram/SourceFiles/settings/settings_credits_graphics.cpp +++ b/Telegram/SourceFiles/settings/settings_credits_graphics.cpp @@ -3340,14 +3340,14 @@ void AddWithdrawalWidget( const auto button = Ui::CreateChild( buttonsContainer, rpl::never(), - stButton); + stButton, + Ui::RoundButtonTextToUpper); const auto buttonCredits = Ui::CreateChild( buttonsContainer, tr::lng_bot_earn_balance_button_buy_ads(), - stButton); - buttonCredits->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + stButton, + Ui::RoundButtonTextNoTransform); { const auto icon = Ui::CreateChild(buttonCredits); const auto &st = st::msgBotKbUrlIcon; diff --git a/Telegram/SourceFiles/statistics/chart_widget.cpp b/Telegram/SourceFiles/statistics/chart_widget.cpp index 0c85b9f4a3..f66738036f 100644 --- a/Telegram/SourceFiles/statistics/chart_widget.cpp +++ b/Telegram/SourceFiles/statistics/chart_widget.cpp @@ -1319,13 +1319,12 @@ void ChartWidget::processLocalZoom(int xIndex) { const auto zoomOutButton = Ui::CreateChild( header, tr::lng_stats_zoom_out(), - st::statisticsHeaderButton); + st::statisticsHeaderButton, + Ui::RoundButtonTextNoTransform); zoomOutButton->moveToRight( 0, (header->height() - zoomOutButton->height()) / 2); zoomOutButton->show(); - zoomOutButton->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); zoomOutButton->setClickedCallback([=] { auto lifetime = _localZoomLifetime.make_state(); const auto animation = lifetime->make_state(); @@ -1533,9 +1532,8 @@ void ChartWidget::setZoomedChartData( const auto zoomOutButton = Ui::CreateChild( customHeader, tr::lng_stats_zoom_out(), - st::statisticsHeaderButton); - zoomOutButton->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::statisticsHeaderButton, + Ui::RoundButtonTextNoTransform); zoomOutButton->moveToRight( 0, (customHeader->height() - zoomOutButton->height()) / 2); diff --git a/Telegram/SourceFiles/ui/boxes/collectible_info_box.cpp b/Telegram/SourceFiles/ui/boxes/collectible_info_box.cpp index 22ab7e05db..8cb102aa14 100644 --- a/Telegram/SourceFiles/ui/boxes/collectible_info_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/collectible_info_box.cpp @@ -230,9 +230,9 @@ void CollectibleInfoBox( object_ptr( box, tr::lng_collectible_learn_more(), - st::collectibleMore), + st::collectibleMore, + RoundButtonTextNoTransform), st::collectibleMorePadding); - more->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); more->setClickedCallback([url = info.url] { File::OpenUrl(url); }); @@ -243,9 +243,9 @@ void CollectibleInfoBox( auto owned = object_ptr( box, phrase(), - st::collectibleCopy); + st::collectibleCopy, + RoundButtonTextNoTransform); const auto copy = owned.data(); - copy->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); copy->setClickedCallback([copyCallback] { copyCallback(true); }); diff --git a/Telegram/SourceFiles/ui/boxes/confirm_phone_box.cpp b/Telegram/SourceFiles/ui/boxes/confirm_phone_box.cpp index ec309d5ea6..8b95730179 100644 --- a/Telegram/SourceFiles/ui/boxes/confirm_phone_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/confirm_phone_box.cpp @@ -32,10 +32,9 @@ ConfirmPhoneBox::ConfirmPhoneBox( _fragment.create( this, tr::lng_intro_fragment_button(), - st::fragmentBoxButton); + st::fragmentBoxButton, + RoundButtonTextNoTransform); _fragment->setClickedCallback([=] { File::OpenUrl(openUrl); }); - _fragment->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); } if (timeout) { _call.setStatus({ Ui::SentCodeCall::State::Waiting, *timeout }); diff --git a/Telegram/SourceFiles/ui/boxes/emoji_stake_box.cpp b/Telegram/SourceFiles/ui/boxes/emoji_stake_box.cpp index 1cb6d28242..3969f0a86c 100644 --- a/Telegram/SourceFiles/ui/boxes/emoji_stake_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/emoji_stake_box.cpp @@ -386,7 +386,8 @@ void AddStakePresets( const auto button = CreateChild( wrap, rpl::single(FormatTonAmount(nanoTon).full + diamond), - st::stakePresetButton); + st::stakePresetButton, + RoundButtonTextToUpper); button->setClickedCallback([=] { callback(nanoTon); }); diff --git a/Telegram/SourceFiles/ui/boxes/show_or_premium_box.cpp b/Telegram/SourceFiles/ui/boxes/show_or_premium_box.cpp index 0cc7c8faeb..c2cb37d0d5 100644 --- a/Telegram/SourceFiles/ui/boxes/show_or_premium_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/show_or_premium_box.cpp @@ -157,9 +157,9 @@ void ShowOrPremiumBox( object_ptr( box, std::move(skin.showButton), - st::showOrShowButton), + st::showOrShowButton, + RoundButtonTextNoTransform), buttonPadding); - show->setTextTransform(RoundButton::TextTransform::NoTransform); box->addRow( MakeShowOrLabel(box, std::move(skin.orPremium)), st::showOrLabelPadding + buttonPadding, diff --git a/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp b/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp index 3a0924e134..8cbb19fc1f 100644 --- a/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp +++ b/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp @@ -291,13 +291,13 @@ void ChooseThemeController::initButtons() { const auto apply = CreateChild( controls, tr::lng_chat_theme_apply(), - st::defaultLightButton); - apply->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::defaultLightButton, + RoundButtonTextNoTransform); const auto choose = CreateChild( controls, tr::lng_chat_theme_change_wallpaper(), - st::defaultLightButton); - choose->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); + st::defaultLightButton, + RoundButtonTextNoTransform); const auto &margin = st::chatThemeButtonMargin; controls->resize( diff --git a/Telegram/SourceFiles/ui/chat/group_call_bar.cpp b/Telegram/SourceFiles/ui/chat/group_call_bar.cpp index d8740e3be6..3adb8cd65a 100644 --- a/Telegram/SourceFiles/ui/chat/group_call_bar.cpp +++ b/Telegram/SourceFiles/ui/chat/group_call_bar.cpp @@ -190,8 +190,8 @@ void GroupCallBar::refreshScheduledProcess() { _join = std::make_unique( _inner.get(), tr::lng_group_call_join(), - st::groupCallTopBarJoin); - _join->setTextTransform(RoundButton::TextTransform::NoTransform); + st::groupCallTopBarJoin, + RoundButtonTextNoTransform); setupRightButton(_join.get()); } } else if (!_scheduledProcess) { @@ -200,7 +200,8 @@ void GroupCallBar::refreshScheduledProcess() { _open = std::make_unique( _inner.get(), _scheduledProcess->text(GroupCallScheduledLeft::Negative::Show), - st::groupCallTopBarOpen); + st::groupCallTopBarOpen, + RoundButtonTextToUpper); setupRightButton(_open.get()); _open->widthValue( ) | rpl::on_next([=] { diff --git a/Telegram/SourceFiles/ui/controls/filter_link_header.cpp b/Telegram/SourceFiles/ui/controls/filter_link_header.cpp index e525783116..11af7d696a 100644 --- a/Telegram/SourceFiles/ui/controls/filter_link_header.cpp +++ b/Telegram/SourceFiles/ui/controls/filter_link_header.cpp @@ -494,7 +494,7 @@ object_ptr FilterLinkProcessButton( rpl::producer badge) { const auto st = &st::filterInviteBox.button; const auto badgeSt = &st::filterInviteButtonBadgeStyle; - auto result = object_ptr(parent, rpl::single(u""_q), *st); + auto result = object_ptr(parent, rpl::single(u""_q), *st, RoundButtonTextToUpper); struct Data { TextWithEntities text; diff --git a/Telegram/SourceFiles/ui/controls/invite_link_buttons.cpp b/Telegram/SourceFiles/ui/controls/invite_link_buttons.cpp index 83da0bc972..e000e65614 100644 --- a/Telegram/SourceFiles/ui/controls/invite_link_buttons.cpp +++ b/Telegram/SourceFiles/ui/controls/invite_link_buttons.cpp @@ -41,14 +41,14 @@ void AddCopyShareLinkButtons( const auto copy = CreateChild( wrap, tr::lng_group_invite_copy(), - st::inviteLinkCopy); - copy->setTextTransform(RoundButton::TextTransform::NoTransform); + st::inviteLinkCopy, + RoundButtonTextNoTransform); copy->setClickedCallback(copyLink); const auto share = CreateChild( wrap, tr::lng_group_invite_share(), - st::inviteLinkShare); - share->setTextTransform(RoundButton::TextTransform::NoTransform); + st::inviteLinkShare, + RoundButtonTextNoTransform); share->setClickedCallback(shareLink); wrap->widthValue( @@ -69,9 +69,9 @@ void AddReactivateLinkButton( object_ptr( container, tr::lng_group_invite_reactivate(), - st::inviteLinkReactivate), + st::inviteLinkReactivate, + RoundButtonTextNoTransform), st::inviteLinkButtonsPadding); - button->setTextTransform(RoundButton::TextTransform::NoTransform); button->setClickedCallback(editLink); } @@ -82,9 +82,9 @@ void AddDeleteLinkButton( object_ptr( container, tr::lng_group_invite_delete(), - st::inviteLinkDelete), + st::inviteLinkDelete, + RoundButtonTextNoTransform), st::inviteLinkButtonsPadding); - button->setTextTransform(RoundButton::TextTransform::NoTransform); button->setClickedCallback(deleteLink); } diff --git a/Telegram/SourceFiles/ui/controls/location_picker.cpp b/Telegram/SourceFiles/ui/controls/location_picker.cpp index 0bd6ffbbc7..0c0d3284c8 100644 --- a/Telegram/SourceFiles/ui/controls/location_picker.cpp +++ b/Telegram/SourceFiles/ui/controls/location_picker.cpp @@ -686,9 +686,9 @@ not_null SetupMapPlaceholder( const auto button = CreateChild( result, tr::lng_maps_select_on_map(), - st::pickLocationChooseOnMap); + st::pickLocationChooseOnMap, + RoundButtonTextNoTransform); button->setFullRadius(true); - button->setTextTransform(RoundButton::TextTransform::NoTransform); button->setClickedCallback(choose); parent->sizeValue() | rpl::on_next([=](QSize size) { diff --git a/Telegram/SourceFiles/ui/controls/table_rows.cpp b/Telegram/SourceFiles/ui/controls/table_rows.cpp index 78054e3020..6535c2e775 100644 --- a/Telegram/SourceFiles/ui/controls/table_rows.cpp +++ b/Telegram/SourceFiles/ui/controls/table_rows.cpp @@ -109,8 +109,8 @@ ValueWithSmallButton MakeValueWithSmallButton( const auto button = CreateChild( raw, std::move(buttonText), - table->st().smallButton); - button->setTextTransform(RoundButton::TextTransform::NoTransform); + table->st().smallButton, + RoundButtonTextNoTransform); if (handler) { button->setClickedCallback([button, handler = std::move(handler)] { handler(button); diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index adddbb7041..eb1b8f2e4a 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -660,7 +660,7 @@ Notification::Notification( , _forwardedCount(forwardedCount) , _fromScheduled(fromScheduled) , _close(this, st::notifyClose) -, _reply(this, tr::lng_notification_reply(), st::defaultBoxButton) { +, _reply(this, tr::lng_notification_reply(), st::defaultBoxButton, Ui::RoundButtonTextToUpper) { Lang::Updated( ) | rpl::on_next([=] { refreshLang(); diff --git a/Telegram/SourceFiles/window/themes/window_theme_warning.cpp b/Telegram/SourceFiles/window/themes/window_theme_warning.cpp index bb53332f7f..1549453027 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_warning.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_warning.cpp @@ -29,12 +29,9 @@ WarningWidget::WarningWidget(QWidget *parent) : RpWidget(parent) , _timer([=] { handleTimer(); }) , _secondsLeft(kWaitBeforeRevertMs / 1000) -, _keepChanges(this, tr::lng_theme_keep_changes(), st::defaultBoxButton) -, _revert(this, tr::lng_theme_revert(), st::defaultBoxButton) { - using TextTransform = Ui::RoundButton::TextTransform; - _keepChanges->setTextTransform(TextTransform::NoTransform); +, _keepChanges(this, tr::lng_theme_keep_changes(), st::defaultBoxButton, Ui::RoundButtonTextNoTransform) +, _revert(this, tr::lng_theme_revert(), st::defaultBoxButton, Ui::RoundButtonTextNoTransform) { _keepChanges->setClickedCallback([] { KeepApplied(); }); - _revert->setTextTransform(TextTransform::NoTransform); _revert->setClickedCallback([] { Revert(); }); updateText(); } diff --git a/Telegram/SourceFiles/window/window_lock_widgets.cpp b/Telegram/SourceFiles/window/window_lock_widgets.cpp index 13160a7763..bf7b9b5118 100644 --- a/Telegram/SourceFiles/window/window_lock_widgets.cpp +++ b/Telegram/SourceFiles/window/window_lock_widgets.cpp @@ -98,12 +98,10 @@ PasscodeLockWidget::PasscodeLockWidget( not_null window) : LockWidget(parent, window) , _passcode(this, st::passcodeInput, tr::lng_passcode_ph()) -, _submit(this, tr::lng_passcode_submit(), st::passcodeSubmit) +, _submit(this, tr::lng_passcode_submit(), st::passcodeSubmit, Ui::RoundButtonTextNoTransform) , _logout(this, tr::lng_passcode_logout(tr::now)) { connect(_passcode, &Ui::MaskedInputField::changed, [=] { changed(); }); connect(_passcode, &Ui::MaskedInputField::submitted, [=] { submit(); }); - - _submit->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); _submit->setClickedCallback([=] { submit(); }); _logout->setClickedCallback([=] { window->showLogoutConfirmation(); diff --git a/Telegram/SourceFiles/window/window_setup_email.cpp b/Telegram/SourceFiles/window/window_setup_email.cpp index f7f7b2ec84..877a94e0bf 100644 --- a/Telegram/SourceFiles/window/window_setup_email.cpp +++ b/Telegram/SourceFiles/window/window_setup_email.cpp @@ -125,9 +125,8 @@ SetupEmailLockWidget::SetupEmailLockWidget( _logoutButton = object_ptr( this, tr::lng_settings_logout(), - st::defaultBoxButton); - _logoutButton->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultBoxButton, + Ui::RoundButtonTextNoTransform); if (session) { session->promoSuggestions().setSetupEmailState( Data::SetupEmailState::SettingUpNoSkip); @@ -151,9 +150,8 @@ SetupEmailLockWidget::SetupEmailLockWidget( _debugButton = object_ptr( this, rpl::single(u"[DEBUG] Clear bio"_q), - st::defaultBoxButton); - _debugButton->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); + st::defaultBoxButton, + Ui::RoundButtonTextNoTransform); _debugButton->setClickedCallback([=] { session->api().saveSelfBio({}); }); @@ -227,11 +225,10 @@ SetupEmailLockWidget::SetupEmailLockWidget( object_ptr( _layout, tr::lng_settings_cloud_login_email_confirm(), - st::changePhoneButton), + st::changePhoneButton, + Ui::RoundButtonTextNoTransform), st::boxRowPadding, style::al_top); - submit->setTextTransform( - Ui::RoundButton::TextTransform::NoTransform); _emailInput = emailInput; _errorLabel = errorLabel; diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 801ce21201..d43113e6bb 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 801ce2120114011d59c9da72fe9751b4b1d182d5 +Subproject commit d43113e6bb3508a97154ffebc3c1744fdfd2a6a3