Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-dashboard
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
4
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
cellframe-dashboard
Commits
927be1df
Commit
927be1df
authored
5 years ago
by
jonymt
Browse files
Options
Downloads
Patches
Plain Diff
[*] solved problem with mouse area overlap
[*] solved problem with mouse area overlap
parent
3c981846
No related branches found
No related tags found
1 merge request
!11
Features 2420
Pipeline
#722
passed with stage
Stage: build
in 2 minutes and 37 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml
+62
-24
62 additions, 24 deletions
KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml
with
62 additions
and
24 deletions
KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml
+
62
−
24
View file @
927be1df
...
...
@@ -18,16 +18,20 @@ Rectangle {
}
MouseArea
{
id
:
mainMouseArea
anchors.fill
:
parent
hoverEnabled
:
true
propagateComposedEvents
:
true
property
bool
hoveredButton
:
false
onEntered
:
{
buttonListScroll
.
visible
=
true
;
if
(
!
hoveredButton
)
buttonListScroll
.
visible
=
true
;
}
onExited
:
{
buttonListScroll
.
visible
=
false
;
if
(
!
hoveredButton
)
buttonListScroll
.
visible
=
false
;
}
}
...
...
@@ -69,6 +73,16 @@ Rectangle {
section.criteria
:
ViewSection
.
FullString
section.delegate
:
dapDate
property
var
contentPos
:
0.0
;
onContentYChanged
:
{
if
(
atYBeginning
)
buttonListScroll
.
state
=
"
goUp
"
;
else
if
(
atYEnd
)
buttonListScroll
.
state
=
"
goDown
"
else
if
(
contentPos
<
contentItem
.
y
)
buttonListScroll
.
state
=
"
goUp
"
;
else
buttonListScroll
.
state
=
"
goDown
"
;
contentPos
=
contentItem
.
y
;
}
Component
{
id
:
dapDate
Rectangle
{
...
...
@@ -176,45 +190,69 @@ Rectangle {
source
:
"
qrc:/Resources/Icons/ic_scroll-down.png
"
}
states
:
[
State
{
name
:
"
goDown
"
PropertyChanges
{
target
:
buttonListScroll
onStateChanged
:
{
buttonListScroll
.
anchors
.
top
=
undefined
;
buttonListScroll
.
anchors
.
bottom
=
dapListView
.
bottom
;
buttonMouseArea
.
exited
();
}
}
},
State
{
name
:
"
goUp
"
PropertyChanges
{
target
:
buttonListScroll
onStateChanged
:
{
buttonListScroll
.
anchors
.
bottom
=
undefined
;
buttonListScroll
.
anchors
.
top
=
dapListView
.
top
;
buttonMouseArea
.
exited
();
}
}
}
]
state
:
"
goDown
"
MouseArea
{
id
:
buttonMouseArea
anchors.fill
:
parent
hoverEnabled
:
true
onEntered
:
{
if
(
buttonListScroll
.
listDown
)
mainMouseArea
.
hoveredButton
=
true
;
if
(
buttonListScroll
.
state
===
"
goUp
"
)
imageButton
.
source
=
"
qrc:/Resources/Icons/ic_scroll-down_hover.png
"
;
else
else
if
(
buttonListScroll
.
state
===
"
goDown
"
)
imageButton
.
source
=
"
qrc:/Resources/Icons/ic_scroll-up_hover.png
"
;
}
onExited
:
{
if
(
buttonListScroll
.
listDown
)
mainMouseArea
.
hoveredButton
=
false
;
if
(
buttonListScroll
.
state
===
"
goUp
"
)
imageButton
.
source
=
"
qrc:/Resources/Icons/ic_scroll-down.png
"
;
else
else
if
(
buttonListScroll
.
state
===
"
goDown
"
)
imageButton
.
source
=
"
qrc:/Resources/Icons/ic_scroll-up.png
"
;
}
onPressed
:
{
// TODO: scroll list
buttonListScroll
.
listDown
=
!
buttonListScroll
.
listDown
;
if
(
buttonListScroll
.
listDown
)
{
buttonListScroll
.
anchors
.
top
=
undefined
;
buttonListScroll
.
anchors
.
bottom
=
dapListView
.
bottom
;
onClicked
:
{
if
(
buttonListScroll
.
state
===
"
goUp
"
)
{
dapListView
.
positionViewAtEnd
();
buttonListScroll
.
state
=
"
goDown
"
;
}
else
{
buttonListScroll
.
anchors
.
bottom
=
undefined
;
buttonListScroll
.
anchors
.
top
=
dapListView
.
top
;
else
if
(
buttonListScroll
.
state
===
"
goDown
"
)
{
dapListView
.
positionViewAtBeginning
();
buttonListScroll
.
state
=
"
goUp
"
;
}
exited
();
}
}
}
}
}
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