workaround for white border

This commit is contained in:
fourtf 2019-12-26 23:23:59 +01:00
parent e7afe01a40
commit b70806409d

View file

@ -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();
}