Line up Connectivity rows with the small Control Center tiles

The card used its own padding and packed rows at the top while the block
stretched it beside the tiles. It now uses tile metrics and grows its gaps,
so each row meets a tile's toggle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-10-15 14:59:36 +02:00
1 parent 0b3bb83bc9
commit 44a5aedbb2
2 files changed
+9 -1

No files matched your search

+2 -1
View File
@@ -9,6 +9,7 @@ Rectangle {
property string title
property bool heading: title !== ""
property int padding: 12
property real spacing: 10
implicitWidth: 360
implicitHeight: body.implicitHeight + padding * 2
radius: Math.max(12, Theme.radius * 0.75)
@@ -23,7 +24,7 @@ Rectangle {
top: parent.top
margins: root.padding
}
spacing: 10
spacing: root.spacing
Text {
visible: root.heading
text: root.title
@@ -9,6 +9,12 @@ import "../../theme"
// Wi-Fi, Bluetooth and live throughput; labels open the matching Settings page.
ControlCard {
id: root
// Tile metrics, so rows line up with the small tiles beside this card: when
// the block stretches it, the gaps grow and each row meets a tile's toggle.
readonly property int rowHeight: 34
padding: 10
implicitHeight: 3 * rowHeight + 2 * 10 + 2 * padding
spacing: Math.max(10, (root.height - 2 * root.padding - 3 * root.rowHeight) / 2)
Demand {
service: MetricsService
}
@@ -19,6 +25,7 @@ ControlCard {
property string detail
property string page
Layout.fillWidth: true
Layout.preferredHeight: toggle.size
spacing: 10
CCToggle {
id: toggle