Removed uppercase from some phrases in theme editor.

This commit is contained in:
23rd 2023-09-06 14:24:32 +03:00
parent 1b5b9f46d2
commit d2bd109169
5 changed files with 14 additions and 6 deletions

View File

@ -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(

View File

@ -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<Inner>(this, path));

View File

@ -692,7 +692,7 @@ void CreateForExistingBox(
box->addRow(
object_ptr<Ui::SettingsButton>(
box,
tr::lng_theme_editor_import_existing() | Ui::Text::ToUpper(),
tr::lng_theme_editor_import_existing(),
st::createThemeImportButton),
style::margins(
0,

View File

@ -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<QString> letters;
QList<int> 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;

View File

@ -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();
}