Add presence theme options
This commit is contained in:
parent
8644ddaad4
commit
59198da3b0
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user