mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
workaround for white border
This commit is contained in:
parent
e7afe01a40
commit
b70806409d
1 changed files with 19 additions and 0 deletions
|
@ -515,6 +515,25 @@ void BaseWindow::resizeEvent(QResizeEvent *)
|
|||
|
||||
//this->moveIntoDesktopRect(this);
|
||||
|
||||
#ifdef USEWINSDK
|
||||
if (!this->isResizeFixing_)
|
||||
{
|
||||
this->isResizeFixing_ = true;
|
||||
QTimer::singleShot(50, this, [this] {
|
||||
RECT rect;
|
||||
::GetWindowRect((HWND)this->winId(), &rect);
|
||||
::SetWindowPos((HWND)this->winId(), nullptr, 0, 0,
|
||||
rect.right - rect.left + 1, rect.bottom - rect.top,
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
::SetWindowPos((HWND)this->winId(), nullptr, 0, 0,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
QTimer::singleShot(10, this,
|
||||
[this] { this->isResizeFixing_ = false; });
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
this->calcButtonsSizes();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue