From d0dcf9c0088957fdded89a27fd9834ad7d41947e Mon Sep 17 00:00:00 2001 From: rekols Date: Fri, 4 Jun 2021 10:12:47 +0800 Subject: [PATCH] Adjusted icon size --- qml/LauncherGridDelegate.qml | 11 +++++------ qml/LauncherGridView.qml | 7 +------ qml/main.qml | 5 +++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/qml/LauncherGridDelegate.qml b/qml/LauncherGridDelegate.qml index 7f47162..7878acf 100755 --- a/qml/LauncherGridDelegate.qml +++ b/qml/LauncherGridDelegate.qml @@ -68,13 +68,12 @@ Item { horizontalCenter: parent.horizontalCenter top: parent.top bottom: label.top - leftMargin: Math.max(FishUI.Units.largeSpacing * 2, root.maxSpacing * Screen.devicePixelRatio) - rightMargin: Math.max(FishUI.Units.largeSpacing * 2, root.maxSpacing * Screen.devicePixelRatio) - topMargin: Math.max(FishUI.Units.largeSpacing * 2, root.maxSpacing * Screen.devicePixelRatio) - bottomMargin: Math.max(FishUI.Units.largeSpacing * 2, root.maxSpacing * Screen.devicePixelRatio) - } - property real size: height + leftMargin: root.maxSpacing * 2 + rightMargin: root.maxSpacing * 2 + topMargin: root.maxSpacing * 2 + bottomMargin: root.maxSpacing * 2 + } width: height height: width diff --git a/qml/LauncherGridView.qml b/qml/LauncherGridView.qml index 9dc60f9..f551198 100644 --- a/qml/LauncherGridView.qml +++ b/qml/LauncherGridView.qml @@ -25,8 +25,7 @@ import Cutefish.Launcher 1.0 PageView { id: control - property int iconSize: control.width > control.height ? control.width * 0.09 + root.horizontalSpacing * 2 + root.maxSpacing - : control.height * 0.09 + root.verticalSpacing * 2 + root.maxSpacing + property int iconSize: 128 + root.maxSpacing * 2 property int cellWidth: { var extraWidth = calcExtraSpacing(iconSize, control.width) @@ -50,10 +49,6 @@ PageView { LauncherGridDelegate { id: delegate anchors.fill: parent - anchors.leftMargin: root.maxSpacing - anchors.rightMargin: root.maxSpacing - anchors.topMargin: root.maxSpacing - anchors.bottomMargin: root.maxSpacing } } diff --git a/qml/main.qml b/qml/main.qml index bc3adc7..0ed3253 100755 --- a/qml/main.qml +++ b/qml/main.qml @@ -83,11 +83,12 @@ Item { id: mainLayout anchors.fill: parent anchors.leftMargin: launcher.screenAvailableRect ? launcher.screenAvailableRect.x : 0 - anchors.topMargin: launcher.screenAvailableRect ? launcher.screenAvailableRect.y + root.verticalSpacing * 4 : 0 + anchors.topMargin: launcher.screenAvailableRect ? launcher.screenAvailableRect.y + root.maxSpacing * 2 : 0 anchors.rightMargin: launcher.screenRect.width - (launcher.screenAvailableRect.x + launcher.screenAvailableRect.width) anchors.bottomMargin: launcher.screenRect.height - (launcher.screenAvailableRect.y + launcher.screenAvailableRect.height - root.verticalSpacing) - spacing: root.verticalSpacing + // spacing: root.verticalSpacing + spacing: 0 Item { id: searchItem