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
9df5166e
Commit
9df5166e
authored
Jun 13, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Linphone/Chat/FileMessage): provide an animation on thumbnail
parent
cd8e7414
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
12 deletions
+84
-12
FileMessage.qml
linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml
+69
-2
ChatStyle.qml
...one-desktop/ui/modules/Linphone/Styles/Chat/ChatStyle.qml
+15
-10
No files found.
linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml
View file @
9df5166e
...
...
@@ -106,10 +106,61 @@ Row {
}
Loader
{
id
:
thumbnailProvider
Layout.preferredHeight
:
ChatStyle
.
entry
.
message
.
file
.
thumbnail
.
height
Layout.preferredWidth
:
ChatStyle
.
entry
.
message
.
file
.
thumbnail
.
width
sourceComponent
:
$chatEntry
.
thumbnail
?
thumbnail
:
extension
ScaleAnimator
{
id
:
thumbnailProviderAnimator
target
:
thumbnailProvider
duration
:
ChatStyle
.
entry
.
message
.
file
.
animation
.
duration
easing.type
:
Easing
.
InOutQuad
from
:
1.0
}
states
:
State
{
name
:
'
hovered
'
}
transitions
:
[
Transition
{
from
:
''
to
:
'
hovered
'
ScriptAction
{
script
:
{
if
(
thumbnailProviderAnimator
.
running
)
{
thumbnailProviderAnimator
.
running
=
false
}
thumbnailProvider
.
z
=
Constants
.
zPopup
thumbnailProviderAnimator
.
to
=
ChatStyle
.
entry
.
message
.
file
.
animation
.
to
thumbnailProviderAnimator
.
running
=
true
}
}
},
Transition
{
from
:
'
hovered
'
to
:
''
ScriptAction
{
script
:
{
if
(
thumbnailProviderAnimator
.
running
)
{
thumbnailProviderAnimator
.
running
=
false
}
thumbnailProviderAnimator
.
to
=
1.0
thumbnailProviderAnimator
.
running
=
true
thumbnailProvider
.
z
=
0
}
}
}
]
}
// ---------------------------------------------------------------------
...
...
@@ -193,14 +244,30 @@ Row {
}
MouseArea
{
function
handleMouseMove
(
mouse
)
{
thumbnailProvider
.
state
=
Utils
.
pointIsInItem
(
this
,
thumbnailProvider
,
mouse
)
?
'
hovered
'
:
''
}
anchors.fill
:
parent
cursorShape
:
containsMouse
?
Qt
.
PointingHandCursor
:
Qt
.
ArrowCursor
hoverEnabled
:
true
onClicked
:
proxyModel
.
downloadFile
(
index
)
visible
:
!
rectangle
.
isNotDelivered
&&
!
$chatEntry
.
isOutgoing
onMouseXChanged
:
handleMouseMove
.
call
(
this
,
mouse
)
onMouseYChanged
:
handleMouseMove
.
call
(
this
,
mouse
)
onClicked
:
{
// TODO: Handle open.
if
(
false
&&
Utils
.
pointIsInItem
(
this
,
thumbnailProvider
,
mouse
))
{
proxyModel
.
openFile
(
index
)
}
else
{
proxyModel
.
downloadFile
(
index
)
}
}
}
}
...
...
linphone-desktop/ui/modules/Linphone/Styles/Chat/ChatStyle.qml
View file @
9df5166e
...
...
@@ -66,6 +66,21 @@ QtObject {
property
int
spacing
:
8
property
int
width
:
250
property
QtObject
animation
:
QtObject
{
property
int
duration
:
300
property
real
to
:
1.5
}
property
QtObject
extension
:
QtObject
{
property
QtObject
background
:
QtObject
{
property
color
color
:
Colors
.
l50
}
property
QtObject
text
:
QtObject
{
property
color
color
:
Colors
.
k
}
}
property
QtObject
status
:
QtObject
{
property
int
spacing
:
4
...
...
@@ -83,16 +98,6 @@ QtObject {
}
}
property
QtObject
extension
:
QtObject
{
property
QtObject
background
:
QtObject
{
property
color
color
:
Colors
.
l50
}
property
QtObject
text
:
QtObject
{
property
color
color
:
Colors
.
k
}
}
property
QtObject
thumbnail
:
QtObject
{
property
int
height
:
50
property
int
width
:
50
...
...
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