Rename tbOrientation into taskbarOrientation

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-05-20 18:07:01 +02:00 committed by Kevin Ottens (Rebase PR Action)
parent aa90237e94
commit 83b36b4ab0

View file

@ -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) {