Propagate containsMouse property and move the paddingitem to the mousearea
Reviewed by Marco Martin on irc
This commit is contained in:
parent
06d8fea792
commit
25bb220724
@ -71,6 +71,11 @@ Item {
|
||||
//is this to be used as section delegate?
|
||||
property bool sectionDelegate: false
|
||||
|
||||
/**
|
||||
* True if the list item contains mouse
|
||||
*/
|
||||
property alias containsMouse: itemMouse.containsMouse
|
||||
|
||||
width: parent ? parent.width : childrenRect.width
|
||||
height: paddingItem.childrenRect.height + background.margins.top + background.margins.bottom
|
||||
|
||||
@ -120,16 +125,16 @@ Item {
|
||||
onPressed: if (changeBackgroundOnPress) background.prefix = "pressed"
|
||||
onReleased: if (changeBackgroundOnPress) background.prefix = "normal"
|
||||
onCanceled: if (changeBackgroundOnPress) background.prefix = "normal"
|
||||
}
|
||||
|
||||
Item {
|
||||
id: paddingItem
|
||||
anchors {
|
||||
fill: background
|
||||
fill: parent
|
||||
leftMargin: background.margins.left
|
||||
topMargin: background.margins.top
|
||||
rightMargin: background.margins.right
|
||||
bottomMargin: background.margins.bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user