Merge pull request #19 from zencatalyst/patch-1

Update fakewindow.cpp
This commit is contained in:
Reion Wong 2022-07-03 14:28:08 +08:00 committed by GitHub
commit 23d8ac3fbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,17 +106,23 @@ void FakeWindow::updateGeometry()
const QRect screenRect = qApp->primaryScreen()->geometry();
QRect newRect;
if (DockSettings::self()->direction() == DockSettings::Left) {
newRect = QRect(screenRect.x() - (length * 2), (screenRect.height() + length) / 2,
switch (DockSettings::self()->direction())
{
case DockSettings::Left:
newRect = QRect(screenRect.x() - (length * 2),
(screenRect.height() + length) / 2,
length, screenRect.height());
} else if (DockSettings::self()->direction() == DockSettings::Bottom) {
break;
case DockSettings::Bottom:
newRect = QRect(screenRect.x(),
screenRect.y() + screenRect.height() - length,
screenRect.width(), length);
} else if (DockSettings::self()->direction() == DockSettings::Right) {
break;
case DockSettings::Right:
newRect = QRect(screenRect.x() + screenRect.width() - length,
screenRect.y(),
length, screenRect.height());
break;
}
setGeometry(newRect);