ListView's Highlight Rectangle Height
-
I have this listview:
@ListView {
id: list1
x: -1
y: 14
width: modalList.width - 20
height: modalList.height - 20
anchors.horizontalCenter: parent.horizontalCenter
clip: false
z: 1
visible: true
anchors.top: modalList.top
anchors.bottom: parent.bottom
highlight: Rectangle { color: "#b5b5b5"; radius: 5; height: 80; width: modalList.width; clip: false; anchors.horizontalCenter: parent.horizontalCenter }
highlightMoveDuration: 250
highlightMoveSpeed: 450
focus: true
spacing: 12
snapMode: ListView.SnapToItemmodel: innerModel delegate: Text { x:10 y:10 clip: true text: name color: "#333333" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize:36 font.bold: true font.family: "Arial" }@
And despite the fact that I set my highlight rectangle to be 80 pixels tall it always just takes on the height of the letters being displayed in the list. Any ideas on why I cannot control this? I have full control over width.
-
Highlight is controlled by list, so if you want to have bigger highlight you need to have bigger list elements. As I see you don't set their height, maybe it will help?
-
How do I control the size of the list items?