Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
glacier-home
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
glacier-home
Commits
119a7fb7
Commit
119a7fb7
authored
Apr 23, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[uninstall] Uninstall/remove areas to homescreen.
parent
0ea10c58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
12 deletions
+53
-12
AppLauncher.qml
src/qml/AppLauncher.qml
+39
-3
LauncherItemDelegate.qml
src/qml/LauncherItemDelegate.qml
+14
-9
No files found.
src/qml/AppLauncher.qml
View file @
119a7fb7
...
...
@@ -24,6 +24,8 @@
import
QtQuick
2.0
import
org
.
nemomobile
.
lipstick
0.1
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
// App Launcher page
// the place for browsing installed applications and launching them
...
...
@@ -35,14 +37,48 @@ GridView {
width
:
Math
.
floor
(
parent
.
width
/
cellWidth
)
*
cellWidth
cacheBuffer
:
gridview
.
contentHeight
property
Item
reorderItem
property
bool
onUninstall
property
alias
deleter
:
deleter
// just for margin purposes
header
:
Item
{
height
:
3
0
height
:
10
0
}
footer
:
Item
{
height
:
20
Item
{
id
:
deleter
anchors.top
:
parent
.
top
property
alias
remove
:
remove
property
alias
uninstall
:
uninstall
Rectangle
{
id
:
remove
property
alias
text
:
lbl
.
text
visible
:
onUninstall
height
:
110
color
:
"
red
"
width
:
gridview
.
width
/
2
Label
{
id
:
lbl
anchors.centerIn
:
parent
text
:
"
Remove
"
font.pointSize
:
8
}
}
Rectangle
{
id
:
uninstall
property
alias
text
:
lbl2
.
text
anchors.left
:
remove
.
right
visible
:
onUninstall
color
:
"
red
"
width
:
gridview
.
width
/
2
height
:
110
Label
{
id
:
lbl2
anchors.centerIn
:
parent
text
:
"
Uninstall
"
font.pointSize
:
8
}
}
}
model
:
LauncherModel
{
id
:
launcherModel
}
...
...
src/qml/LauncherItemDelegate.qml
View file @
119a7fb7
...
...
@@ -74,6 +74,7 @@ Item {
drag
.
target
=
launcherItem
z
=
1000
reordering
=
true
gridview
.
onUninstall
=
true
// don't allow dragging an icon out of pages with a horizontal flick
pager
.
interactive
=
false
...
...
@@ -85,9 +86,14 @@ Item {
reorderTimer
.
stop
()
drag
.
target
=
null
reorderItem
=
null
pager
.
interactive
=
true
gridview
.
onUninstall
=
false
deleter
.
remove
.
text
=
"
Remove
"
deleter
.
uninstall
.
text
=
"
Uninstall
"
reparent
(
gridview
.
contentItem
)
slideMoveAnim
.
start
()
pager
.
interactive
=
true
}
}
...
...
@@ -102,18 +108,17 @@ Item {
if
(
reordering
)
{
var
gridViewPos
=
gridview
.
contentItem
.
mapFromItem
(
launcherItem
,
width
/
2
,
height
/
2
)
var
idx
=
gridview
.
indexAt
(
gridViewPos
.
x
,
gridViewPos
.
y
)
var
delPos
=
deleter
.
remove
.
mapFromItem
(
launcherItem
,
width
/
2
,
height
/
2
)
var
isdel
=
deleter
.
childAt
(
delPos
.
x
,
delPos
.
y
)
if
(
isdel
===
deleter
.
remove
)
{
deleter
.
remove
.
text
=
"
Removing
"
+
iconCaption
}
else
if
(
isdel
===
deleter
.
uninstall
)
{
deleter
.
uninstall
.
text
=
"
Uninstalling
"
+
iconCaption
}
if
(
newIndex
!==
idx
)
{
reorderTimer
.
restart
()
newIndex
=
idx
}
/*
var globalY = desktop.mapFromItem(launcherItem, 0, 0).y
if (globalY < 70) {
pageChangeTimer.start()
} else {
pageChangeTimer.stop()
}
*/
}
}
...
...
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