pragma ComponentBehavior: Bound import QtQuick import Weave.Controls import Weave.Templates as T ItemDelegate { id: root property bool displayCheckmarks property url iconSource property string iconName property color iconColor property size iconSourceSize property url thumbnail property string avatarName highlighted: focus || hovered decoration: root.avatarName.length ? avatarComponent : root.thumbnail.toString().length ? thumbnailComponent : iconComponent Component { id: iconComponent T.IconImage { T.TableLayout.itemStatus: status url: root.iconSource name: root.iconName color: root.iconColor sourceSize: root.iconSourceSize } } Component { id: thumbnailComponent Thumbnail { T.TableLayout.itemStatus: status source: root.thumbnail aspectRatio: Thumbnail.Aspect1_1 size: Thumbnail.ExtraSmall } } Component { id: avatarComponent Avatar { name: root.avatarName source: root.thumbnail size: Avatar.Medium } } indicator: T.IconImage { color: { if (root.checked) { return Theme.component.dropdown.icon.fill.active } else if (root.highlighted) { return Theme.component.dropdown.icon.fill.default } else { return Theme.colorWithAlpha(Theme.component.dropdown.icon.fill.default, 0) } } name: Theme.icon.small("checkmark") visible: root.displayCheckmarks } background: Rectangle { color: { if (root.pressed) { return Theme.component.menu.backgroundColor.pressed } else if (root.enabled && (root.hovered || root.highlighted)) { return Theme.component.menu.backgroundColor.hover } else { return Theme.component.menu.backgroundColor.default } } } }