move highlight under the green wearable indicator, use internal highlight of ShadowImage instead of extra Rectangle

This commit is contained in:
Alexander Ivash 2018-04-27 13:10:58 +03:00
parent 8a8f599583
commit bd719286d8
3 changed files with 10 additions and 11 deletions

View file

@ -467,9 +467,13 @@ Rectangle {
}
]
property bool highlighted: delegateRoot.GridView.isCurrentItem
AvatarThumbnail {
id: favoriteAvatarImage
imageUrl: url
border.color: container.highlighted ? style.colors.blueHighlight : 'transparent'
border.width: container.highlighted ? 2 : 0
wearablesCount: (wearables && wearables !== '') ? wearables.split('|').length : 0
onWearablesCountChanged: {
console.debug('delegate: AvatarThumbnail.wearablesCount: ', wearablesCount)
@ -546,26 +550,17 @@ Rectangle {
}
}
Rectangle {
id: highlight
anchors.fill: favoriteAvatarImage
visible: delegateRoot.GridView.isCurrentItem
color: 'transparent'
border.width: 2
border.color: style.colors.blueHighlight
}
Colorize {
anchors.fill: favoriteAvatarImage
source: favoriteAvatarImage
saturation: 0.2
visible: isInManageState && !highlight.visible
visible: isInManageState && !container.highlighted
}
HiFiGlyphs {
anchors.fill: parent
text: "{"
visible: isInManageState && !highlight.visible
visible: isInManageState && !container.highlighted
horizontalAlignment: Text.AlignHCenter
size: 56
}

View file

@ -3,6 +3,7 @@ import QtQuick 2.9
Item {
width: 92
height: 92
property alias wearableIndicator: indicator
property int wearablesCount: 0
onWearablesCountChanged: {
@ -14,6 +15,7 @@ Item {
property alias dropShadowVerticalOffset: avatarImage.dropShadowVerticalOffset
property alias imageUrl: avatarImage.source
property alias border: avatarImage.border
ShadowImage {
id: avatarImage
@ -22,6 +24,7 @@ Item {
}
AvatarWearablesIndicator {
id: indicator
anchors.left: avatarImage.left
anchors.bottom: avatarImage.bottom
anchors.leftMargin: 57

View file

@ -8,6 +8,7 @@ Item {
property alias dropShadowHorizontalOffset: shadow.horizontalOffset
property alias dropShadowVerticalOffset: shadow.verticalOffset
property alias radius: image.radius
property alias border: image.border
RoundImage {
id: image