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
575c68d5
Commit
575c68d5
authored
Aug 13, 2017
by
eekkelund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AppSwitcher] Improvements for appswitcher
parent
fd55bad4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
57 deletions
+102
-57
AppSwitcher.qml
src/qml/AppSwitcher.qml
+95
-52
SearchListView.qml
src/qml/SearchListView.qml
+1
-1
SwitcherItem.qml
src/qml/SwitcherItem.qml
+6
-4
No files found.
src/qml/AppSwitcher.qml
View file @
575c68d5
...
...
@@ -74,11 +74,12 @@ Item {
Flickable
{
id
:
flickable
contentHeight
:
gridview
.
height
width
:
closeMode
?
parent
.
width
-
20
:
parent
.
width
// see comment re right anchor below
width
:
closeMode
?
parent
.
width
-
Theme
.
itemSpacingLarge
:
parent
.
width
// see comment re right anchor below
MouseArea
{
height
:
flickable
.
contentHeight
>
flickable
.
height
?
flickable
.
contentHeight
:
flickable
.
height
width
:
flickable
.
width
onPressAndHold
:
closeMode
=
!
closeMode
enabled
:
gridRepeater
.
count
>
0
onClicked
:
{
if
(
closeMode
)
closeMode
=
false
...
...
@@ -87,17 +88,17 @@ Item {
anchors
{
top
:
parent
.
top
topMargin
:
closeMode
?
20
:
0
topMargin
:
closeMode
?
Theme
.
itemSpacingLarge
:
0
bottom
:
toolBar
.
top
left
:
parent
.
left
// no right anchor to avoid double margin (complicated math)
leftMargin
:
closeMode
?
20
:
0
leftMargin
:
closeMode
?
Theme
.
itemSpacingLarge
:
0
}
Grid
{
id
:
gridview
columns
:
2
spacing
:
closeMode
?
20
:
0
spacing
:
closeMode
?
Theme
.
itemSpacingLarge
:
0
move
:
Transition
{
NumberAnimation
{
properties
:
"
x,y
"
...
...
@@ -130,76 +131,118 @@ Item {
}
}
Connections
{
target
:
gridRepeater
onCountChanged
:
{
if
(
gridRepeater
.
count
<
1
)
{
closeMode
=
false
}
}
}
Connections
{
target
:
Lipstick
.
compositor
onDisplayOff
:
{
closeMode
=
false
}
}
Connections
{
target
:
lockScreen
onVisibleChanged
:
{
if
(
lockscreenVisible
())
{
closeMode
=
false
}
}
}
Connections
{
target
:
pager
onFlickEnded
:
{
closeMode
=
false
}
}
Rectangle
{
id
:
toolBar
color
:
'
black
'
color
:
Theme
.
backgroundColor
border
{
width
:
1
color
:
'
#333333
'
color
:
Theme
.
fillDarkColor
}
z
:
202
height
:
toolBarDone
.
height
+
2
*
padding
property
int
padding
:
9
height
:
Theme
.
itemHeightExtraLarge
+
2
*
padding
property
int
padding
:
Theme
.
itemSpacingSmall
anchors
{
left
:
parent
.
left
right
:
parent
.
right
bottom
:
parent
.
bottom
margins
:
-
1
bottomMargin
:
switcherRoot
.
closeMode
?
48
:
-
height
bottomMargin
:
switcherRoot
.
closeMode
?
statusbar
.
height
:
-
height
}
Behavior
on
anchors.bottomMargin
{
PropertyAnimation
{
duration
:
100
}
}
Button
{
id
:
toolBarDone
width
:
parent
.
width
/
3
height
:
width
Row
{
anchors
{
top
:
parent
.
top
topMargin
:
toolBar
.
padding
right
:
parent
.
horizontalCenter
rightMargin
:
toolBar
.
padding
}
onClicked
:
{
switcherRoot
.
closeMode
=
false
;
margins
:
toolBar
.
padding
right
:
parent
.
right
left
:
parent
.
left
bottom
:
parent
.
bottom
}
style
:
ButtonStyle
{
label
:
Label
{
text
:
"
Done
"
anchors.fill
:
parent
anchors.margins
:
10
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
fontSizeMode
:
Text
.
HorizontalFit
anchors.centerIn
:
parent
spacing
:
toolBar
.
padding
*
2
Button
{
id
:
toolBarDone
anchors
{
top
:
parent
.
top
bottom
:
parent
.
bottom
}
width
:
parent
.
width
/
2
-
toolBar
.
padding
onClicked
:
{
switcherRoot
.
closeMode
=
false
;
}
text
:
qsTr
(
"
Done
"
)
//Untill fontSizes are fixed
style
:
ButtonStyle
{
label
:
Text
{
renderType
:
Text
.
NativeRendering
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
control
.
text
color
:
Theme
.
textColor
font.family
:
Theme
.
fontFamily
font.pixelSize
:
Theme
.
fontSizeMedium
font.weight
:
control
.
primary
?
Theme
.
fontWeightLarge
:
Theme
.
fontWeightMedium
opacity
:
control
.
enabled
?
1.0
:
0.3
}
}
}
}
Button
{
id
:
toolBarCloseAll
width
:
toolBarDone
.
width
height
:
width
anchors
{
top
:
parent
.
top
topMargin
:
toolBar
.
padding
left
:
parent
.
horizontalCenter
leftMargin
:
toolBar
.
padding
}
onClicked
:
{
// TODO: use close animation inside item
for
(
var
i
=
gridRepeater
.
count
-
1
;
i
>=
0
;
i
--
)
{
gridRepeater
.
itemAt
(
i
).
close
()
Button
{
id
:
toolBarCloseAll
anchors
{
top
:
parent
.
top
bottom
:
parent
.
bottom
}
}
style
:
ButtonStyle
{
label
:
Label
{
text
:
qsTr
(
"
Close
\n
All
"
)
anchors.margins
:
10
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
fontSizeMode
:
Text
.
Fit
anchors.centerIn
:
parent
width
:
parent
.
width
/
2
-
toolBar
.
padding
onClicked
:
{
// TODO: use close animation inside item
for
(
var
i
=
gridRepeater
.
count
-
1
;
i
>=
0
;
i
--
)
{
gridRepeater
.
itemAt
(
i
).
close
()
}
}
text
:
qsTr
(
"
Close All
"
)
//Untill fontSizes are fixed
style
:
ButtonStyle
{
label
:
Text
{
renderType
:
Text
.
NativeRendering
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
control
.
text
color
:
Theme
.
textColor
font.family
:
Theme
.
fontFamily
font.pixelSize
:
Theme
.
fontSizeMedium
font.weight
:
control
.
primary
?
Theme
.
fontWeightLarge
:
Theme
.
fontWeightMedium
opacity
:
control
.
enabled
?
1.0
:
0.3
}
}
}
}
...
...
src/qml/SearchListView.qml
View file @
575c68d5
...
...
@@ -166,7 +166,7 @@ Item {
//searchableProperty: root.searchableProperty
}
//Orginal function ** Copyright (C) 2013 Jolla Ltd. ** Contact: Joona Petrell <joona.petrell@jollamobile.com>
//Orginal function ** Copyright (C) 2013 Jolla Ltd. ** Contact: Joona Petrell <joona.petrell@jollamobile.com>
**BSD
//Function has been modified
function
update
()
{
if
(
searchString
.
length
<
1
)
{
...
...
src/qml/SwitcherItem.qml
View file @
575c68d5
...
...
@@ -67,6 +67,8 @@ MouseArea {
onClicked
:
{
if
(
!
switcherRoot
.
closeMode
)
{
Lipstick
.
compositor
.
windowToFront
(
model
.
window
);
}
else
{
switcherRoot
.
closeMode
=
false
}
}
...
...
@@ -95,15 +97,15 @@ MouseArea {
script
:
switcherItemRoot
.
close
()
}
}
Label
{
/*
Label {
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
topMargin
:
30
topMargin:
Theme.itemSpacingHuge
}
font.pointSize
:
8
font.pointSize:
Theme.fontSizeTiny
text: Lipstick.compositor.windowForId(model.window).title
}
}
*/
CloseButton
{
id
:
closeButton
...
...
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