mirror of
https://github.com/JulianGro/overte.git
synced 2025-06-16 11:59:03 +02:00
move highlight under the green wearable indicator, use internal highlight of ShadowImage instead of extra Rectangle
This commit is contained in:
parent
8a8f599583
commit
bd719286d8
3 changed files with 10 additions and 11 deletions
|
@ -467,9 +467,13 @@ Rectangle {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
property bool highlighted: delegateRoot.GridView.isCurrentItem
|
||||||
|
|
||||||
AvatarThumbnail {
|
AvatarThumbnail {
|
||||||
id: favoriteAvatarImage
|
id: favoriteAvatarImage
|
||||||
imageUrl: url
|
imageUrl: url
|
||||||
|
border.color: container.highlighted ? style.colors.blueHighlight : 'transparent'
|
||||||
|
border.width: container.highlighted ? 2 : 0
|
||||||
wearablesCount: (wearables && wearables !== '') ? wearables.split('|').length : 0
|
wearablesCount: (wearables && wearables !== '') ? wearables.split('|').length : 0
|
||||||
onWearablesCountChanged: {
|
onWearablesCountChanged: {
|
||||||
console.debug('delegate: AvatarThumbnail.wearablesCount: ', wearablesCount)
|
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 {
|
Colorize {
|
||||||
anchors.fill: favoriteAvatarImage
|
anchors.fill: favoriteAvatarImage
|
||||||
source: favoriteAvatarImage
|
source: favoriteAvatarImage
|
||||||
saturation: 0.2
|
saturation: 0.2
|
||||||
visible: isInManageState && !highlight.visible
|
visible: isInManageState && !container.highlighted
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
text: "{"
|
text: "{"
|
||||||
visible: isInManageState && !highlight.visible
|
visible: isInManageState && !container.highlighted
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
size: 56
|
size: 56
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import QtQuick 2.9
|
||||||
Item {
|
Item {
|
||||||
width: 92
|
width: 92
|
||||||
height: 92
|
height: 92
|
||||||
|
property alias wearableIndicator: indicator
|
||||||
|
|
||||||
property int wearablesCount: 0
|
property int wearablesCount: 0
|
||||||
onWearablesCountChanged: {
|
onWearablesCountChanged: {
|
||||||
|
@ -14,6 +15,7 @@ Item {
|
||||||
property alias dropShadowVerticalOffset: avatarImage.dropShadowVerticalOffset
|
property alias dropShadowVerticalOffset: avatarImage.dropShadowVerticalOffset
|
||||||
|
|
||||||
property alias imageUrl: avatarImage.source
|
property alias imageUrl: avatarImage.source
|
||||||
|
property alias border: avatarImage.border
|
||||||
|
|
||||||
ShadowImage {
|
ShadowImage {
|
||||||
id: avatarImage
|
id: avatarImage
|
||||||
|
@ -22,6 +24,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
AvatarWearablesIndicator {
|
AvatarWearablesIndicator {
|
||||||
|
id: indicator
|
||||||
anchors.left: avatarImage.left
|
anchors.left: avatarImage.left
|
||||||
anchors.bottom: avatarImage.bottom
|
anchors.bottom: avatarImage.bottom
|
||||||
anchors.leftMargin: 57
|
anchors.leftMargin: 57
|
||||||
|
|
|
@ -8,6 +8,7 @@ Item {
|
||||||
property alias dropShadowHorizontalOffset: shadow.horizontalOffset
|
property alias dropShadowHorizontalOffset: shadow.horizontalOffset
|
||||||
property alias dropShadowVerticalOffset: shadow.verticalOffset
|
property alias dropShadowVerticalOffset: shadow.verticalOffset
|
||||||
property alias radius: image.radius
|
property alias radius: image.radius
|
||||||
|
property alias border: image.border
|
||||||
|
|
||||||
RoundImage {
|
RoundImage {
|
||||||
id: image
|
id: image
|
||||||
|
|
Loading…
Reference in a new issue