Add offline icon and fix theme colors
This commit is contained in:
parent
edc8e04ce7
commit
3fa35b88c9
|
@ -14,6 +14,8 @@ HMenu {
|
|||
property string statusMsg
|
||||
property bool firstSyncDone
|
||||
|
||||
onOpened: statusText.forceActiveFocus()
|
||||
|
||||
|
||||
function setPresence(presence, statusMsg = null) {
|
||||
py.callClientCoro(userId, "set_presence", [presence, statusMsg])
|
||||
|
@ -21,7 +23,7 @@ HMenu {
|
|||
|
||||
|
||||
HMenuItem {
|
||||
enabled: presence !== "online" && firstSyncDone
|
||||
enabled: firstSyncDone
|
||||
icon.name: "presence"
|
||||
icon.color: theme.controls.presence.online
|
||||
text: qsTr("Online")
|
||||
|
@ -30,7 +32,7 @@ HMenu {
|
|||
|
||||
HMenuItem {
|
||||
visible: presence
|
||||
enabled: presence !== "unavailable" && firstSyncDone
|
||||
enabled: firstSyncDone
|
||||
icon.name: "presence-busy"
|
||||
icon.color: theme.controls.presence.unavailable
|
||||
text: qsTr("Unavailable")
|
||||
|
@ -38,8 +40,8 @@ HMenu {
|
|||
}
|
||||
|
||||
HMenuItem {
|
||||
enabled: presence !== "offline" && firstSyncDone
|
||||
icon.name: "presence"
|
||||
enabled: firstSyncDone
|
||||
icon.name: "presence-offline"
|
||||
icon.color: theme.controls.presence.offline
|
||||
text: qsTr("Offline")
|
||||
onTriggered: setPresence("offline")
|
||||
|
@ -47,7 +49,7 @@ HMenu {
|
|||
|
||||
HMenuItem {
|
||||
visible: presence
|
||||
enabled: presence !== "invisible" && firstSyncDone
|
||||
enabled: firstSyncDone
|
||||
icon.name: "presence-invisible"
|
||||
icon.color: theme.controls.presence.offline
|
||||
text: qsTr("Invisible")
|
||||
|
@ -78,7 +80,6 @@ HMenu {
|
|||
}
|
||||
|
||||
defaultText: statusMsg
|
||||
placeholderText: qsTr("Beautiful day!")
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
|
|
@ -45,12 +45,9 @@ HTile {
|
|||
TitleRightInfoLabel {
|
||||
tile: member
|
||||
text:
|
||||
(model.presence !== "online") &&
|
||||
model.last_active_ago !== -1 ?
|
||||
"for " +
|
||||
utils.formatRelativeTime(
|
||||
model.last_active_ago
|
||||
) :
|
||||
model.presence !== "online" &&
|
||||
model.last_active_ago !== -1 ?
|
||||
utils.formatRelativeTime(model.last_active_ago) :
|
||||
""
|
||||
}
|
||||
}
|
||||
|
|
68
src/icons/thin/presence-offline.svg
Normal file
68
src/icons/thin/presence-offline.svg
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (unknown)"
|
||||
sodipodi:docname="off.svg"
|
||||
id="svg4"
|
||||
version="1.1"
|
||||
viewBox="0 0 24 24"
|
||||
height="24"
|
||||
width="24">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg4"
|
||||
inkscape:cy="-35.293553"
|
||||
inkscape:cx="-165.29293"
|
||||
inkscape:zoom="1.4657734"
|
||||
showgrid="false"
|
||||
id="namedview6"
|
||||
inkscape:window-height="480"
|
||||
inkscape:window-width="640"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccssccsc"
|
||||
id="path2"
|
||||
d="m 8.602,3.7 c -1.154,1.937 -0.635,5.227 1.424,9.025 0.93,1.712 0.697,3.02 0.338,3.815 C 9.382,18.718 6.689,19.339 3.839,19.996 1.875,20.45 2,20.866 2,24 H 0.005 L 0,22.759 C 0,20.239 0.199,18.784 3.178,18.096 6.543,17.319 9.866,16.623 8.268,13.678 3.535,4.949 6.918,0 12,0 15.321,0 17.97,2.117 17.97,6.167 17.97,9.722 16.021,13 15.587,14 h -2.115 c 0.392,-1.536 2.499,-4.366 2.499,-7.842 0,-5.153 -5.867,-4.985 -7.369,-2.458 z" />
|
||||
<rect
|
||||
transform="rotate(45)"
|
||||
y="-4.5139847"
|
||||
x="26.919304"
|
||||
height="9.0635376"
|
||||
width="1.3396848"
|
||||
id="rect859"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||
<rect
|
||||
transform="rotate(135)"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="rect861"
|
||||
width="1.3396848"
|
||||
height="9.0635376"
|
||||
x="-0.65205783"
|
||||
y="-32.120914" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
|
@ -51,13 +51,13 @@ colors:
|
|||
color strongAccentElement: hsluv(hue, saturation * 1.5, intensity * 72, 1)
|
||||
|
||||
color positiveBackground:
|
||||
hsluv(155, saturation * 1.5, intensity * 52, opacity)
|
||||
hsluv(155, saturation * 1.5, intensity * 52, 1)
|
||||
|
||||
color middleBackground:
|
||||
hsluv(60, saturation * 1.5, intensity * 52, opacity)
|
||||
hsluv(60, saturation * 1.5, intensity * 52, 1)
|
||||
|
||||
color negativeBackground:
|
||||
hsluv(0, saturation * 1.5, intensity * 52, opacity)
|
||||
hsluv(0, saturation * 1.5, intensity * 52, 1)
|
||||
|
||||
color alertBackground: negativeBackground
|
||||
|
||||
|
@ -269,7 +269,7 @@ controls:
|
|||
|
||||
presence:
|
||||
color online: colors.positiveText
|
||||
color unavailable: hsluv(0, 90, 35, 1)
|
||||
color unavailable: colors.warningText
|
||||
color offline: hsluv(0, 0, 30, 1)
|
||||
color border: "black"
|
||||
real opacity: 1.0
|
||||
|
|
|
@ -54,13 +54,13 @@ colors:
|
|||
color strongAccentElement: hsluv(hue, saturation * 1.5, intensity * 72, 1)
|
||||
|
||||
color positiveBackground:
|
||||
hsluv(155, saturation * 1.5, intensity * 52, opacity)
|
||||
hsluv(155, saturation * 1.5, intensity * 52, 1)
|
||||
|
||||
color middleBackground:
|
||||
hsluv(60, saturation * 1.5, intensity * 52, opacity)
|
||||
hsluv(60, saturation * 1.5, intensity * 52, 1)
|
||||
|
||||
color negativeBackground:
|
||||
hsluv(0, saturation * 1.5, intensity * 52, opacity)
|
||||
hsluv(0, saturation * 1.5, intensity * 52, 1)
|
||||
|
||||
color alertBackground: negativeBackground
|
||||
|
||||
|
@ -275,7 +275,7 @@ controls:
|
|||
|
||||
presence:
|
||||
color online: colors.positiveText
|
||||
color unavailable: hsluv(0, 90, 35, 1)
|
||||
color unavailable: colors.warningText
|
||||
color offline: hsluv(0, 0, 30, 1)
|
||||
color border: "black"
|
||||
real opacity: 1.0
|
||||
|
|
Loading…
Reference in New Issue
Block a user