From ddd892a8d25aae7ea67f7222b42349f59301e1d1 Mon Sep 17 00:00:00 2001 From: Lionel Duboeuf Date: Fri, 31 Jan 2020 23:37:06 +0100 Subject: [PATCH] fix anchor loop for Magnifier --- qml/keys/ExtendedKeysSelector.qml | 7 ++++--- qml/keys/Magnifier.qml | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/qml/keys/ExtendedKeysSelector.qml b/qml/keys/ExtendedKeysSelector.qml index 73fdcb17..534c0e47 100644 --- a/qml/keys/ExtendedKeysSelector.qml +++ b/qml/keys/ExtendedKeysSelector.qml @@ -1,4 +1,4 @@ -/* +/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify @@ -68,8 +68,9 @@ KeyPopover { Rectangle{ id: popoverBackground - - anchors.centerIn: anchorItem + //fix anchor loop, see https://forum.qt.io/topic/103522/anchor-loop-with-layout-centerin/4 + anchors.horizontalCenter: anchorItem.horizontalCenter + anchors.verticalCenter: anchorItem.verticalCenter anchors.verticalCenterOffset: -units.dp(UI.popoverTopMargin) width: { diff --git a/qml/keys/Magnifier.qml b/qml/keys/Magnifier.qml index 66531fe9..49a220e6 100644 --- a/qml/keys/Magnifier.qml +++ b/qml/keys/Magnifier.qml @@ -54,7 +54,9 @@ KeyPopover { width: parent.width height: parent.height - anchors.centerIn: anchorItem + //fix anchor loop, see https://forum.qt.io/topic/103522/anchor-loop-with-layout-centerin/4 + anchors.horizontalCenter: anchorItem.horizontalCenter + anchors.verticalCenter: anchorItem.verticalCenter // this property is used to synchronize scale and opacity animation property real animationStep: 0