Make EditableListView more material
This commit is contained in:
@@ -51,24 +51,16 @@ ColumnLayout {
|
|||||||
width: listView.width
|
width: listView.width
|
||||||
height: 45
|
height: 45
|
||||||
|
|
||||||
Rectangle {
|
ItemDelegate {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
contentItem: IconChooserDelegateLayout {
|
||||||
color: isCurrentItem ?
|
|
||||||
Material.color(Material.Purple) :
|
|
||||||
Material.background
|
|
||||||
radius: 0
|
|
||||||
|
|
||||||
Label {
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
//anchors.verticalCenter: parent.verticalCenter
|
|
||||||
id: text
|
|
||||||
text: model[textRole]
|
text: model[textRole]
|
||||||
padding: 10
|
// TODO
|
||||||
fontSizeMode: Text.VerticalFit
|
//iconSource: comboBox.getIconUrl(index)
|
||||||
minimumPixelSize: 10;
|
|
||||||
font.pixelSize: 72
|
|
||||||
}
|
}
|
||||||
|
onClicked: listView.currentIndex = index
|
||||||
|
down: listView.currentIndex === index
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -79,11 +71,6 @@ ColumnLayout {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
visible: index !== (listView.count - 1)
|
visible: index !== (listView.count - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: listView.currentIndex = index
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
focus: true
|
focus: true
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,11 @@ RowLayout {
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
|
Layout.preferredHeight: layout.height
|
||||||
text: layout.text
|
text: layout.text
|
||||||
|
verticalAlignment: Label.AlignVCenter
|
||||||
|
fontSizeMode: Text.VerticalFit
|
||||||
|
font.pixelSize: 20
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Reference in New Issue
Block a user