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 id: avatarToolTip
visible: toolTipImageUrl && hoverHandler.hovered visible: toolTipImageUrl && hoverHandler.hovered
delay: 1000 delay: 1000
backgroundColor: theme.controls.avatar.hoveredImage.background
readonly property int dimension: Math.min( readonly property int dimension: Math.min(
mainUI.width / 1.25, mainUI.width / 1.25,
mainUI.height / 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 { contentItem: HImage {

View File

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

View File

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