In wrapper Rectangle set height based on menuEntry height. You might want to center Text inside wrapper, as well set smaller width, specify spacing and etc.
Rectangle
{
id: wrapper
width: menuHolder.width
height: menuEntry.height * 1.5 + 20 // * 1.5 if you are using spacing I believe default is 1.0
state: ListView.isCurrentItem ? "selected" : "notselected"
Text //TBD keep text inside box
{
id: menuEntry
font.pointSize: 20
width: parent.width
wrapMode: Text.WordWrap
text: getDisplayString()
clip: true
}
↧