Option to disable emoji panel on hover
This commit is contained in:
parent
f3277551d0
commit
e2591b7466
7 changed files with 34 additions and 2 deletions
|
|
@ -2518,5 +2518,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"ktg_settings_chat_id_bot" = "Bot API";
|
"ktg_settings_chat_id_bot" = "Bot API";
|
||||||
|
|
||||||
"ktg_message_id" = "Message ID: {id}";
|
"ktg_message_id" = "Message ID: {id}";
|
||||||
|
"ktg_emoji_panel_hover" = "Emoji panel on hover";
|
||||||
|
|
||||||
// Keys finished
|
// Keys finished
|
||||||
|
|
|
||||||
|
|
@ -121,5 +121,6 @@
|
||||||
"ktg_settings_chat_id_disable": "Скрыть",
|
"ktg_settings_chat_id_disable": "Скрыть",
|
||||||
"ktg_settings_chat_id_telegram": "Telegram API",
|
"ktg_settings_chat_id_telegram": "Telegram API",
|
||||||
"ktg_settings_chat_id_bot": "Bot API",
|
"ktg_settings_chat_id_bot": "Bot API",
|
||||||
"ktg_message_id": "ID сообщения: {id}"
|
"ktg_message_id": "ID сообщения: {id}",
|
||||||
|
"ktg_emoji_panel_hover": "Панель эмодзи по наведению"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -543,6 +543,13 @@ HistoryWidget::HistoryWidget(
|
||||||
});
|
});
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
HoverEmojiPanelChanges(
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
crl::on_main(this, [=] {
|
||||||
|
refreshTabbedPanel();
|
||||||
|
});
|
||||||
|
}, lifetime());
|
||||||
|
|
||||||
session().data().animationPlayInlineRequest(
|
session().data().animationPlayInlineRequest(
|
||||||
) | rpl::start_with_next([=](not_null<HistoryItem*> item) {
|
) | rpl::start_with_next([=](not_null<HistoryItem*> item) {
|
||||||
if (const auto view = item->mainView()) {
|
if (const auto view = item->mainView()) {
|
||||||
|
|
@ -4180,7 +4187,9 @@ void HistoryWidget::createTabbedPanel() {
|
||||||
void HistoryWidget::setTabbedPanel(std::unique_ptr<TabbedPanel> panel) {
|
void HistoryWidget::setTabbedPanel(std::unique_ptr<TabbedPanel> panel) {
|
||||||
_tabbedPanel = std::move(panel);
|
_tabbedPanel = std::move(panel);
|
||||||
if (const auto raw = _tabbedPanel.get()) {
|
if (const auto raw = _tabbedPanel.get()) {
|
||||||
|
if (HoverEmojiPanel()) {
|
||||||
_tabbedSelectorToggle->installEventFilter(raw);
|
_tabbedSelectorToggle->installEventFilter(raw);
|
||||||
|
}
|
||||||
_tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr);
|
_tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr);
|
||||||
} else {
|
} else {
|
||||||
_tabbedSelectorToggle->setColorOverrides(
|
_tabbedSelectorToggle->setColorOverrides(
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ QByteArray GenerateSettingsJson(bool areDefault = false) {
|
||||||
settings.insert(qsl("always_show_top_userpic"), cShowTopBarUserpic());
|
settings.insert(qsl("always_show_top_userpic"), cShowTopBarUserpic());
|
||||||
settings.insert(qsl("custom_app_icon"), cCustomAppIcon());
|
settings.insert(qsl("custom_app_icon"), cCustomAppIcon());
|
||||||
settings.insert(qsl("profile_top_mute"), cProfileTopBarNotifications());
|
settings.insert(qsl("profile_top_mute"), cProfileTopBarNotifications());
|
||||||
|
settings.insert(qsl("hover_emoji_panel"), HoverEmojiPanel());
|
||||||
|
|
||||||
settingsFonts.insert(qsl("use_system_font"), cUseSystemFont());
|
settingsFonts.insert(qsl("use_system_font"), cUseSystemFont());
|
||||||
settingsFonts.insert(qsl("use_original_metrics"), cUseOriginalMetrics());
|
settingsFonts.insert(qsl("use_original_metrics"), cUseOriginalMetrics());
|
||||||
|
|
@ -446,6 +447,10 @@ bool Manager::readCustomFile() {
|
||||||
ReadBoolOption(settings, "profile_top_mute", [&](auto v) {
|
ReadBoolOption(settings, "profile_top_mute", [&](auto v) {
|
||||||
cSetProfileTopBarNotifications(v);
|
cSetProfileTopBarNotifications(v);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ReadBoolOption(settings, "hover_emoji_panel", [&](auto v) {
|
||||||
|
SetHoverEmojiPanel(v);
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,3 +137,14 @@ bool gHideFilterNames = false;
|
||||||
bool gHideFilterAllChats = false;
|
bool gHideFilterAllChats = false;
|
||||||
|
|
||||||
bool gProfileTopBarNotifications = false;
|
bool gProfileTopBarNotifications = false;
|
||||||
|
|
||||||
|
rpl::variable<bool> gHoverEmojiPanel = true;
|
||||||
|
void SetHoverEmojiPanel(bool enabled) {
|
||||||
|
gHoverEmojiPanel = enabled;
|
||||||
|
}
|
||||||
|
bool HoverEmojiPanel() {
|
||||||
|
return gHoverEmojiPanel.current();
|
||||||
|
}
|
||||||
|
rpl::producer<bool> HoverEmojiPanelChanges() {
|
||||||
|
return gHoverEmojiPanel.changes();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,3 +103,7 @@ DeclareSetting(bool, HideFilterNames);
|
||||||
DeclareSetting(bool, HideFilterAllChats);
|
DeclareSetting(bool, HideFilterAllChats);
|
||||||
|
|
||||||
DeclareSetting(bool, ProfileTopBarNotifications);
|
DeclareSetting(bool, ProfileTopBarNotifications);
|
||||||
|
|
||||||
|
void SetHoverEmojiPanel(bool enabled);
|
||||||
|
[[nodiscard]] bool HoverEmojiPanel();
|
||||||
|
[[nodiscard]] rpl::producer<bool> HoverEmojiPanelChanges();
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,7 @@ void SetupKotatoChats(not_null<Ui::VerticalLayout*> container) {
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
SettingsMenuCSwitch(ktg_settings_always_show_scheduled, AlwaysShowScheduled);
|
SettingsMenuCSwitch(ktg_settings_always_show_scheduled, AlwaysShowScheduled);
|
||||||
|
SettingsMenuSwitch(ktg_emoji_panel_hover, HoverEmojiPanel);
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
container,
|
container,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue