mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
refactor(DeviceInfo.qml): enhance layout and add action buttons in DeviceInfo.qml
This commit is contained in:
+61
-1
@@ -21,10 +21,55 @@ Item {
|
||||
RowLayout {
|
||||
spacing: 12
|
||||
|
||||
ColumnLayout {
|
||||
DeviceImage {
|
||||
iosVersion: info ? info.ios_version_major : 0
|
||||
displayName: v("product_type", "Unknown Device")
|
||||
}
|
||||
RowLayout {
|
||||
//center
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
// implicitHeight: 50
|
||||
spacing: 10
|
||||
//
|
||||
Button {
|
||||
icon.source: "qrc:/resources/icons/ic_outline-power-settings-new.svg"
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
//FIXME: wire up
|
||||
onClicked: {
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
Button {
|
||||
icon.source: "qrc:/resources/icons/ic_twotone-restart-alt.svg"
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
//FIXME: wire up
|
||||
onClicked: {
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
Button {
|
||||
icon.source: "qrc:/resources/icons/hugeicons_wrench-01.svg"
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
//FIXME: wire up
|
||||
onClicked: {
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
@@ -48,12 +93,26 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: grid.implicitHeight + 20 // match your margins
|
||||
// implicitHeight: grid.implicitHeight
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
color: Qt.rgba(255, 255, 255, 0.1)
|
||||
radius: 4
|
||||
z: -1
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
id: grid
|
||||
columns: 4
|
||||
columnSpacing: 14
|
||||
rowSpacing: 8
|
||||
Layout.fillWidth: true
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
|
||||
// Row 0
|
||||
Label { text: "iOS Version:"; font.bold: true }
|
||||
@@ -117,6 +176,7 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DiskUsage {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Reference in New Issue
Block a user