mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
make layout responsive in AppsTab
This commit is contained in:
+14
-8
@@ -181,12 +181,10 @@ Item {
|
||||
|
||||
GridView {
|
||||
id: grid
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
cellWidth: Math.max(250, parent.width / 3)
|
||||
anchors.fill: parent
|
||||
cellWidth: Math.max(250, width / 3)
|
||||
cellHeight: 140
|
||||
model: appModel
|
||||
interactive: true
|
||||
|
||||
delegate: Rectangle {
|
||||
id: rec
|
||||
@@ -217,6 +215,7 @@ Item {
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
spacing: 6
|
||||
|
||||
RowLayout {
|
||||
@@ -226,7 +225,10 @@ Item {
|
||||
Label {
|
||||
text: model.name
|
||||
font.pixelSize: 16
|
||||
wrapMode: Text.WordWrap
|
||||
wrapMode: Text.NoWrap
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -243,8 +245,6 @@ Item {
|
||||
padding: 4
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -252,15 +252,21 @@ Item {
|
||||
color: "#666"
|
||||
font.pixelSize: 12
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
maximumLineCount: 3
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 6
|
||||
// FIXME: wire up click handling
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.minimumWidth: implicitWidth
|
||||
|
||||
Button {
|
||||
text: "Install"
|
||||
// color: "#007AFF"
|
||||
font.pixelSize: 12
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user