Add presence theme options

This commit is contained in:
vslg 2020-06-29 23:20:37 -03:00 committed by miruka
parent 8644ddaad4
commit 59198da3b0
3 changed files with 32 additions and 6 deletions

View File

@ -59,10 +59,11 @@ HAvatar {
anchors.right: parent.right
anchors.bottomMargin: -diameter / 2
anchors.rightMargin: -diameter / 2
opacity: theme.controls.presence.opacity
z: 100
property bool small: false
property int diameter: small ? 8 : 13
property bool small: window.settings.compactMode
property int diameter: small ? 10 : 15
sourceComponent: Rectangle {
width: diameter
@ -71,13 +72,24 @@ HAvatar {
anchors.right: parent.right
radius: diameter / 2
// TODO: Let it be thes for now
color:
presence === "online" ?
"green" :
"gray"
border.color: "black"
theme.controls.presence.online :
presence === "unavailable" ?
theme.controls.presence.unavailable :
theme.controls.presence.offline
border.color: theme.controls.presence.border
border.width: diameter / 10
HoverHandler { id: presenceHover }
HToolTip {
visible: presenceHover.hovered
text: presence.replace(/^\w/, c => c.toUpperCase())
}
}
}
}

View File

@ -267,6 +267,13 @@ controls:
int dimSaturation: colors.dimColoredTextSaturation
int dimLightness: colors.dimColoredTextIntensity
presence:
color online: hsluv(125, 100, 80, 1)
color unavailable: hsluv(0, 100, 80, 1)
color offline: hsluv(0, 0, 45, 1)
color border: "black"
real opacity: 0.6
// Specific interface parts

View File

@ -273,6 +273,13 @@ controls:
int dimSaturation: colors.dimColoredTextSaturation
int dimLightness: colors.dimColoredTextIntensity
presence:
color online: hsluv(125, 100, 80, 1)
color unavailable: hsluv(0, 100, 80, 1)
color offline: hsluv(0, 0, 45, 1)
color border: "black"
real opacity: 1.0
// Specific interface parts