mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Add some debug output for the window placement
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
44a9200c5d
commit
d3d99b2d9d
1 changed files with 13 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue