Fix QML warning: Detected anchors on an item that is managed by a layout.

Signed-off-by: Camila <hello@camila.codes>
This commit is contained in:
Camila 2021-05-25 21:12:41 +02:00 committed by Matthieu Gallien (Rebase PR Action)
parent c8edb11228
commit 5585f61cc0
2 changed files with 23 additions and 19 deletions

View file

@ -354,10 +354,9 @@ Window {
Column {
id: accountLabels
spacing: Style.userStatusSpacing
Layout.alignment: Qt.AlignLeft
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.leftMargin: Style.userStatusSpacing
anchors.top: currentAccountAvatar.top
anchors.topMargin: Style.userStatusSpacing
Layout.topMargin: Style.accountLabelsLayoutTopMargin
Label {
id: currentAccountUser
width: Style.currentAccountLabelWidth
@ -419,6 +418,7 @@ Window {
spacing: 0
Layout.preferredWidth: Style.trayWindowHeaderHeight
Layout.preferredHeight: Style.trayWindowHeaderHeight
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
HeaderButton {
id: openLocalFolderButton
@ -436,7 +436,6 @@ Window {
radius: width*0.5
z: 1
}
}
Image {
id: folderStateIndicator
@ -445,15 +444,19 @@ Window {
? Style.stateOnlineImageSource
: Style.stateOfflineImageSource
cache: false
anchors.top: openLocalFolderButton.verticalCenter
anchors.left: openLocalFolderButton.horizontalCenter
sourceSize.width: Style.folderStateIndicatorSize
sourceSize.height: Style.folderStateIndicatorSize
Accessible.role: Accessible.Indicator
Accessible.name: UserModel.currentUser.isConnected ? qsTr("Connected") : qsTr("Disconnected")
z: 2
}
}
Accessible.role: Accessible.Button
Accessible.name: qsTr("Open local folder of current account")

View file

@ -52,6 +52,7 @@ QtObject {
property int accountLabelsSpacing: 4
property int accountLabelsAnchorsMargin: 7
property int accountLabelsLayoutMargin: 9
property int accountLabelsLayoutTopMargin: 12
// Visual behaviour
property bool hoverEffectsEnabled: true