Removed "Emoji panel on hover" option
It was replaced by "Show tabbed panel by click" experimental option from TDesktop.
This commit is contained in:
parent
9db8c7778b
commit
a197245574
6 changed files with 2 additions and 33 deletions
|
|
@ -132,7 +132,6 @@
|
||||||
"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": "Message ID: {id}",
|
"ktg_message_id": "Message ID: {id}",
|
||||||
"ktg_emoji_panel_hover": "Emoji panel on hover",
|
|
||||||
"ktg_local_storage_limit_days": {
|
"ktg_local_storage_limit_days": {
|
||||||
"zero": "{count} days",
|
"zero": "{count} days",
|
||||||
"one": "{count} day",
|
"one": "{count} day",
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,6 @@
|
||||||
"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": "Панель эмодзи по наведению",
|
|
||||||
"ktg_local_storage_limit_days": {
|
"ktg_local_storage_limit_days": {
|
||||||
"zero": "{count} дней",
|
"zero": "{count} дней",
|
||||||
"one": "{count} дня",
|
"one": "{count} дня",
|
||||||
|
|
|
||||||
|
|
@ -682,14 +682,6 @@ HistoryWidget::HistoryWidget(
|
||||||
});
|
});
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
::Kotato::JsonSettings::Events(
|
|
||||||
"hover_emoji_panel"
|
|
||||||
) | 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()) {
|
||||||
|
|
@ -1135,9 +1127,7 @@ void HistoryWidget::initTabbedSelector() {
|
||||||
});
|
});
|
||||||
|
|
||||||
base::install_event_filter(_tabbedSelectorToggle, [=](not_null<QEvent*> e) {
|
base::install_event_filter(_tabbedSelectorToggle, [=](not_null<QEvent*> e) {
|
||||||
if (e->type() == QEvent::ContextMenu
|
if (e->type() == QEvent::ContextMenu && _tabbedPanel) {
|
||||||
&& !::Kotato::JsonSettings::GetBool("hover_emoji_panel")
|
|
||||||
&& _tabbedPanel) {
|
|
||||||
_tabbedPanel->toggleAnimated();
|
_tabbedPanel->toggleAnimated();
|
||||||
return base::EventFilterResult::Cancel;
|
return base::EventFilterResult::Cancel;
|
||||||
}
|
}
|
||||||
|
|
@ -4757,7 +4747,6 @@ 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()) {
|
||||||
_tabbedPanel->setPreventHover(!::Kotato::JsonSettings::GetBool("hover_emoji_panel"));
|
|
||||||
_tabbedSelectorToggle->installEventFilter(raw);
|
_tabbedSelectorToggle->installEventFilter(raw);
|
||||||
_tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr);
|
_tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1075,16 +1075,6 @@ void ComposeControls::init() {
|
||||||
}, _wrap->lifetime());
|
}, _wrap->lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
::Kotato::JsonSettings::Events(
|
|
||||||
"hover_emoji_panel"
|
|
||||||
) | rpl::start_with_next([=] {
|
|
||||||
if (_window->hasTabbedSelectorOwnership()) {
|
|
||||||
createTabbedPanel();
|
|
||||||
} else {
|
|
||||||
setTabbedPanel(nullptr);
|
|
||||||
}
|
|
||||||
}, _wrap->lifetime());
|
|
||||||
|
|
||||||
orderControls();
|
orderControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1577,9 +1567,7 @@ void ComposeControls::initTabbedSelector() {
|
||||||
}
|
}
|
||||||
|
|
||||||
base::install_event_filter(_tabbedSelectorToggle, [=](not_null<QEvent*> e) {
|
base::install_event_filter(_tabbedSelectorToggle, [=](not_null<QEvent*> e) {
|
||||||
if (e->type() == QEvent::ContextMenu
|
if (e->type() == QEvent::ContextMenu && _tabbedPanel) {
|
||||||
&& !::Kotato::JsonSettings::GetBool("hover_emoji_panel")
|
|
||||||
&& _tabbedPanel) {
|
|
||||||
_tabbedPanel->toggleAnimated();
|
_tabbedPanel->toggleAnimated();
|
||||||
return base::EventFilterResult::Cancel;
|
return base::EventFilterResult::Cancel;
|
||||||
}
|
}
|
||||||
|
|
@ -2059,7 +2047,6 @@ void ComposeControls::setTabbedPanel(
|
||||||
std::unique_ptr<ChatHelpers::TabbedPanel> panel) {
|
std::unique_ptr<ChatHelpers::TabbedPanel> panel) {
|
||||||
_tabbedPanel = std::move(panel);
|
_tabbedPanel = std::move(panel);
|
||||||
if (const auto raw = _tabbedPanel.get()) {
|
if (const auto raw = _tabbedPanel.get()) {
|
||||||
_tabbedPanel->setPreventHover(!::Kotato::JsonSettings::GetBool("hover_emoji_panel"));
|
|
||||||
_tabbedSelectorToggle->installEventFilter(raw);
|
_tabbedSelectorToggle->installEventFilter(raw);
|
||||||
_tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr);
|
_tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -425,9 +425,6 @@ const std::map<QString, Definition, std::greater<QString>> DefinitionMap {
|
||||||
{ "profile_top_mute", {
|
{ "profile_top_mute", {
|
||||||
.type = SettingType::BoolSetting,
|
.type = SettingType::BoolSetting,
|
||||||
.defaultValue = false, }},
|
.defaultValue = false, }},
|
||||||
{ "hover_emoji_panel", {
|
|
||||||
.type = SettingType::BoolSetting,
|
|
||||||
.defaultValue = true, }},
|
|
||||||
{ "forward_retain_selection", {
|
{ "forward_retain_selection", {
|
||||||
.type = SettingType::BoolSetting,
|
.type = SettingType::BoolSetting,
|
||||||
.defaultValue = false, }},
|
.defaultValue = false, }},
|
||||||
|
|
|
||||||
|
|
@ -295,8 +295,6 @@ void SetupKotatoChats(
|
||||||
::Kotato::JsonSettings::Write();
|
::Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
SettingsMenuJsonSwitch(ktg_emoji_panel_hover, hover_emoji_panel);
|
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
container,
|
container,
|
||||||
rktr("ktg_settings_fonts"),
|
rktr("ktg_settings_fonts"),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue