Added ability to close emoji status panel with main menu.

This commit is contained in:
23rd
2026-07-13 10:25:28 +03:00
parent f1b954cd2a
commit 3f0190668d
4 changed files with 12 additions and 0 deletions
@@ -174,6 +174,12 @@ void EmojiStatusPanel::show(Descriptor &&descriptor) {
_panel->toggleAnimated();
}
void EmojiStatusPanel::hideFast() {
if (_panel) {
_panel->hideFast();
}
}
bool EmojiStatusPanel::hasFocus() const {
return _panel && Ui::InFocusChain(_panel.get());
}
@@ -59,6 +59,7 @@ public:
bool withCollectibles = false;
};
void show(Descriptor &&descriptor);
void hideFast();
void repaint();
struct CustomChosen {
@@ -846,6 +846,10 @@ bool MainMenu::eventHook(QEvent *event) {
return RpWidget::eventHook(event);
}
void MainMenu::hideEvent(QHideEvent *e) {
_emojiStatusPanel->hideFast();
}
void MainMenu::paintEvent(QPaintEvent *e) {
auto p = Painter(this);
const auto clip = e->rect();
@@ -61,6 +61,7 @@ private:
bool eventHook(QEvent *event) override;
void paintEvent(QPaintEvent *e) override;
void resizeEvent(QResizeEvent *e) override;
void hideEvent(QHideEvent *e) override;
void doSetInnerFocus() override {
setFocus();