From 09c82a30b36f4cd1bf1c9c6314ee73c014dfed86 Mon Sep 17 00:00:00 2001 From: Katie Snow Date: Sun, 22 Dec 2024 16:49:50 -0700 Subject: [PATCH] Move Device description section up. Remove icon and only display the description when the configuration is not with a connected device. Move Load File button. --- ultimarc/qml/complex/DelegateDetail.qml | 97 +++++++++---------------- 1 file changed, 36 insertions(+), 61 deletions(-) diff --git a/ultimarc/qml/complex/DelegateDetail.qml b/ultimarc/qml/complex/DelegateDetail.qml index 976adee..90a1f93 100644 --- a/ultimarc/qml/complex/DelegateDetail.qml +++ b/ultimarc/qml/complex/DelegateDetail.qml @@ -56,26 +56,41 @@ Item { } ColumnLayout { - x: mainWindow.margin + x: mainWindow.margin - (mainWindow.margin / 2) y: _units.grid_unit - width: parent.width - mainWindow.margin + width: parent.width - (mainWindow.margin - (mainWindow.margin / 2)) spacing: _units.large_spacing * 3 RowLayout { id: tools Layout.fillWidth: true spacing: _units.large_spacing * 3 - Item { + ColumnLayout { Layout.fillWidth: true - } - Button { - text: { - "Load File" + spacing: _units.large_spacing + + Label { + Layout.fillWidth: true + font.pointSize: referenceLabel.font.pointSize + 4 + text: model.device_class_descr } - highlighted: true - onClicked: { - loadFileDialog.fileMode = FileDialog.OpenFile - loadFileDialog.open() + + RowLayout { + width: parent.width + spacing: _units.large_spacing + + Label { + font.pointSize: referenceLabel.font.pointSize + 2 + visible: model.attached + text: model.device_name + opacity: 0.6 + } + + Label { + font.pointSize: referenceLabel.font.pointSize + text: model.attached ? model.device_key : model.description + opacity: 0.6 + } } } Button { @@ -88,62 +103,22 @@ Item { } Button { text: { - "Write File" + "Load File" } highlighted: true onClicked: { - saveFileDialog.fileMode = FileDialog.SaveFile - saveFileDialog.open() - } - } - } - RowLayout { - spacing: _units.large_spacing - Item { - Layout.preferredWidth: Math.round(_units.grid_unit * 3.5) + _units.grid_unit - Layout.preferredHeight: Math.round(_units.grid_unit * 3.5) - Layout.alignment: Qt.AlignHCenter - - IndicatedImage { - anchors.fill: parent - x: _units.grid_unit - source: model.icon - fillMode: Image.PreserveAspectFit - sourceSize.width: parent.width - sourceSize.height: parent.height + loadFileDialog.fileMode = FileDialog.OpenFile + loadFileDialog.open() } } - ColumnLayout { - Layout.fillHeight: true - spacing: _units.large_spacing - RowLayout { - Layout.fillWidth: true - Label { - Layout.fillWidth: true - font.pointSize: referenceLabel.font.pointSize + 4 - text: model.device_class_descr - } - Label { - font.pointSize: referenceLabel.font.pointSize + 2 - visible: model.attached - text: model.device_name - opacity: 0.6 - } + Button { + text: { + "Write File" } - ColumnLayout { - width: parent.width - spacing: _units.large_spacing - Label { - font.pointSize: referenceLabel.font.pointSize + 1 - visible: model.attached - text: model.device_key - opacity: 0.6 - } - Label { - font.pointSize: referenceLabel.font.pointSize - 1 - text: model.description - opacity: 0.6 - } + highlighted: true + onClicked: { + saveFileDialog.fileMode = FileDialog.SaveFile + saveFileDialog.open() } } }