Skip to content

Commit

Permalink
Move Device description section up. Remove icon and only display the …
Browse files Browse the repository at this point in the history
…description when the configuration is not with a connected device. Move Load File button.
  • Loading branch information
katie-snow committed Dec 22, 2024
1 parent aa0c44d commit 09c82a3
Showing 1 changed file with 36 additions and 61 deletions.
97 changes: 36 additions & 61 deletions ultimarc/qml/complex/DelegateDetail.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}
}
}
Expand Down

0 comments on commit 09c82a3

Please sign in to comment.