mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Restore call window from minimized on bar click.
This commit is contained in:
parent
df420e4ccf
commit
4b31b4792a
2 changed files with 11 additions and 2 deletions
|
@ -251,8 +251,11 @@ void GroupPanel::showAndActivate() {
|
|||
if (_window->isHidden()) {
|
||||
_window->show();
|
||||
}
|
||||
const auto state = _window->windowState();
|
||||
if (state & Qt::WindowMinimized) {
|
||||
_window->setWindowState(state & ~Qt::WindowMinimized);
|
||||
}
|
||||
_window->raise();
|
||||
_window->setWindowState(_window->windowState() | Qt::WindowActive);
|
||||
_window->activateWindow();
|
||||
_window->setFocus();
|
||||
}
|
||||
|
|
|
@ -209,8 +209,14 @@ bool Panel::isActive() const {
|
|||
}
|
||||
|
||||
void Panel::showAndActivate() {
|
||||
if (_window->isHidden()) {
|
||||
_window->show();
|
||||
}
|
||||
const auto state = _window->windowState();
|
||||
if (state & Qt::WindowMinimized) {
|
||||
_window->setWindowState(state & ~Qt::WindowMinimized);
|
||||
}
|
||||
_window->raise();
|
||||
_window->setWindowState(_window->windowState() | Qt::WindowActive);
|
||||
_window->activateWindow();
|
||||
_window->setFocus();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue