Fixed Unmaximize button in title bar for Windows. (#845)

* Fixed Unmaximize button in title bar for Windows.

* Clang-formated BaseWindow.cpp.
This commit is contained in:
23rd 2018-10-29 23:12:24 +03:00 committed by fourtf
parent 70a5a62777
commit 69233b77ff

View file

@ -125,13 +125,14 @@ void BaseWindow::init()
this->setWindowState(Qt::WindowMinimized |
this->windowState());
});
QObject::connect(
_maxButton, &TitleBarButton::leftClicked, this, [this] {
this->setWindowState(this->windowState() ==
Qt::WindowMaximized
? Qt::WindowActive
: Qt::WindowMaximized);
});
QObject::connect(_maxButton, &TitleBarButton::leftClicked, this,
[this, _maxButton] {
this->setWindowState(
_maxButton->getButtonStyle() !=
TitleBarButtonStyle::Maximize
? Qt::WindowActive
: Qt::WindowMaximized);
});
QObject::connect(_exitButton, &TitleBarButton::leftClicked, this,
[this] { this->close(); });