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
a530db85
Commit
a530db85
authored
2 years ago
by
Aline Gondim Santos
Browse files
Options
Downloads
Patches
Plain Diff
chatview: fix scroll to bottom behavior
Change-Id: Ie010f60784400bdb497a10a656ccb953c8c7ac65 GitLab:
#1022
GitLab:
#1020
parent
34761591
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/mainview/components/MessageListView.qml
+2
-8
2 additions, 8 deletions
src/app/mainview/components/MessageListView.qml
src/app/mainview/components/ScrollToBottomButton.qml
+4
-6
4 additions, 6 deletions
src/app/mainview/components/ScrollToBottomButton.qml
with
6 additions
and
14 deletions
src/app/mainview/components/MessageListView.qml
+
2
−
8
View file @
a530db85
...
...
@@ -31,7 +31,6 @@ import "../../commoncomponents"
JamiListView
{
id
:
root
function
getDistanceToBottom
()
{
const
scrollDiff
=
ScrollBar
.
vertical
.
position
-
(
1.0
-
ScrollBar
.
vertical
.
size
)
...
...
@@ -169,11 +168,7 @@ JamiListView {
topMargin
:
12
spacing
:
2
// this offscreen caching is pretty huge
// displayMarginEnd may be removed
displayMarginBeginning
:
2048
displayMarginEnd
:
2048
maximumFlickVelocity
:
2048
verticalLayoutDirection
:
ListView
.
BottomToTop
boundsBehavior
:
Flickable
.
StopAtBounds
...
...
@@ -238,7 +233,6 @@ JamiListView {
}
onAtYBeginningChanged
:
loadMoreMsgsIfNeeded
()
Connections
{
...
...
@@ -264,9 +258,9 @@ JamiListView {
anchors.bottom
:
root
.
bottom
anchors.bottomMargin
:
JamiTheme
.
chatViewScrollToBottomButtonBottomMargin
anchors.horizontalCenter
:
root
.
horizontalCenter
visible
:
1
-
verticalScrollBar
.
position
>=
verticalScrollBar
.
size
*
2
activeStateTrigger
:
Math
.
abs
(
root
.
contentY
)
>
root
.
height
*
2
onClicked
:
root
.
contentY
=
0
onClicked
:
verticalScrollBar
.
position
=
1
-
verticalScrollBar
.
size
}
header
:
Control
{
...
...
This diff is collapsed.
Click to expand it.
src/app/mainview/components/ScrollToBottomButton.qml
+
4
−
6
View file @
a530db85
...
...
@@ -29,21 +29,16 @@ import "../../commoncomponents"
Control
{
id
:
root
property
alias
activeStateTrigger
:
activeState
.
when
signal
clicked
height
:
jumpToLatestText
.
contentHeight
+
15
width
:
jumpToLatestText
.
contentWidth
+
arrowDropDown
.
width
+
50
opacity
:
0
states
:
State
{
id
:
activeState
name
:
"
active
"
PropertyChanges
{
target
:
root
opacity
:
1
}
when
:
root
.
visible
}
transitions
:
[
...
...
@@ -53,6 +48,8 @@ Control {
target
:
root
duration
:
JamiTheme
.
shortFadeDuration
property
:
"
opacity
"
from
:
0.0
to
:
1.0
}
},
Transition
{
...
...
@@ -61,6 +58,7 @@ Control {
target
:
root
duration
:
JamiTheme
.
shortFadeDuration
property
:
"
opacity
"
from
:
1.0
to
:
0.0
}
}
...
...
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