[Option][GUI] Big emoji outline
This commit is contained in:
parent
7d722824a6
commit
c36c9f1132
6 changed files with 27 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
|||
"ktg_mac_menu_show": "Show Kotatogram",
|
||||
"ktg_settings_kotato": "Kotatogram Settings",
|
||||
"ktg_settings_chats": "Chats",
|
||||
"ktg_settings_emoji_outline": "Big emoji outline",
|
||||
"ktg_fonts_title": "Fonts",
|
||||
"ktg_settings_fonts": "Change application fonts",
|
||||
"ktg_fonts_reset": "Reset",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "chat_helpers/stickers_emoji_image_loader.h"
|
||||
|
||||
#include "kotato/kotato_settings.h"
|
||||
#include "styles/style_chat.h"
|
||||
|
||||
namespace Stickers {
|
||||
|
|
@ -33,7 +34,9 @@ QImage EmojiImageLoader::prepare(EmojiPtr emoji) const {
|
|||
auto tinted = QImage(
|
||||
QSize(st::largeEmojiSize, st::largeEmojiSize) * factor,
|
||||
QImage::Format_ARGB32_Premultiplied);
|
||||
tinted.fill(Qt::white);
|
||||
tinted.fill(::Kotato::JsonSettings::GetBool("big_emoji_outline")
|
||||
? Qt::white
|
||||
: QColor(0, 0, 0, 0));
|
||||
if (loaded) {
|
||||
QPainter p(&tinted);
|
||||
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "chat_helpers/stickers_emoji_pack.h"
|
||||
|
||||
#include "kotato/kotato_settings.h"
|
||||
#include "chat_helpers/stickers_emoji_image_loader.h"
|
||||
#include "history/view/history_view_element.h"
|
||||
#include "history/history_item.h"
|
||||
|
|
@ -114,6 +115,13 @@ EmojiPack::EmojiPack(not_null<Main::Session*> session)
|
|||
refreshAll();
|
||||
}, _lifetime);
|
||||
|
||||
::Kotato::JsonSettings::Events(
|
||||
"big_emoji_outline"
|
||||
) | rpl::start_with_next([=] {
|
||||
_images.clear();
|
||||
refreshAll();
|
||||
}, _lifetime);
|
||||
|
||||
Ui::Emoji::Updated(
|
||||
) | rpl::start_with_next([=] {
|
||||
_images.clear();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "history/history_widget.h"
|
||||
|
||||
#include "kotato/kotato_settings.h"
|
||||
#include "api/api_editing.h"
|
||||
#include "api/api_bot.h"
|
||||
#include "api/api_chat_participants.h"
|
||||
|
|
@ -573,6 +574,14 @@ HistoryWidget::HistoryWidget(
|
|||
});
|
||||
}, lifetime());
|
||||
|
||||
::Kotato::JsonSettings::Events(
|
||||
"big_emoji_outline"
|
||||
) | rpl::start_with_next([=] {
|
||||
crl::on_main(this, [=] {
|
||||
updateHistoryGeometry();
|
||||
});
|
||||
}, lifetime());
|
||||
|
||||
session().data().webPageUpdates(
|
||||
) | rpl::filter([=](not_null<WebPageData*> page) {
|
||||
return (_previewData == page.get());
|
||||
|
|
|
|||
|
|
@ -243,6 +243,9 @@ const std::map<QString, Definition, std::greater<QString>> DefinitionMap {
|
|||
{ "fonts/use_original_metrics", {
|
||||
.type = SettingType::BoolSetting,
|
||||
.defaultValue = false, }},
|
||||
{ "big_emoji_outline", {
|
||||
.type = SettingType::BoolSetting,
|
||||
.defaultValue = true, }},
|
||||
};
|
||||
|
||||
using OldOptionKey = QString;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ void SetupKotatoChats(
|
|||
void SetupKotatoMessages(not_null<Ui::VerticalLayout*> container) {
|
||||
AddSubsectionTitle(container, rktr("ktg_settings_messages"));
|
||||
|
||||
SettingsMenuJsonSwitch(ktg_settings_emoji_outline, big_emoji_outline);
|
||||
|
||||
AddSkip(container);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue