From 11bf737d1dfe55dcc910e460dfbafce611e3841e Mon Sep 17 00:00:00 2001 From: reven Date: Thu, 15 Apr 2021 10:26:54 +0800 Subject: [PATCH] Design: Symmetrical adjustment --- qml/FolderPage.qml | 15 +++++++++------ qml/SideBar.qml | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/qml/FolderPage.qml b/qml/FolderPage.qml index 11ce93e..28708a3 100644 --- a/qml/FolderPage.qml +++ b/qml/FolderPage.qml @@ -12,7 +12,7 @@ Item { property alias currentUrl: dirModel.url property Item currentView: _viewLoader.item - property int statusBarHeight: 30 + property int statusBarHeight: 22 signal requestPathEditor() @@ -33,7 +33,7 @@ Item { Label { id: _fileTips text: qsTr("Empty folder") - font.pointSize: 20 + font.pointSize: 15 anchors.centerIn: parent visible: false } @@ -117,19 +117,21 @@ Item { RowLayout { anchors.fill: parent - anchors.leftMargin: FishUI.Units.largeSpacing + anchors.leftMargin: FishUI.Units.smallSpacing anchors.rightMargin: FishUI.Units.largeSpacing anchors.bottomMargin: 1 spacing: FishUI.Units.largeSpacing Label { Layout.alignment: Qt.AlignLeft - text: dirModel.count == 1 ? qsTr("%1 item").arg(dirModel.count) - : qsTr("%1 items").arg(dirModel.count) + font.pointSize: 10 + text: dirModel.count === 1 ? qsTr("%1 item").arg(dirModel.count) + : qsTr("%1 items").arg(dirModel.count) } Label { Layout.alignment: Qt.AlignLeft + font.pointSize: 10 text: qsTr("%1 selected").arg(dirModel.selectionCound) visible: dirModel.selectionCound >= 1 } @@ -142,6 +144,7 @@ Item { Layout.fillHeight: true Layout.alignment: Qt.AlignRight text: qsTr("Empty Trash") + font.pointSize: 10 onClicked: dirModel.emptyTrash() visible: dirModel.url === "trash:/" focusPolicy: Qt.NoFocus @@ -158,7 +161,7 @@ Item { model: dirModel delegate: FolderGridItem {} - leftMargin: FishUI.Units.largeSpacing + leftMargin: FishUI.Units.smallSpacing rightMargin: FishUI.Units.largeSpacing topMargin: FishUI.Units.smallSpacing bottomMargin: FishUI.Units.smallSpacing diff --git a/qml/SideBar.qml b/qml/SideBar.qml index a809af5..70dafa8 100644 --- a/qml/SideBar.qml +++ b/qml/SideBar.qml @@ -39,7 +39,7 @@ ListView { delegate: Item { id: _item width: ListView.view.width - ListView.view.leftMargin - ListView.view.rightMargin - height: 40 + height: FishUI.Units.fontMetrics.height + FishUI.Units.largeSpacing * 1.5 property bool checked: sideBar.currentIndex === index property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.1)