Changeset View
Changeset View
Standalone View
Standalone View
src/controls/BasicListItem.qml
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 89 | source: { | |||
---|---|---|---|---|---|
95 | } | 95 | } | ||
96 | return listItem.icon; | 96 | return listItem.icon; | ||
97 | } | 97 | } | ||
98 | property int size: Units.iconSizes.smallMedium | 98 | property int size: Units.iconSizes.smallMedium | ||
99 | Layout.minimumHeight: size | 99 | Layout.minimumHeight: size | ||
100 | Layout.maximumHeight: size | 100 | Layout.maximumHeight: size | ||
101 | Layout.minimumWidth: size | 101 | Layout.minimumWidth: size | ||
102 | selected: layout.indicateActiveFocus && (listItem.highlighted || listItem.checked || (listItem.pressed && listItem.supportsMouseEvents)) | 102 | selected: layout.indicateActiveFocus && (listItem.highlighted || listItem.checked || (listItem.pressed && listItem.supportsMouseEvents)) | ||
103 | color: selected ? Theme.highlightedTextColor : listItem.Theme.textColor | | |||
104 | opacity: 1 | 103 | opacity: 1 | ||
105 | } | 104 | } | ||
106 | QQC2.Label { | 105 | QQC2.Label { | ||
107 | id: labelItem | 106 | id: labelItem | ||
108 | text: listItem.text | 107 | text: listItem.text | ||
109 | Layout.fillWidth: true | 108 | Layout.fillWidth: true | ||
110 | color: layout.indicateActiveFocus && (listItem.highlighted || listItem.checked || (listItem.pressed && listItem.supportsMouseEvents)) ? listItem.activeTextColor : listItem.textColor | 109 | color: layout.indicateActiveFocus && (listItem.highlighted || listItem.checked || (listItem.pressed && listItem.supportsMouseEvents)) ? listItem.activeTextColor : listItem.textColor | ||
111 | elide: Text.ElideRight | 110 | elide: Text.ElideRight | ||
112 | font: listItem.font | 111 | font: listItem.font | ||
113 | opacity: 1 | 112 | opacity: 1 | ||
114 | } | 113 | } | ||
115 | } | 114 | } | ||
116 | } | 115 | } |