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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
4619f04f
Commit
4619f04f
authored
1 year ago
by
Mathéo Joseph
Browse files
Options
Downloads
Patches
Plain Diff
emojireaction: fix maxMsgWidth is not defined error
Change-Id: Id6229ff59c5b896ffe72068e91fc70e334c11aad
parent
ae2380c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/commoncomponents/SBSMessageBase.qml
+8
-6
8 additions, 6 deletions
src/app/commoncomponents/SBSMessageBase.qml
src/app/commoncomponents/TextMessageDelegate.qml
+4
-5
4 additions, 5 deletions
src/app/commoncomponents/TextMessageDelegate.qml
with
12 additions
and
11 deletions
src/app/commoncomponents/SBSMessageBase.qml
+
8
−
6
View file @
4619f04f
...
...
@@ -60,6 +60,8 @@ Control {
property
real
textContentHeight
property
bool
isReply
:
ReplyTo
!==
""
property
real
maxMsgWidth
:
root
.
width
-
senderMargin
-
2
*
hPadding
-
avatarBlockWidth
// If the ListView attached properties are not available,
// then the root delegate is likely a Loader.
readonly
property
ListView
listView
:
ListView
.
view
?
ListView
.
view
:
parent
.
ListView
.
view
...
...
@@ -350,7 +352,7 @@ Control {
height
:
contentHeight
+
5
reactions
:
Reactions
borderColor
:
root
.
getBaseColor
()
maxWidth
:
2
/
3
*
maxMsgWidth
-
JamiTheme
.
emojiMargins
maxWidth
:
2
/
3
*
maxMsgWidth
-
JamiTheme
.
emojiMargins
state
:
root
.
isOutgoing
?
"
anchorsRight
"
:
(
emojiReactions
.
width
>
bubble
.
width
-
JamiTheme
.
emojiMargins
?
"
anchorsLeft
"
:
"
anchorsRight
"
)
...
...
@@ -364,12 +366,12 @@ Control {
State
{
name
:
"
anchorsRight
"
AnchorChanges
{
target
:
emojiReactions
;
target
:
emojiReactions
anchors.right
:
bubble
.
right
anchors.left
:
undefined
}
PropertyChanges
{
target
:
emojiReactions
;
target
:
emojiReactions
anchors.rightMargin
:
JamiTheme
.
emojiMargins
anchors.leftMargin
:
0
}
...
...
@@ -377,12 +379,12 @@ Control {
State
{
name
:
"
anchorsLeft
"
AnchorChanges
{
target
:
emojiReactions
;
target
:
emojiReactions
anchors.right
:
undefined
anchors.left
:
bubble
.
left
anchors.left
:
bubble
.
left
}
PropertyChanges
{
target
:
emojiReactions
;
target
:
emojiReactions
anchors.rightMargin
:
0
anchors.leftMargin
:
JamiTheme
.
emojiMargins
}
...
...
This diff is collapsed.
Click to expand it.
src/app/commoncomponents/TextMessageDelegate.qml
+
4
−
5
View file @
4619f04f
...
...
@@ -30,15 +30,14 @@ SBSMessageBase {
property
bool
isRemoteImage
property
bool
isEmojiOnly
:
IsEmojiOnly
property
real
maxMsgWidth
:
root
.
width
-
senderMargin
-
2
*
hPadding
-
avatarBlockWidth
property
string
colorUrl
:
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewLinkColorLight
:
JamiTheme
.
chatviewLinkColorDark
property
string
colorText
:
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewTextColorLight
:
JamiTheme
.
chatviewTextColorDark
Connections
{
target
:
bubble
function
onColorChanged
(
color
)
{
root
.
colorUrl
=
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewLinkColorLight
:
JamiTheme
.
chatviewLinkColorDark
root
.
colorText
=
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewTextColorLight
:
JamiTheme
.
chatviewTextColorDark
root
.
colorUrl
=
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewLinkColorLight
:
JamiTheme
.
chatviewLinkColorDark
;
root
.
colorText
=
UtilsAdapter
.
luma
(
bubble
.
color
)
?
JamiTheme
.
chatviewTextColorLight
:
JamiTheme
.
chatviewTextColorDark
;
// Update parsed body with correct colors
if
(
Body
!==
""
)
MessagesAdapter
.
parseMessage
(
Id
,
Body
,
UtilsAdapter
.
getAppValue
(
Settings
.
DisplayHyperlinkPreviews
),
root
.
colorUrl
,
bubble
.
color
);
...
...
@@ -65,7 +64,7 @@ SBSMessageBase {
text
:
{
if
(
Body
!==
""
&&
ParsedBody
.
length
===
0
)
{
MessagesAdapter
.
parseMessage
(
Id
,
Body
,
UtilsAdapter
.
getAppValue
(
Settings
.
DisplayHyperlinkPreviews
),
root
.
colorUrl
,
bubble
.
color
);
return
""
return
""
;
}
return
(
ParsedBody
!==
""
)
?
ParsedBody
:
"
<i>(
"
+
JamiStrings
.
deletedMessage
+
"
)</i>
"
;
}
...
...
@@ -277,5 +276,5 @@ SBSMessageBase {
duration
:
100
}
}
Component.onCompleted
:
opacity
=
1
;
Component.onCompleted
:
opacity
=
1
}
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