From 78fc15a806ce8c9950ffd652c7b0c55b28e69e33 Mon Sep 17 00:00:00 2001 From: cutefishd Date: Tue, 27 Apr 2021 15:26:18 +0800 Subject: [PATCH] Improve item margins --- src/qml/RoundedItem.qml | 7 ++++--- src/qml/UserPage/UserDelegateItem.qml | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qml/RoundedItem.qml b/src/qml/RoundedItem.qml index f2977a8..9c83a50 100644 --- a/src/qml/RoundedItem.qml +++ b/src/qml/RoundedItem.qml @@ -10,15 +10,16 @@ Rectangle { color: FishUI.Theme.darkMode ? "#363636" : "#FFFFFF" radius: FishUI.Theme.mediumRadius - implicitHeight: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2 + implicitHeight: _mainLayout.implicitHeight + + _mainLayout.anchors.topMargin + + _mainLayout.anchors.bottomMargin ColumnLayout { id: _mainLayout anchors.fill: parent - anchors.leftMargin: FishUI.Units.largeSpacing * 1.5 anchors.rightMargin: FishUI.Units.largeSpacing * 1.5 anchors.topMargin: FishUI.Units.largeSpacing - anchors.bottomMargin: FishUI.Units.largeSpacing + anchors.bottomMargin: FishUI.Units.largeSpacing * 1.5 } } diff --git a/src/qml/UserPage/UserDelegateItem.qml b/src/qml/UserPage/UserDelegateItem.qml index d8b004a..25fdde1 100644 --- a/src/qml/UserPage/UserDelegateItem.qml +++ b/src/qml/UserPage/UserDelegateItem.qml @@ -62,6 +62,7 @@ Item { sourceSize: Qt.size(width, height) source: iconFileName ? "file:///" + iconFileName : "image://icontheme/default-user" visible: status === Image.Ready + Layout.alignment: Qt.AlignVCenter MouseArea { anchors.fill: parent @@ -106,10 +107,13 @@ Item { Label { text: qsTr("Currently logged") + Layout.alignment: Qt.AlignVCenter visible: currentUser.userId === loggedUser.userId } Button { + Layout.alignment: Qt.AlignVCenter + onClicked: additionalSettings.toggle() implicitWidth: height