Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Phone Components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Plasma
Plasma Phone Components
Commits
422695ba
Commit
422695ba
authored
Jun 21, 2015
by
Marco Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dismiss by scrolling down too
parent
e776e107
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
9 deletions
+37
-9
containments/taskpanel/package/contents/ui/Task.qml
containments/taskpanel/package/contents/ui/Task.qml
+0
-1
containments/taskpanel/package/contents/ui/TaskSwitcher.qml
containments/taskpanel/package/contents/ui/TaskSwitcher.qml
+37
-8
No files found.
containments/taskpanel/package/contents/ui/Task.qml
View file @
422695ba
...
...
@@ -69,7 +69,6 @@ Item {
PlasmaComponents.Label
{
anchors
{
bottom
:
parent
.
bottom
horizontalCenter
:
parent
.
horizontalCenter
left
:
parent
.
left
right
:
parent
.
right
}
...
...
containments/taskpanel/package/contents/ui/TaskSwitcher.qml
View file @
422695ba
...
...
@@ -35,15 +35,26 @@ FullScreenPanel {
property
int
offset
:
0
property
int
overShoot
:
units
.
gridUnit
*
2
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.6
*
(
Math
.
min
(
tasksView
.
contentY
+
window
.
height
,
window
.
height
)
/
window
.
height
))
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.6
*
Math
.
min
(
(
Math
.
min
(
tasksView
.
contentY
+
tasksView
.
height
,
tasksView
.
height
)
/
tasksView
.
height
),
((
tasksView
.
contentHeight
-
tasksView
.
contentY
-
tasksView
.
headerItem
.
height
-
tasksView
.
footerItem
.
height
)
/
tasksView
.
height
)))
function
show
()
{
if
(
!
visible
)
{
tasksView
.
contentY
=
-
tasksView
.
headerItem
.
height
;
}
visible
=
true
;
scrollAnim
.
from
=
tasksView
.
contentY
;
scrollAnim
.
to
=
0
;
scrollAnim
.
running
=
true
;
}
function
hide
()
{
scrollAnim
.
to
=
-
tasksView
.
headerItem
.
height
;
scrollAnim
.
from
=
tasksView
.
contentY
;
if
(
tasksView
.
contentY
+
tasksView
.
headerItem
.
height
<
tasksView
.
contentHeight
/
2
)
{
scrollAnim
.
to
=
-
tasksView
.
headerItem
.
height
;
}
else
{
scrollAnim
.
to
=
tasksView
.
contentHeight
-
tasksView
.
headerItem
.
height
;
}
scrollAnim
.
running
=
true
;
}
...
...
@@ -61,6 +72,7 @@ FullScreenPanel {
SequentialAnimation
{
id
:
scrollAnim
property
alias
to
:
internalAnim
.
to
property
alias
from
:
internalAnim
.
from
ScriptAction
{
script
:
window
.
visible
=
true
;
}
...
...
@@ -73,7 +85,7 @@ FullScreenPanel {
}
ScriptAction
{
script
:
{
if
(
tasksView
.
contentY
<=
-
tasksView
.
headerItem
.
height
)
{
if
(
tasksView
.
contentY
<=
-
tasksView
.
headerItem
.
height
||
tasksView
.
contentY
>=
tasksView
.
contentHeight
-
tasksView
.
headerItem
.
height
)
{
window
.
visible
=
false
;
}
}
...
...
@@ -86,11 +98,12 @@ FullScreenPanel {
cellWidth
:
window
.
width
/
2
cellHeight
:
window
.
height
/
2
onFlickingChanged
:
{
if
(
!
draggingVertically
&&
contentY
<
-
headerItem
.
height
+
window
.
height
)
{
scrollAnim
.
to
=
Math
.
round
(
contentY
/
window
.
height
)
*
window
.
height
scrollAnim
.
running
=
true
;
if
(
!
draggingVertically
&&
contentY
<
-
headerItem
.
height
+
window
.
height
||
(
contentY
+
footerItem
.
height
)
>
(
contentHeight
-
footerItem
.
height
-
window
.
height
/
6
*
5
))
{
window
.
hide
()
;
}
}
onDraggingVerticallyChanged
:
{
if
(
draggingVertically
)
{
return
;
...
...
@@ -108,9 +121,21 @@ FullScreenPanel {
contentY
<
(
-
headerItem
.
height
+
window
.
height
/
6
*
5
))
{
hide
();
return
;
}
if
(
contentY
<
0
)
{
//hide by scrolling down
}
else
if
((
contentY
+
footerItem
.
height
)
>
(
contentHeight
-
footerItem
.
height
-
window
.
height
/
6
*
5
))
{
hide
();
return
;
//show
}
else
if
((
contentY
+
tasksView
.
height
)
>
(
contentHeight
-
headerItem
.
height
-
footerItem
.
height
)
&&
(
contentY
+
tasksView
.
height
)
<
(
contentHeight
-
headerItem
.
height
-
footerItem
.
height
+
window
.
height
/
6
*
5
))
{
scrollAnim
.
from
=
tasksView
.
contentY
;
visible
=
true
;
scrollAnim
.
to
=
contentHeight
-
footerItem
.
height
-
tasksView
.
height
*
2
;
scrollAnim
.
running
=
true
;
return
;
}
else
if
(
contentY
<
0
)
{
show
();
}
}
...
...
@@ -120,6 +145,10 @@ FullScreenPanel {
width
:
window
.
width
height
:
window
.
height
}
footer
:
Item
{
width
:
window
.
width
height
:
window
.
height
}
delegate
:
Task
{}
displaced
:
Transition
{
NumberAnimation
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment