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