mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 11:52:58 +00:00
Added ability to close emoji status panel with main menu.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user