Commit 4ad1dd25 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Use largeSpacing as standard vertical spacing for faces

This ensures the chart faces all use largeSpacing as standard value for
the spacing between title, chart and legend and makes sure there's
always at least largeSpacing between the title and items in the Text
face.
parent 4b894792
......@@ -45,6 +45,8 @@ Faces.SensorFace {
Layout.preferredWidth: titleMetrics.width
contentItem: ColumnLayout {
spacing: Kirigami.Units.largeSpacing
Kirigami.Heading {
id: heading
Layout.fillWidth: true
......
......@@ -42,6 +42,8 @@ Faces.SensorFace {
Layout.preferredWidth: titleMetrics.width
contentItem: ColumnLayout {
spacing: Kirigami.Units.largeSpacing
Kirigami.Heading {
id: heading
Layout.fillWidth: true
......
......@@ -39,7 +39,7 @@ Faces.SensorFace {
Layout.preferredWidth: titleMetrics.width
contentItem: ColumnLayout {
spacing: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
spacing: Kirigami.Units.largeSpacing
Kirigami.Heading {
id: heading
Layout.fillWidth: true
......
......@@ -38,6 +38,7 @@ Faces.SensorFace {
Layout.preferredWidth: titleMetrics.width
contentItem: ColumnLayout {
spacing: 0
Kirigami.Heading {
id: heading
......@@ -54,7 +55,7 @@ Faces.SensorFace {
}
}
Item { Layout.fillWidth: true; Layout.fillHeight: true }
Item { Layout.fillWidth: true; Layout.fillHeight: true; Layout.minimumHeight: Kirigami.Units.largeSpacing }
GroupedText {
totalSensorIds: root.controller.totalSensors
......@@ -66,6 +67,13 @@ Faces.SensorFace {
updateRateLimit: root.controller.updateRateLimit
}
Item { Layout.fillWidth: true; Layout.fillHeight: true }
Item {
Layout.fillWidth: true;
Layout.fillHeight: true;
// Trick ColumnLayout into layouting this spacer and the one above
// the same height. Apparently if only minimumHeight is set
// ColumnLayout will still use that as "weight" for sizing.
Layout.preferredHeight: Kirigami.Units.largeSpacing
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment