diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index dc5161a5b..6bf7641e4 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -4445,6 +4445,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL // AyuGram keys generated "ayu_AyuPreferences" = "AyuGram Preferences"; +"ayu_DocsText" = "Documentation"; "ayu_GhostEssentialsHeader" = "Ghost essentials"; "ayu_DontReadMessages" = "Don't read messages"; "ayu_DontReadStories" = "Don't read stories"; @@ -4505,6 +4506,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ayu_EnableExpression" = "Enable expression"; "ayu_CaseInsensitiveExpression" = "Case insensitive expression"; "ayu_RegexFiltersAddError" = "Regex syntax error"; +"ayu_RegexFilterQuickAdd" = "Add filter"; "ayu_AyuSyncHeader" = "AyuSync"; "ayu_AyuSyncStatusTitle" = "Sync status"; "ayu_AyuSyncStatusOk" = "connected"; @@ -4527,7 +4529,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ayu_AyuSyncDownloadAgent" = "Download agent"; "ayu_IconDefault" = "Default"; "ayu_IconAlternative" = "AyuGram Alt"; +"ayu_IconDiscord" = "Discord"; +"ayu_IconSpotify" = "Spotify"; +"ayu_IconExtera" = "extera"; "ayu_IconNothing" = "Nothing"; +"ayu_IconBard" = "Google Bard"; +"ayu_IconYaPlus" = "Yandex Plus"; "ayu_WALMode" = "Enable WAL mode"; "ayu_PushNotificationCount" = "FCM notifications received"; "ayu_ClearAyuDatabase" = "Clear Ayu Database"; @@ -4554,8 +4561,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ayu_DisableStreamerModeTray" = "Disable Streamer Mode"; "ayu_EditsHistoryTitle" = "Edits history"; "ayu_EditsHistoryMenuText" = "History"; +"ayu_PeekOnlineMenuText" = "Peek Online"; "ayu_ClearDeletedMenuText" = "Clear Deleted"; "ayu_ViewFiltersMenuText" = "View Filters"; +"ayu_PeekOnlineSuccess" = "Peeked via"; "ayu_OneViewTTL" = "one view"; "ayu_ReadUntilMenuText" = "Read Message"; "ayu_DeleteKeepLocally" = "Keep locally"; @@ -4566,11 +4575,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ayu_ClearDeletedMessagesText" = "Are you sure you want to clear all deleted messages in this chat?"; "ayu_ClearDeletedMessagesActionText" = "Clear"; "ayu_SuggestGhostModeTitle" = "Ghost Mode"; -"ayu_SuggestGhostModeStoryText" = "Do you want to enable Ghost Mode before viewing the story?"; -"ayu_SuggestGhostModeStoryActionText" = "Enable"; +"ayu_SuggestGhostModeStoryText" = "Do you want to enable **Ghost Mode** before viewing the story?"; +"ayu_SuggestGhostModeStoryActionTextYes" = "Yes"; +"ayu_SuggestGhostModeStoryActionTextNo" = "No"; "ayu_HideNextViewsDescriptionAyu" = "Hide my views forever, until Ghost Mode disabled."; "ayu_EnableGhostModeStories" = "Enable Ghost Mode"; "ayu_GhostModeIsActive" = "Ghost Mode Is Active"; +"ayu_SimpleQuotesAndReplies" = "Simple quotes & replies"; "ayu_MainFont" = "Application font"; "ayu_MonospaceFont" = "Monospace font"; "ayu_FontDefault" = "Default"; @@ -4580,6 +4591,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ayu_AyuForwardForwardingDescription" = "Please keep this window open while AyuGram is forwarding your messages."; "ayu_AyuForwardLoadingMediaDescription" = "Please keep this window open while AyuGram is downloading media from your messages."; "ayu_DeleteDateMenuText" = "Delete Date"; +"ayu_ForwardableMenuText" = "Forwardable"; +"ayu_ForwardableMenuTextNo" = "No"; "ayu_LikelyOfflineStatus" = "offline ?"; "ayu_GhostModeShortcut" = "Enter with Ghost"; "ayu_SettingsShowMessageSeconds" = "Show message seconds"; diff --git a/Telegram/SourceFiles/ayu/ayu_settings.cpp b/Telegram/SourceFiles/ayu/ayu_settings.cpp index d10fd1825..7e3fc0934 100644 --- a/Telegram/SourceFiles/ayu/ayu_settings.cpp +++ b/Telegram/SourceFiles/ayu/ayu_settings.cpp @@ -265,6 +265,10 @@ void AyuGramSettings::set_appIcon(QString val) appIcon = std::move(val); } +void AyuGramSettings::set_simpleQuotesAndReplies(bool val) { + simpleQuotesAndReplies = val; +} + void AyuGramSettings::set_deletedMark(QString val) { deletedMark = std::move(val); diff --git a/Telegram/SourceFiles/ayu/ayu_settings.h b/Telegram/SourceFiles/ayu/ayu_settings.h index 5ca57def4..e5d3802f7 100644 --- a/Telegram/SourceFiles/ayu/ayu_settings.h +++ b/Telegram/SourceFiles/ayu/ayu_settings.h @@ -60,6 +60,7 @@ public: // ~ Customization appIcon = DEFAULT_ICON; + simpleQuotesAndReplies = true; deletedMark = "🧹"; editedMark = tr::lng_edited(tr::now); recentStickersCount = 20; @@ -100,6 +101,7 @@ public: bool localPremium; bool copyUsernameAsLink; QString appIcon; + bool simpleQuotesAndReplies; QString deletedMark; QString editedMark; int recentStickersCount; @@ -150,6 +152,8 @@ public: void set_appIcon(QString val); + void set_simpleQuotesAndReplies(bool val); + void set_deletedMark(QString val); void set_editedMark(QString val); diff --git a/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp b/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp index 9e5da14a2..2b9018195 100644 --- a/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp +++ b/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp @@ -800,6 +800,22 @@ void Ayu::SetupCustomization(not_null container, AyuSettings::save(); }, container->lifetime()); + AddButton( + container, + tr::ayu_SimpleQuotesAndReplies(), + st::settingsButtonNoIcon + )->toggleOn( + rpl::single(settings->simpleQuotesAndReplies) + )->toggledValue( + ) | rpl::filter([=](bool enabled) + { + return (enabled != settings->simpleQuotesAndReplies); + }) | start_with_next([=](bool enabled) + { + settings->set_simpleQuotesAndReplies(enabled); + AyuSettings::save(); + }, container->lifetime()); + AddButton( container, tr::ayu_ShowGhostToggleInDrawer(), diff --git a/Telegram/SourceFiles/history/view/history_view_reply.cpp b/Telegram/SourceFiles/history/view/history_view_reply.cpp index 6899a0832..6f67000ae 100644 --- a/Telegram/SourceFiles/history/view/history_view_reply.cpp +++ b/Telegram/SourceFiles/history/view/history_view_reply.cpp @@ -33,6 +33,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_chat.h" #include "styles/style_dialogs.h" +// AyuGram includes +#include "ayu/ayu_settings.h" + + namespace HistoryView { namespace { @@ -618,13 +622,15 @@ void Reply::paint( inBubble, colorIndexPlusOne)] : nullptr; - const auto rippleColor = cache->bg; + const auto rippleColor = cache->bg2; if (!inBubble) { cache->bg = QColor(0, 0, 0, 0); } Ui::Text::ValidateQuotePaintCache(*cache, quoteSt); Ui::Text::FillQuotePaint(p, rect, *cache, quoteSt); - if (backgroundEmoji) { + + const auto settings = &AyuSettings::getInstance(); + if (!settings->simpleQuotesAndReplies && backgroundEmoji) { ValidateBackgroundEmoji( backgroundEmojiId, backgroundEmoji, diff --git a/Telegram/SourceFiles/history/view/history_view_view_button.cpp b/Telegram/SourceFiles/history/view/history_view_view_button.cpp index 3d9142761..034b6f015 100644 --- a/Telegram/SourceFiles/history/view/history_view_view_button.cpp +++ b/Telegram/SourceFiles/history/view/history_view_view_button.cpp @@ -241,7 +241,7 @@ void ViewButton::draw( const auto radius = st::historyPagePreview.radius; if (_inner->ripple && !_inner->ripple->empty()) { - _inner->ripple->paint(p, r.left(), r.top(), r.width(), &cache->bg); + _inner->ripple->paint(p, r.left(), r.top(), r.width(), &cache->bg2); } PainterHighQualityEnabler hq(p); diff --git a/Telegram/SourceFiles/history/view/media/history_view_game.cpp b/Telegram/SourceFiles/history/view/media/history_view_game.cpp index 24ba5187c..e23269701 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_game.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_game.cpp @@ -228,7 +228,7 @@ void Game::draw(Painter &p, const PaintContext &context) const { Ui::Text::FillQuotePaint(p, outer, *cache, _st); if (_ripple) { - _ripple->paint(p, outer.x(), outer.y(), width(), &cache->bg); + _ripple->paint(p, outer.x(), outer.y(), width(), &cache->bg2); if (_ripple->empty()) { _ripple = nullptr; } diff --git a/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp b/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp index f65613ea3..dc43e10ec 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp @@ -372,7 +372,7 @@ void Giveaway::paintChannels( geometry.x(), geometry.y(), width(), - &cache->bg); + &cache->bg2); if (channel.ripple->empty()) { channel.ripple = nullptr; } diff --git a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp index c622585b9..a4c412259 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp @@ -530,7 +530,7 @@ void WebPage::draw(Painter &p, const PaintContext &context) const { Ui::Text::FillQuotePaint(p, outer, *cache, _st); if (_ripple) { - _ripple->paint(p, outer.x(), outer.y(), width(), &cache->bg); + _ripple->paint(p, outer.x(), outer.y(), width(), &cache->bg2); if (_ripple->empty()) { _ripple = nullptr; } diff --git a/Telegram/SourceFiles/ui/chat/chat_style.cpp b/Telegram/SourceFiles/ui/chat/chat_style.cpp index d85da4ec4..d1a0a99d8 100644 --- a/Telegram/SourceFiles/ui/chat/chat_style.cpp +++ b/Telegram/SourceFiles/ui/chat/chat_style.cpp @@ -17,6 +17,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_dialogs.h" #include "styles/style_widgets.h" +// AyuGram includes +#include "ayu/ayu_settings.h" + + namespace Ui { namespace { @@ -39,8 +43,14 @@ void EnsureBlockquoteCache( cache = std::make_unique(); const auto &colors = values(); cache->bg = colors.bg; + cache->bg2 = colors.bg; cache->outlines = colors.outlines; cache->icon = colors.name; + + const auto settings = &AyuSettings::getInstance(); + if (settings->simpleQuotesAndReplies) { + cache->bg = QColor(0, 0, 0, 0); + } } void EnsurePreCache( diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 5b079bd1b..f370fb3a0 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 5b079bd1bd6dcf1e55d9bba5aa1b5ff67b60e45c +Subproject commit f370fb3a0a3cc3de41291f8ad23d5a9746794744