iOS style: draw TreeViewDelegate as highlighted
When TreeView has a selection, or a cell that is otherwise highlighted, the delegate items that are affected should draw themselves as highlighted.. Pick-to: 6.4 Change-Id: Iefa226bb774c94f22582fae481a0649a3fcf069e Reviewed-by: Doris Verria <doris.verria@qt.io>
This commit is contained in:
parent
55fab9a73e
commit
9b4179a98a
|
@ -20,6 +20,11 @@ T.TreeViewDelegate {
|
|||
topPadding: contentItem ? (height - contentItem.implicitHeight) / 2 : 0
|
||||
leftPadding: !mirrored ? leftMargin + __contentIndent : width - leftMargin - __contentIndent - implicitContentWidth
|
||||
|
||||
highlighted: control.selected || control.current
|
||||
|| ((control.treeView.selectionBehavior === TableView.SelectRows
|
||||
|| control.treeView.selectionBehavior === TableView.SelectionDisabled)
|
||||
&& control.row === control.treeView.currentRow)
|
||||
|
||||
required property int row
|
||||
required property var model
|
||||
readonly property real __contentIndent: !isTreeNode ? 0 : (depth * indentation) + (indicator ? indicator.width + spacing : 0)
|
||||
|
@ -54,7 +59,7 @@ T.TreeViewDelegate {
|
|||
NinePatchImage {
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
source: control.IOS.url + "itemdelegate-background"
|
||||
source: control.IOS.url + (control.highlighted ? "itemdelegate-background-pressed" : "itemdelegate-background")
|
||||
NinePatchImageSelector on source {
|
||||
states: [
|
||||
{"light": control.IOS.theme === IOS.Light},
|
||||
|
|
Loading…
Reference in New Issue