[Option][GUI] Big emoji outline
This commit is contained in:
parent
3eeae4a4bf
commit
1dbf6961bc
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"
|
||||
|
||||
#include <QtCore/QtMath>
|
||||
|
|
@ -35,7 +36,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"
|
||||
|
|
@ -112,6 +113,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"
|
||||
|
|
@ -634,6 +635,14 @@ HistoryWidget::HistoryWidget(
|
|||
});
|
||||
}, lifetime());
|
||||
|
||||
::Kotato::JsonSettings::Events(
|
||||
"big_emoji_outline"
|
||||
) | rpl::start_with_next([=] {
|
||||
crl::on_main(this, [=] {
|
||||
updateHistoryGeometry();
|
||||
});
|
||||
}, lifetime());
|
||||
|
||||
session().data().channelDifferenceTooLong(
|
||||
) | rpl::filter([=](not_null<ChannelData*> channel) {
|
||||
return _peer == channel.get();
|
||||
|
|
|
|||
|
|
@ -226,6 +226,9 @@ const std::map<QString, Definition, std::greater<QString>> DefinitionMap {
|
|||
{ "fonts/size", {
|
||||
.type = SettingType::IntSetting,
|
||||
.defaultValue = 0, }},
|
||||
{ "big_emoji_outline", {
|
||||
.type = SettingType::BoolSetting,
|
||||
.defaultValue = true, }},
|
||||
};
|
||||
|
||||
using OldOptionKey = QString;
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ void SetupKotatoChats(
|
|||
void SetupKotatoMessages(not_null<Ui::VerticalLayout*> container) {
|
||||
Ui::AddSubsectionTitle(container, rktr("ktg_settings_messages"));
|
||||
|
||||
SettingsMenuJsonSwitch(ktg_settings_emoji_outline, big_emoji_outline);
|
||||
|
||||
Ui::AddSkip(container);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue