Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Robert Maerkisch
kaidan
Commits
01a4f401
Verified
Commit
01a4f401
authored
Jun 11, 2019
by
Melvin Keskin
Committed by
Linus Jahn
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show presence indicator for contacts as vertical bar to left of avatar
parent
0fe0fadf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
33 deletions
+24
-33
src/qml/elements/RosterListItem.qml
src/qml/elements/RosterListItem.qml
+24
-33
No files found.
src/qml/elements/RosterListItem.qml
View file @
01a4f401
...
@@ -46,17 +46,30 @@ Kirigami.SwipeListItem {
...
@@ -46,17 +46,30 @@ Kirigami.SwipeListItem {
property
int
presenceType
property
int
presenceType
property
string
statusMsg
property
string
statusMsg
topPadding
:
Kirigami
.
Units
.
smallSpacing
*
1.5
topPadding
:
0
leftPadding
:
0
bottomPadding
:
0
height
:
Kirigami
.
Units
.
gridUnit
*
3.5
height
:
Kirigami
.
Units
.
gridUnit
*
3.5
RowLayout
{
RowLayout
{
spacing
:
Kirigami
.
Units
.
gridUnit
*
0.5
spacing
:
Kirigami
.
Units
.
gridUnit
*
0.5
// left side: Avatar
// left border: presence
Rectangle
{
id
:
presenceIndicator
visible
:
presenceType
!==
Enums
.
PresInvisible
width
:
Kirigami
.
Units
.
gridUnit
*
0.2
height
:
parent
.
height
color
:
presenceTypeToColor
(
presenceType
)
}
// left: avatar
Item
{
Item
{
id
:
avatarSpace
id
:
avatarSpace
Layout.preferredHeight
:
parent
.
height
Layout.preferredHeight
:
parent
.
height
-
Kirigami
.
Units
.
gridUnit
*
0.8
Layout.preferredWidth
:
parent
.
height
Layout.preferredWidth
:
parent
.
height
-
Kirigami
.
Units
.
gridUnit
*
0.8
Controls.ToolTip
{
Controls.ToolTip
{
visible
:
hovered
&&
!
Kirigami
.
Settings
.
isMobile
visible
:
hovered
&&
!
Kirigami
.
Settings
.
isMobile
...
@@ -82,28 +95,6 @@ Kirigami.SwipeListItem {
...
@@ -82,28 +95,6 @@ Kirigami.SwipeListItem {
id
:
textAvatar
id
:
textAvatar
name
:
listItem
.
name
name
:
listItem
.
name
}
}
Rectangle
{
id
:
presenceIndicator
visible
:
presenceType
!==
8
// invisible when presence is invalid
anchors.right
:
avatarSpace
.
right
anchors.bottom
:
avatarSpace
.
bottom
width
:
Kirigami
.
Units
.
gridUnit
height
:
Kirigami
.
Units
.
gridUnit
color
:
presenceTypeToColor
(
presenceType
)
radius
:
Math
.
min
(
width
,
height
)
*
0.5
// shadow
layer.enabled
:
presenceIndicator
.
visible
layer.effect
:
DropShadow
{
verticalOffset
:
Kirigami
.
Units
.
gridUnit
*
0.08
horizontalOffset
:
Kirigami
.
Units
.
gridUnit
*
0.08
color
:
Kirigami
.
Theme
.
disabledTextColor
samples
:
10
spread
:
0.1
}
}
}
}
// right side
// right side
...
@@ -138,15 +129,15 @@ Kirigami.SwipeListItem {
...
@@ -138,15 +129,15 @@ Kirigami.SwipeListItem {
font.pixelSize
:
Kirigami
.
Units
.
gridUnit
*
0.8
font.pixelSize
:
Kirigami
.
Units
.
gridUnit
*
0.8
}
}
}
}
}
// unread message counter
// unread message counter
MessageCounter
{
MessageCounter
{
visible
:
unreadMessages
>
0
visible
:
unreadMessages
>
0
counter
:
unreadMessages
counter
:
unreadMessages
Layout.preferredHeight
:
Kirigami
.
Units
.
gridUnit
*
1.25
Layout.preferredHeight
:
Kirigami
.
Units
.
gridUnit
*
1.25
Layout.preferredWidth
:
Kirigami
.
Units
.
gridUnit
*
1.25
Layout.preferredWidth
:
Kirigami
.
Units
.
gridUnit
*
1.25
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment