Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-qt-ui-qml
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
cellframe
libdap-qt-ui-qml
Merge requests
!18
Features 2923
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Features 2923
features-2923
into
develop
Overview
0
Commits
9
Pipelines
0
Changes
3
Merged
Kirill Anisimov
requested to merge
features-2923
into
develop
5 years ago
Overview
0
Commits
9
Pipelines
0
Changes
3
Expand
Fixed Scroll Button behavior. Images for button are in properties now
👍
0
👎
0
Merge request reports
Compare
develop
version 2
a2385ef3
5 years ago
version 1
df27f481
5 years ago
develop (base)
and
latest version
latest version
8231a1d5
9 commits,
5 years ago
version 2
a2385ef3
8 commits,
5 years ago
version 1
df27f481
7 commits,
5 years ago
3 files
+
169
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
widgets/DapScrollView.qml
0 → 100644
+
121
−
0
Options
import
QtQuick
2.4
DapScrollViewForm
{
// All the logic (including state names and vars) was taken from master branch
// Var for current pos while scrolling (in function updateY())
property
var
contentPos
:
0.0
// Connect to new ListView if changed
onViewDataChanged
:
{
viewData
.
contentYChanged
.
connect
(
updateY
)
}
// Changes position of arrows when scroll
function
updateY
()
{
if
(
viewData
.
atYBeginning
)
{
scrollButton
.
state
=
"
goUp
"
}
else
if
(
viewData
.
atYEnd
)
{
scrollButton
.
state
=
"
goDown
"
}
else
if
(
contentPos
>
viewData
.
contentItem
.
y
)
{
scrollButton
.
state
=
"
goUp
"
}
else
{
scrollButton
.
state
=
"
goDown
"
}
contentPos
=
viewData
.
contentItem
.
y
}
onEntered
:
{
scrollButton
.
visible
=
true
;
}
onExited
:
{
scrollButton
.
visible
=
false
;
}
scrollButton.onEntered
:
{
if
(
scrollButton
.
state
===
"
goUp
"
)
{
scrollButtonImage
.
source
=
scrollDownButtonHoveredImageSource
}
else
if
(
scrollButton
.
state
===
"
goDown
"
)
{
scrollButtonImage
.
source
=
scrollUpButtonHoveredImageSource
}
}
scrollButton.onExited
:
{
if
(
scrollButton
.
state
===
"
goUp
"
)
{
scrollButtonImage
.
source
=
scrollDownButtonImageSource
}
else
if
(
scrollButton
.
state
===
"
goDown
"
)
{
scrollButtonImage
.
source
=
scrollUpButtonImageSource
}
}
scrollButton.onClicked
:
{
if
(
scrollButton
.
state
===
"
goUp
"
)
{
viewData
.
positionViewAtEnd
();
scrollButton
.
state
=
"
goDown
"
;
}
else
if
(
scrollButton
.
state
===
"
goDown
"
)
{
viewData
.
positionViewAtBeginning
();
scrollButton
.
state
=
"
goUp
"
;
}
}
scrollButton.states
:
[
State
{
name
:
"
goDown
"
PropertyChanges
{
target
:
scrollButton
onStateChanged
:
{
scrollButton
.
anchors
.
top
=
undefined
scrollButton
.
anchors
.
bottom
=
parent
.
bottom
scrollButton
.
exited
()
}
}
},
State
{
name
:
"
goUp
"
PropertyChanges
{
target
:
scrollButton
onStateChanged
:
{
scrollButton
.
anchors
.
bottom
=
undefined
scrollButton
.
anchors
.
top
=
parent
.
top
scrollButton
.
exited
()
}
}
}
]
scrollButton.state
:
"
goUp
"
}
Loading