diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-07 16:23:52 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-07 16:23:52 +1000 |
| commit | b3d1a85f1c2cd85fdc1cf9a4b6fb33535e7f783c (patch) | |
| tree | ad77249a53f37ae234a7bdfcc4247ae02a5580b5 | |
| parent | controlcenter: add floating mode (diff) | |
| download | caelestia-shell-b3d1a85f1c2cd85fdc1cf9a4b6fb33535e7f783c.tar.gz caelestia-shell-b3d1a85f1c2cd85fdc1cf9a4b6fb33535e7f783c.tar.bz2 caelestia-shell-b3d1a85f1c2cd85fdc1cf9a4b6fb33535e7f783c.zip | |
controlcenter: better navrail
| -rw-r--r-- | config/ControlCenterConfig.qml | 1 | ||||
| -rw-r--r-- | modules/controlcenter/NavRail.qml | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/config/ControlCenterConfig.qml b/config/ControlCenterConfig.qml index 13afbd2..a588949 100644 --- a/config/ControlCenterConfig.qml +++ b/config/ControlCenterConfig.qml @@ -6,6 +6,5 @@ JsonObject { component Sizes: JsonObject { property real heightMult: 0.7 property real ratio: 16 / 9 - property real expandedNavWidth: 180 } } diff --git a/modules/controlcenter/NavRail.qml b/modules/controlcenter/NavRail.qml index 832fe53..720548c 100644 --- a/modules/controlcenter/NavRail.qml +++ b/modules/controlcenter/NavRail.qml @@ -13,13 +13,15 @@ Item { required property ShellScreen screen required property Session session - implicitWidth: layout.implicitWidth + Appearance.padding.large * 4 + implicitWidth: layout.implicitWidth + Appearance.padding.larger * 4 implicitHeight: layout.implicitHeight + Appearance.padding.large * 2 ColumnLayout { id: layout - anchors.centerIn: parent + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: Appearance.padding.larger * 2 spacing: Appearance.spacing.normal states: State { @@ -45,7 +47,7 @@ Item { id: menuBtn Layout.topMargin: Appearance.spacing.large - Layout.fillWidth: true + implicitWidth: menuIcon.implicitWidth + menuIcon.anchors.leftMargin * 2 implicitHeight: menuIcon.implicitHeight + Appearance.padding.normal * 2 StateLayer { @@ -125,7 +127,7 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: Appearance.spacing.normal - text: qsTr("Open in window") + text: qsTr("Float window") opacity: root.session.navExpanded ? 1 : 0 Behavior on opacity { @@ -183,7 +185,7 @@ Item { PropertyChanges { expandedLabel.opacity: 1 smallLabel.opacity: 0 - background.implicitWidth: Config.controlCenter.sizes.expandedNavWidth + background.implicitWidth: icon.implicitWidth + icon.anchors.leftMargin * 2 + expandedLabel.anchors.leftMargin + expandedLabel.implicitWidth background.implicitHeight: icon.implicitHeight + Appearance.padding.normal * 2 item.implicitHeight: background.implicitHeight } |