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->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(); });
|
||||
|
||||
|
|
Loading…
Reference in a new issue