Transparent black for hovered avatar background

Also add theme property to change it.
This commit is contained in:
miruka 2019-09-12 20:04:46 -04:00
parent fcdd960779
commit ebf6d36c01
3 changed files with 8 additions and 2 deletions

View File

@ -58,11 +58,13 @@ Rectangle {
id: avatarToolTip
visible: toolTipImageUrl && hoverHandler.hovered
delay: 1000
backgroundColor: theme.controls.avatar.hoveredImage.background
readonly property int dimension: Math.min(
mainUI.width / 1.25,
mainUI.height / 1.25,
theme.controls.avatar.hoveredSize + background.border.width * 2
theme.controls.avatar.hoveredImage.size +
background.border.width * 2,
)
contentItem: HImage {

View File

@ -9,6 +9,7 @@ ToolTip {
property alias label: label
property alias backgroundColor: background.color
background: Rectangle {

View File

@ -182,7 +182,10 @@ controls:
avatar:
int size: baseElementsHeight
int radius: theme.radius
int hoveredSize: 192
hoveredImage:
int size: 192
color background: hsluv(0, 0, 0, 0.4)
background:
int saturation: colors.saturation + 10