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,10 +125,11 @@ void BaseWindow::init()
this->setWindowState(Qt::WindowMinimized | this->setWindowState(Qt::WindowMinimized |
this->windowState()); this->windowState());
}); });
QObject::connect( QObject::connect(_maxButton, &TitleBarButton::leftClicked, this,
_maxButton, &TitleBarButton::leftClicked, this, [this] { [this, _maxButton] {
this->setWindowState(this->windowState() == this->setWindowState(
Qt::WindowMaximized _maxButton->getButtonStyle() !=
TitleBarButtonStyle::Maximize
? Qt::WindowActive ? Qt::WindowActive
: Qt::WindowMaximized); : Qt::WindowMaximized);
}); });