mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
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:
parent
70a5a62777
commit
69233b77ff
1 changed files with 8 additions and 7 deletions
|
@ -125,13 +125,14 @@ 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() !=
|
||||||
? Qt::WindowActive
|
TitleBarButtonStyle::Maximize
|
||||||
: Qt::WindowMaximized);
|
? Qt::WindowActive
|
||||||
});
|
: Qt::WindowMaximized);
|
||||||
|
});
|
||||||
QObject::connect(_exitButton, &TitleBarButton::leftClicked, this,
|
QObject::connect(_exitButton, &TitleBarButton::leftClicked, this,
|
||||||
[this] { this->close(); });
|
[this] { this->close(); });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue