Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
cf4c4d5c
Commit
cf4c4d5c
authored
Sep 13, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(Avatar): supports images
parent
30e805b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
5 deletions
+33
-5
Avatar.qml
tests/ui/components/contact/Avatar.qml
+28
-5
searchContact.qml
tests/ui/views/mainWindow/searchContact.qml
+5
-0
No files found.
tests/ui/components/contact/Avatar.qml
View file @
cf4c4d5c
import
QtQuick
2.7
import
QtGraphicalEffects
1.0
Rectangle
{
// ===================================================================
Item
{
property
string
username
property
string
imag
e
property
alias
image
:
imageToFilter
.
sourc
e
color
:
'
#8F8F8F
'
radius
:
20
Rectangle
{
anchors.fill
:
parent
color
:
'
#8F8F8F
'
id
:
avatar
radius
:
20
}
Text
{
anchors.centerIn
:
parent
color
:
'
#FFFFFF
'
text
:
(
function
()
{
var
spaceIndex
=
username
.
indexOf
(
'
'
)
var
firstLetter
=
username
.
charAt
(
0
)
...
...
@@ -19,6 +27,21 @@ Rectangle {
return
firstLetter
+
username
.
charAt
(
spaceIndex
+
1
)
})()
color
:
'
#FFFFFF
'
}
Image
{
anchors.fill
:
parent
id
:
imageToFilter
fillMode
:
Image
.
PreserveAspectFit
// Image must be invisible.
// The only visible image is the OpacityMask!
visible
:
false
}
OpacityMask
{
anchors.fill
:
imageToFilter
source
:
imageToFilter
maskSource
:
avatar
}
}
tests/ui/views/mainWindow/searchContact.qml
View file @
cf4c4d5c
...
...
@@ -117,6 +117,11 @@ ColumnLayout {
$presence
:
'
disconnected
'
$username
:
'
Cecelia Cyler
'
}
ListElement
{
$image
:
''
$presence
:
'
disconnected
'
$username
:
'
Toto
'
}
ListElement
{
$image
:
''
$presence
:
'
absent
'
...
...
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