From d2bd1091695dbd16af192f8c9f4e693a346d3af3 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 6 Sep 2023 14:24:32 +0300 Subject: [PATCH] Removed uppercase from some phrases in theme editor. --- .../SourceFiles/media/view/media_view_overlay_widget.cpp | 4 ++++ Telegram/SourceFiles/window/themes/window_theme_editor.cpp | 5 ++++- .../SourceFiles/window/themes/window_theme_editor_box.cpp | 2 +- Telegram/SourceFiles/window/themes/window_theme_preview.cpp | 6 ++---- Telegram/SourceFiles/window/themes/window_theme_warning.cpp | 3 +++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index 59ed41e35..3a142408f 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -3921,10 +3921,12 @@ 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); _themeApply->show(); _themeApply->setClickedCallback([=] { const auto &object = Background()->themeObject(); @@ -3941,6 +3943,7 @@ void OverlayWidget::initThemePreview() { _body, tr::lng_cancel(), st::themePreviewCancelButton); + _themeCancel->setTextTransform(TextTransform::NoTransform); _themeCancel->show(); _themeCancel->setClickedCallback([this] { close(); }); if (const auto slug = _themeCloudData.slug; !slug.isEmpty()) { @@ -3948,6 +3951,7 @@ void OverlayWidget::initThemePreview() { _body, tr::lng_theme_share(), st::themePreviewCancelButton); + _themeShare->setTextTransform(TextTransform::NoTransform); _themeShare->show(); _themeShare->setClickedCallback([=] { QGuiApplication::clipboard()->setText( diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp index 613006078..e7baf9c61 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp @@ -672,7 +672,10 @@ Editor::Editor( , _select(this, st::defaultMultiSelect, tr::lng_country_ph()) , _leftShadow(this) , _topShadow(this) -, _save(this, tr::lng_theme_editor_save_button(tr::now).toUpper(), st::dialogsUpdateButton) { +, _save( + this, + tr::lng_theme_editor_save_button(tr::now), + st::dialogsUpdateButton) { const auto path = EditingPalettePath(); _inner = _scroll->setOwnedWidget(object_ptr(this, path)); diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp index b45e02b69..e92ee6ed5 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp @@ -692,7 +692,7 @@ void CreateForExistingBox( box->addRow( object_ptr( box, - tr::lng_theme_editor_import_existing() | Ui::Text::ToUpper(), + tr::lng_theme_editor_import_existing(), st::createThemeImportButton), style::margins( 0, diff --git a/Telegram/SourceFiles/window/themes/window_theme_preview.cpp b/Telegram/SourceFiles/window/themes/window_theme_preview.cpp index 11878fd98..946649e12 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_preview.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_preview.cpp @@ -12,14 +12,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/platform_window_title.h" #include "ui/text/text_options.h" #include "ui/text/text_utilities.h" -#include "ui/image/image_prepare.h" #include "ui/empty_userpic.h" #include "ui/emoji_config.h" #include "ui/painter.h" #include "ui/chat/chat_theme.h" #include "ui/chat/chat_style.h" #include "ui/chat/message_bubble.h" -#include "ui/image/image_prepare.h" #include "styles/style_widgets.h" #include "styles/style_window.h" #include "styles/style_media_view.h" @@ -32,7 +30,7 @@ namespace Window { namespace Theme { namespace { -QString fillLetters(const QString &name) { +[[nodiscard]] QString FillLetters(const QString &name) { QList letters; QList levels; auto level = 0; @@ -237,7 +235,7 @@ void Generator::addRow( Row row; row.name.setText(st::msgNameStyle, name, Ui::NameTextOptions()); - row.letters = fillLetters(name); + row.letters = FillLetters(name); row.peerIndex = peerIndex; row.date = date; diff --git a/Telegram/SourceFiles/window/themes/window_theme_warning.cpp b/Telegram/SourceFiles/window/themes/window_theme_warning.cpp index 3b0624f0a..8323de02d 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_warning.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_warning.cpp @@ -31,7 +31,10 @@ WarningWidget::WarningWidget(QWidget *parent) , _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->setClickedCallback([] { KeepApplied(); }); + _revert->setTextTransform(TextTransform::NoTransform); _revert->setClickedCallback([] { Revert(); }); updateText(); }