From 719d6f69de01062aae2aa3205ce3cb631c312c7a Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Sun, 27 Dec 2020 20:50:17 -0600 Subject: [PATCH] Change widget order & fix minor bug --- assets/qml/Windows/DataGrid.qml | 4 ++-- assets/qml/Windows/Widgets.qml | 38 ++++++++++++++++----------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/assets/qml/Windows/DataGrid.qml b/assets/qml/Windows/DataGrid.qml index 922ab134..cdd85f64 100644 --- a/assets/qml/Windows/DataGrid.qml +++ b/assets/qml/Windows/DataGrid.qml @@ -354,7 +354,7 @@ Control { delegate: Item { Layout.fillWidth: true Layout.fillHeight: true - Layout.minimumHeight: 196 + Layout.minimumHeight: groupDelegate.visible ? 196 : 0 Widgets.GroupDelegate { id: groupDelegate @@ -380,7 +380,7 @@ Control { delegate: Item { Layout.fillWidth: true Layout.fillHeight: true - Layout.minimumHeight: 196 + Layout.minimumHeight: graphDelegate.visible ? 196 : 0 Widgets.GraphDelegate { id: graphDelegate diff --git a/assets/qml/Windows/Widgets.qml b/assets/qml/Windows/Widgets.qml index 0ea44aa4..8eef1dd1 100644 --- a/assets/qml/Windows/Widgets.qml +++ b/assets/qml/Windows/Widgets.qml @@ -96,22 +96,6 @@ Control { columnSpacing: app.spacing columns: Math.floor(_sv.width / (root.minimumWidgetSize + 2 * app.spacing)) - Repeater { - id: accGenerator - - delegate: Item { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumWidth: root.minimumWidgetSize - Layout.minimumHeight: root.minimumWidgetSize - - Widgets.AccelerometerDelegate { - groupIndex: groupIndex - anchors.fill: parent - } - } - } - Repeater { id: gyroGenerator @@ -129,7 +113,7 @@ Control { } Repeater { - id: barGenerator + id: accGenerator delegate: Item { Layout.fillWidth: true @@ -137,8 +121,8 @@ Control { Layout.minimumWidth: root.minimumWidgetSize Layout.minimumHeight: root.minimumWidgetSize - Widgets.BarDelegate { - datasetIndex: index + Widgets.AccelerometerDelegate { + groupIndex: groupIndex anchors.fill: parent } } @@ -160,6 +144,22 @@ Control { } } } + + Repeater { + id: barGenerator + + delegate: Item { + Layout.fillWidth: true + Layout.fillHeight: true + Layout.minimumWidth: root.minimumWidgetSize + Layout.minimumHeight: root.minimumWidgetSize + + Widgets.BarDelegate { + datasetIndex: index + anchors.fill: parent + } + } + } } Item {