diff options
author | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-06-11 20:27:40 +0300 |
---|---|---|
committer | Kevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com> | 2020-06-15 15:32:25 +0300 |
commit | d3d99b2d9d16b512a3cf229d9f0aa078e9d834b0 (patch) | |
tree | 9a446fb78f85ac78381504633fdc7048282bec41 /src/gui/systray.cpp | |
parent | 44a9200c5d91b17c1c5801714c2cf9b5723132ed (diff) |
Add some debug output for the window placement
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui/systray.cpp')
-rw-r--r-- | src/gui/systray.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index ebcefc4df..c67fa4bef 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -37,6 +37,8 @@ namespace OCC { +Q_LOGGING_CATEGORY(lcSystray, "nextcloud.gui.systray") + Systray *Systray::_instance = nullptr; Systray *Systray::instance() @@ -254,6 +256,11 @@ QPoint Systray::computeWindowReferencePoint() const const auto taskbarScreenEdge = taskbarOrientation(); const auto screenRect = currentScreenRect(); + qCDebug(lcSystray) << "screenRect:" << screenRect; + qCDebug(lcSystray) << "taskbarRect:" << taskbarRect; + qCDebug(lcSystray) << "taskbarScreenEdge:" << taskbarScreenEdge; + qCDebug(lcSystray) << "trayIconCenter:" << trayIconCenter; + switch(taskbarScreenEdge) { case TaskBarPosition::Bottom: return { @@ -318,6 +325,12 @@ QPoint Systray::computeWindowPosition(int width, int height) const return rect.translated(offset); }(); + + qCDebug(lcSystray) << "taskbarScreenEdge:" << taskbarScreenEdge; + qCDebug(lcSystray) << "screenRect:" << screenRect; + qCDebug(lcSystray) << "windowRect (reference)" << QRect(topLeft, bottomRight); + qCDebug(lcSystray) << "windowRect (adjusted )" << windowRect; + return windowRect.topLeft(); } |