Position main dialog on at tray icon if not a regular window

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
Felix Weilbach 2021-07-13 10:11:32 +02:00
parent 6bc6dcd598
commit 036db9d22d
2 changed files with 3 additions and 7 deletions

View file

@ -272,9 +272,8 @@ void Systray::pauseResumeSync()
void Systray::positionWindow(QQuickWindow *window) const
{
window->setScreen(currentScreen());
if (useNormalWindow()) {
if (!useNormalWindow()) {
window->setScreen(currentScreen());
const auto position = computeWindowPosition(window->width(), window->height());
window->setPosition(position);
}

View file

@ -57,10 +57,7 @@ Window {
onShowWindow: {
accountMenu.close();
appsMenu.close();
if (!Systray.useNormalWindow) {
Systray.positionWindow(trayWindow);
}
Systray.positionWindow(trayWindow);
trayWindow.show();
trayWindow.raise();