Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
38febbf0
Commit
38febbf0
authored
1 year ago
by
Capucine Berthet
Committed by
Sébastien Blin
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fileSending: enable click on image and video
Change-Id: I48a68504b8b738a8db59337d48a69b16f5731bbe
parent
bd8938b1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/commoncomponents/DataTransferMessageDelegate.qml
+8
-16
8 additions, 16 deletions
src/app/commoncomponents/DataTransferMessageDelegate.qml
src/app/commoncomponents/SBSMessageBase.qml
+28
-6
28 additions, 6 deletions
src/app/commoncomponents/SBSMessageBase.qml
with
36 additions
and
22 deletions
src/app/commoncomponents/DataTransferMessageDelegate.qml
+
8
−
16
View file @
38febbf0
...
...
@@ -285,12 +285,15 @@ Loader {
}
bubble
.
timestampItem
.
timeLabel
.
text
+=
"
-
"
+
txt
bubble
.
color
=
"
transparent
"
if
(
mediaInfo
.
isImage
)
bubble
.
z
=
1
else
timeUnderBubble
=
true
}
onContentWidthChanged
:
{
if
(
bubble
.
timestampItem
.
timeLabel
.
width
>
contentWidth
)
im
ageTooSmall
=
true
t
im
eUnderBubble
=
true
else
{
bubble
.
timestampItem
.
timeColor
=
JamiTheme
.
whiteColor
bubble
.
timestampItem
.
timeLabel
.
opacity
=
1
...
...
@@ -369,13 +372,7 @@ Loader {
localMediaMsgItem
.
contentWidth
=
width
}
HoverHandler
{
target
:
parent
onHoveredChanged
:
{
localMediaMsgItem
.
hoveredLink
=
hovered
?
animatedImg
.
source
:
""
}
cursorShape
:
Qt
.
PointingHandCursor
}
Component.onCompleted
:
localMediaMsgItem
.
bubble
.
imgSource
=
source
LinearGradient
{
id
:
gradient
...
...
@@ -410,6 +407,8 @@ Loader {
asynchronous
:
true
source
:
Body
!==
undefined
?
UtilsAdapter
.
urlFromLocalPath
(
Body
)
:
''
Component.onCompleted
:
localMediaMsgItem
.
bubble
.
imgSource
=
source
// The sourceSize represents the maximum source dimensions.
// This should not be a dynamic binding, as property changes
// (resizing the chat view) here will trigger a reload of the image.
...
...
@@ -447,13 +446,6 @@ Loader {
radius
:
msgRadius
}
}
HoverHandler
{
target
:
parent
onHoveredChanged
:
{
localMediaMsgItem
.
hoveredLink
=
hovered
?
img
.
source
:
""
}
cursorShape
:
Qt
.
PointingHandCursor
}
LinearGradient
{
id
:
gradient
...
...
This diff is collapsed.
Click to expand it.
src/app/commoncomponents/SBSMessageBase.qml
+
28
−
6
View file @
38febbf0
...
...
@@ -63,7 +63,7 @@ Control {
property
real
maxMsgWidth
:
root
.
width
-
senderMargin
-
2
*
hPadding
-
avatarBlockWidth
property
bool
bigMsg
property
bool
im
ageTooSmall
:
false
property
bool
t
im
eUnderBubble
:
false
// If the ListView attached properties are not available,
// then the root delegate is likely a Loader.
...
...
@@ -205,7 +205,16 @@ Control {
RowLayout
{
id
:
msgRowlayout
Layout.preferredHeight
:
innerContent
.
height
+
root
.
extraHeight
+
(
emojiReactions
.
emojis
===
""
?
0
:
emojiReactions
.
height
-
8
)
+
((
IsEmojiOnly
&&
(
root
.
seq
===
MsgSeq
.
last
||
root
.
seq
===
MsgSeq
.
single
)
&&
emojiReactions
.
emojis
===
""
)
||
root
.
imageTooSmall
?
15
:
0
)
Layout.preferredHeight
:
{
var
h
=
innerContent
.
height
+
root
.
extraHeight
;
if
(
emojiReactions
.
emojis
!==
""
)
h
+=
emojiReactions
.
height
-
8
;
if
((
IsEmojiOnly
&&
(
root
.
seq
===
MsgSeq
.
last
||
root
.
seq
===
MsgSeq
.
single
)
&&
emojiReactions
.
emojis
===
""
))
h
+=
15
;
if
(
root
.
timeUnderBubble
)
h
+=
25
;
return
h
;
}
Layout.topMargin
:
((
seq
===
MsgSeq
.
first
||
seq
===
MsgSeq
.
single
)
&&
!
root
.
isReply
)
?
3.5
:
0
Layout.bottomMargin
:
root
.
bigMsg
?
timestampItem
.
timeLabel
.
height
:
0
...
...
@@ -343,27 +352,39 @@ Control {
property
real
timePosition
:
JamiTheme
.
emojiMargins
+
emojiReactions
.
width
+
8
property
alias
timestampItem
:
timestampItem
property
bool
bubbleHovered
property
string
imgSource
width
:
(
Type
===
Interaction
.
Type
.
TEXT
?
root
.
textContentWidth
:
innerContent
.
childrenRect
.
width
)
height
:
innerContent
.
childrenRect
.
height
+
(
visible
?
root
.
extraHeight
:
0
)
+
(
root
.
bigMsg
?
15
:
0
)
HoverHandler
{
target
:
root
enabled
:
Type
===
Interaction
.
Type
.
DATA_TRANSFER
onHoveredChanged
:
{
root
.
hoveredLink
=
enabled
&&
hovered
?
bubble
.
imgSource
:
""
}
}
TimestampInfo
{
id
:
timestampItem
showTime
:
IsEmojiOnly
&&
!
(
root
.
seq
===
MsgSeq
.
last
||
root
.
seq
===
MsgSeq
.
single
)
?
false
:
true
formattedTime
:
root
.
formattedTime
timeColor
:
IsEmojiOnly
||
root
.
im
ageTooSmall
?
(
JamiTheme
.
darkTheme
?
"
white
"
:
"
dark
"
)
:
(
UtilsAdapter
.
luma
(
bubble
.
color
)
?
"
white
"
:
"
dark
"
)
timeColor
:
IsEmojiOnly
||
root
.
t
im
eUnderBubble
?
(
JamiTheme
.
darkTheme
?
"
white
"
:
"
dark
"
)
:
(
UtilsAdapter
.
luma
(
bubble
.
color
)
?
"
white
"
:
"
dark
"
)
timeLabel.opacity
:
0.5
anchors.bottom
:
parent
.
bottom
anchors.right
:
IsEmojiOnly
?
(
isOutgoing
?
parent
.
right
:
undefined
)
:
parent
.
right
anchors.left
:
((
IsEmojiOnly
||
root
.
im
ageTooSmall
)
&&
!
isOutgoing
)
?
parent
.
left
:
undefined
anchors.left
:
((
IsEmojiOnly
||
root
.
t
im
eUnderBubble
)
&&
!
isOutgoing
)
?
parent
.
left
:
undefined
anchors.leftMargin
:
(
IsEmojiOnly
&&
!
isOutgoing
&&
emojiReactions
.
visible
)
?
bubble
.
timePosition
:
0
anchors.rightMargin
:
IsEmojiOnly
?
((
isOutgoing
&&
emojiReactions
.
visible
)
?
bubble
.
timePosition
:
0
)
:
(
root
.
im
ageTooSmall
?
0
:
10
)
anchors.rightMargin
:
IsEmojiOnly
?
((
isOutgoing
&&
emojiReactions
.
visible
)
?
bubble
.
timePosition
:
0
)
:
(
root
.
t
im
eUnderBubble
?
0
:
10
)
timeLabel.Layout.bottomMargin
:
{
if
(
IsEmojiOnly
||
root
.
imageTooSmall
)
if
(
IsEmojiOnly
)
return
-
15
;
if
(
root
.
timeUnderBubble
)
return
-
20
;
if
(
root
.
bigMsg
||
bubble
.
isDeleted
)
return
5
;
return
9
;
...
...
@@ -418,6 +439,7 @@ Control {
}
}
property
bool
bubbleHovered
:
containsMouse
||
textHovered
cursorShape
:
enabled
?
Qt
.
PointingHandCursor
:
Qt
.
ArrowCursor
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment