Workaround for emoji selector in popup menu on Windows.

This commit is contained in:
John Preston 2023-03-17 14:22:22 +04:00
parent 8b61cf1ee3
commit f3951157d7
2 changed files with 8 additions and 1 deletions

View file

@ -945,6 +945,9 @@ AttachSelectorResult MakeJustSelectorMenu(
if (!AdjustMenuGeometryForSelector(menu, desiredPosition, selector)) { if (!AdjustMenuGeometryForSelector(menu, desiredPosition, selector)) {
return AttachSelectorResult::Failed; return AttachSelectorResult::Failed;
} }
if (mode != ChatHelpers::EmojiListMode::RecentReactions) {
Ui::Platform::FixPopupMenuNativeEmojiPopup(menu);
}
const auto selectorInnerTop = menu->preparedPadding().top() const auto selectorInnerTop = menu->preparedPadding().top()
- st::reactStripExtend.top(); - st::reactStripExtend.top();
menu->animatePhaseValue( menu->animatePhaseValue(
@ -1006,6 +1009,7 @@ AttachSelectorResult AttachSelectorToMenu(
if (reactions.recent.empty() && !reactions.morePremiumAvailable) { if (reactions.recent.empty() && !reactions.morePremiumAvailable) {
return AttachSelectorResult::Skipped; return AttachSelectorResult::Skipped;
} }
const auto withSearch = reactions.customAllowed;
const auto selector = Ui::CreateChild<Selector>( const auto selector = Ui::CreateChild<Selector>(
menu.get(), menu.get(),
controller, controller,
@ -1015,6 +1019,9 @@ AttachSelectorResult AttachSelectorToMenu(
if (!AdjustMenuGeometryForSelector(menu, desiredPosition, selector)) { if (!AdjustMenuGeometryForSelector(menu, desiredPosition, selector)) {
return AttachSelectorResult::Failed; return AttachSelectorResult::Failed;
} }
if (withSearch) {
Ui::Platform::FixPopupMenuNativeEmojiPopup(menu);
}
const auto selectorInnerTop = selector->useTransparency() const auto selectorInnerTop = selector->useTransparency()
? (menu->preparedPadding().top() - st::reactStripExtend.top()) ? (menu->preparedPadding().top() - st::reactStripExtend.top())
: st::lineWidth; : st::lineWidth;

@ -1 +1 @@
Subproject commit bcb56492c4cab204b8b27d762586e4bdbcc6c074 Subproject commit 328b75a311cd8f50c2b75dfefa7443e6eafcb9e1