mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
Rename tbOrientation into taskbarOrientation
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
aa90237e94
commit
83b36b4ab0
1 changed files with 5 additions and 5 deletions
|
@ -24,7 +24,7 @@ Window {
|
||||||
trayWindow.requestActivate();
|
trayWindow.requestActivate();
|
||||||
var trayWindowX;
|
var trayWindowX;
|
||||||
var trayWindowY;
|
var trayWindowY;
|
||||||
var tbOrientation = systrayBackend.taskbarOrientation();
|
var taskbarOrientation = systrayBackend.taskbarOrientation();
|
||||||
var taskbarRect = systrayBackend.taskbarRect();
|
var taskbarRect = systrayBackend.taskbarRect();
|
||||||
var screenRect = Qt.rect(0, 0, Screen.width, Screen.height)
|
var screenRect = Qt.rect(0, 0, Screen.width, Screen.height)
|
||||||
if (Qt.platform.os === "linux") {
|
if (Qt.platform.os === "linux") {
|
||||||
|
@ -32,7 +32,7 @@ Window {
|
||||||
screenRect.y = Screen.virtualY
|
screenRect.y = Screen.virtualY
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(tbOrientation) {
|
switch(taskbarOrientation) {
|
||||||
// Platform separation here: Windows and macOS draw coordinates have to be given in screen-coordinates
|
// Platform separation here: Windows and macOS draw coordinates have to be given in screen-coordinates
|
||||||
// KDE and most xorg based DEs expect them as virtual coordinates
|
// KDE and most xorg based DEs expect them as virtual coordinates
|
||||||
case Systray.Bottom:
|
case Systray.Bottom:
|
||||||
|
@ -71,7 +71,7 @@ Window {
|
||||||
trayWindowX = screenRect.right - trayWindow.width - 4;
|
trayWindowX = screenRect.right - trayWindow.width - 4;
|
||||||
|
|
||||||
if (Qt.platform.os === "linux") {
|
if (Qt.platform.os === "linux") {
|
||||||
trayWindowX -= tbOrientation === Systray.Right ? taskbarRect.width : 0;
|
trayWindowX -= taskbarOrientation === Systray.Right ? taskbarRect.width : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (trayWindowX <= screenRect.left) {
|
if (trayWindowX <= screenRect.left) {
|
||||||
|
@ -79,7 +79,7 @@ Window {
|
||||||
trayWindowX = screenRect.left + 4;
|
trayWindowX = screenRect.left + 4;
|
||||||
|
|
||||||
if (Qt.platform.os === "linux") {
|
if (Qt.platform.os === "linux") {
|
||||||
trayWindowX += tbOrientation === Systray.Left ? taskbarRect.width : 0;
|
trayWindowX += taskbarOrientation === Systray.Left ? taskbarRect.width : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (trayWindowY <= screenRect.top) {
|
if (trayWindowY <= screenRect.top) {
|
||||||
|
@ -87,7 +87,7 @@ Window {
|
||||||
trayWindowY = screenRect.top + 4;
|
trayWindowY = screenRect.top + 4;
|
||||||
|
|
||||||
if (Qt.platform.os === "linux") {
|
if (Qt.platform.os === "linux") {
|
||||||
trayWindowY += tbOrientation === Systray.Top ? taskbarRect.height : 0;
|
trayWindowY += taskbarOrientation === Systray.Top ? taskbarRect.height : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (screenRect.bottom <= trayWindowY + trayWindow.height) {
|
if (screenRect.bottom <= trayWindowY + trayWindow.height) {
|
||||||
|
|
Loading…
Reference in a new issue