commit
23d8ac3fbe
1 changed files with 17 additions and 11 deletions
|
@ -106,17 +106,23 @@ void FakeWindow::updateGeometry()
|
||||||
const QRect screenRect = qApp->primaryScreen()->geometry();
|
const QRect screenRect = qApp->primaryScreen()->geometry();
|
||||||
QRect newRect;
|
QRect newRect;
|
||||||
|
|
||||||
if (DockSettings::self()->direction() == DockSettings::Left) {
|
switch (DockSettings::self()->direction())
|
||||||
newRect = QRect(screenRect.x() - (length * 2), (screenRect.height() + length) / 2,
|
{
|
||||||
|
case DockSettings::Left:
|
||||||
|
newRect = QRect(screenRect.x() - (length * 2),
|
||||||
|
(screenRect.height() + length) / 2,
|
||||||
length, screenRect.height());
|
length, screenRect.height());
|
||||||
} else if (DockSettings::self()->direction() == DockSettings::Bottom) {
|
break;
|
||||||
|
case DockSettings::Bottom:
|
||||||
newRect = QRect(screenRect.x(),
|
newRect = QRect(screenRect.x(),
|
||||||
screenRect.y() + screenRect.height() - length,
|
screenRect.y() + screenRect.height() - length,
|
||||||
screenRect.width(), length);
|
screenRect.width(), length);
|
||||||
} else if (DockSettings::self()->direction() == DockSettings::Right) {
|
break;
|
||||||
|
case DockSettings::Right:
|
||||||
newRect = QRect(screenRect.x() + screenRect.width() - length,
|
newRect = QRect(screenRect.x() + screenRect.width() - length,
|
||||||
screenRect.y(),
|
screenRect.y(),
|
||||||
length, screenRect.height());
|
length, screenRect.height());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setGeometry(newRect);
|
setGeometry(newRect);
|
||||||
|
|
Loading…
Reference in a new issue