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
473f44f3
Commit
473f44f3
authored
Jun 08, 2017
by
m2ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mainly lockscreen functionality, some minor scaling changes
parent
adbe1224
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
130 additions
and
51 deletions
+130
-51
AppSwitcher.qml
src/qml/AppSwitcher.qml
+23
-11
DeviceLockUI.qml
src/qml/DeviceLockUI.qml
+4
-0
FeedsPage.qml
src/qml/FeedsPage.qml
+6
-5
Lockscreen.qml
src/qml/Lockscreen.qml
+1
-1
LockscreenClock.qml
src/qml/LockscreenClock.qml
+40
-13
MainScreen.qml
src/qml/MainScreen.qml
+14
-2
Statusbar.qml
src/qml/Statusbar.qml
+2
-2
compositor.qml
src/qml/compositor.qml
+39
-16
NotificationPreview.qml
src/qml/notifications/NotificationPreview.qml
+1
-1
No files found.
src/qml/AppSwitcher.qml
View file @
473f44f3
...
@@ -22,8 +22,9 @@
...
@@ -22,8 +22,9 @@
// Copyright (c) 2011, Tom Swindell <t.swindell@rubyx.co.uk>
// Copyright (c) 2011, Tom Swindell <t.swindell@rubyx.co.uk>
// Copyright (c) 2012, Timur Kristóf <venemo@fedoraproject.org>
// Copyright (c) 2012, Timur Kristóf <venemo@fedoraproject.org>
import
QtQuick
2.
2
import
QtQuick
2.
6
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
lipstick
0.1
import
QtQuick
.
Controls
1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
org
.
nemomobile
.
glacier
1.0
import
org
.
nemomobile
.
glacier
1.0
...
@@ -33,7 +34,6 @@ import org.nemomobile.glacier 1.0
...
@@ -33,7 +34,6 @@ import org.nemomobile.glacier 1.0
Item
{
Item
{
id
:
switcherRoot
id
:
switcherRoot
property
bool
closeMode
:
false
property
bool
closeMode
:
false
property
bool
visibleInHome
:
false
property
bool
visibleInHome
:
false
property
alias
runningAppsCount
:
switcherModel
.
itemCount
property
alias
runningAppsCount
:
switcherModel
.
itemCount
...
@@ -46,12 +46,32 @@ Item {
...
@@ -46,12 +46,32 @@ Item {
closeMode
=
false
;
closeMode
=
false
;
}
}
}
}
// Empty switcher indicator
Rectangle
{
id
:
topText
visible
:
switcherModel
.
itemCount
===
0
width
:
noAppsLabel
.
width
anchors
{
horizontalCenter
:
parent
.
horizontalCenter
topMargin
:
Theme
.
itemSpacingLarge
}
color
:
"
black
"
Label
{
id
:
noAppsLabel
text
:
qsTr
(
"
No apps open
"
)
anchors
{
top
:
parent
.
top
left
:
parent
.
left
}
font.weight
:
Font
.
Light
font.pointSize
:
Theme
.
fontSizeTiny
}
}
Flickable
{
Flickable
{
id
:
flickable
id
:
flickable
contentHeight
:
gridview
.
height
contentHeight
:
gridview
.
height
width
:
closeMode
?
parent
.
width
-
20
:
parent
.
width
// see comment re right anchor below
width
:
closeMode
?
parent
.
width
-
20
:
parent
.
width
// see comment re right anchor below
MouseArea
{
MouseArea
{
height
:
flickable
.
contentHeight
>
flickable
.
height
?
flickable
.
contentHeight
:
flickable
.
height
height
:
flickable
.
contentHeight
>
flickable
.
height
?
flickable
.
contentHeight
:
flickable
.
height
width
:
flickable
.
width
width
:
flickable
.
width
...
@@ -181,12 +201,4 @@ Item {
...
@@ -181,12 +201,4 @@ Item {
}
}
}
}
}
}
// Empty switcher indicator
Label
{
visible
:
switcherModel
.
itemCount
===
0
text
:
qsTr
(
"
No apps open
"
)
width
:
parent
.
width
fontSizeMode
:
Text
.
HorizontalFit
}
}
}
src/qml/DeviceLockUI.qml
View file @
473f44f3
...
@@ -7,6 +7,8 @@ import QtQuick.Layouts 1.0
...
@@ -7,6 +7,8 @@ import QtQuick.Layouts 1.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
org
.
nemomobile
.
devicelock
1.0
import
"
scripts/desktop.js
"
as
Desktop
Item
{
Item
{
id
:
root
id
:
root
...
@@ -39,6 +41,8 @@ Item {
...
@@ -39,6 +41,8 @@ Item {
id
:
authenticator
id
:
authenticator
onAuthenticated
:
{
onAuthenticated
:
{
DeviceLock
.
unlock
(
authenticationToken
)
DeviceLock
.
unlock
(
authenticationToken
)
Desktop
.
instance
.
setLockScreen
(
false
)
Desktop
.
instance
.
codepadVisible
=
false
}
}
onFeedback
:
{
onFeedback
:
{
console
.
log
(
'
### still locked
'
,
feedback
,
attemptsRemaining
)
console
.
log
(
'
### still locked
'
,
feedback
,
attemptsRemaining
)
...
...
src/qml/FeedsPage.qml
View file @
473f44f3
...
@@ -43,7 +43,7 @@ Flickable {
...
@@ -43,7 +43,7 @@ Flickable {
// Day of week
// Day of week
Rectangle
{
Rectangle
{
id
:
daterow
id
:
daterow
height
:
displayCurrentDate
.
height
+
15
height
:
Theme
.
itemHeightMedium
width
:
childrenRect
.
width
width
:
childrenRect
.
width
anchors
{
anchors
{
...
@@ -59,8 +59,8 @@ Flickable {
...
@@ -59,8 +59,8 @@ Flickable {
id
:
displayDayOfWeek
id
:
displayDayOfWeek
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
dddd
"
)
+
"
,
"
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
dddd
"
)
+
"
,
"
color
:
Theme
.
textColor
color
:
Theme
.
textColor
font.p
ixelSize
:
Theme
.
fontSizeExtraLarge
font.p
ointSize
:
Theme
.
fontSizeTiny
/
1.5
font.
bold
:
true
font.
weight
:
Font
.
Bold
anchors
{
anchors
{
top
:
parent
.
top
top
:
parent
.
top
left
:
parent
.
left
left
:
parent
.
left
...
@@ -71,8 +71,9 @@ Flickable {
...
@@ -71,8 +71,9 @@ Flickable {
Label
{
Label
{
id
:
displayCurrentDate
id
:
displayCurrentDate
text
:
Qt
.
formatDate
(
wallClock
.
time
,
"
d MMMM yyyy
"
)
text
:
Qt
.
formatDate
(
wallClock
.
time
,
"
d MMMM yyyy
"
)
font.p
ixelSize
:
Theme
.
fontSizeExtraLarge
font.p
ointSize
:
Theme
.
fontSizeTiny
/
1.5
color
:
Theme
.
textColor
color
:
Theme
.
textColor
font.weight
:
Font
.
Light
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
anchors
{
anchors
{
left
:
displayDayOfWeek
.
right
left
:
displayDayOfWeek
.
right
...
@@ -86,7 +87,7 @@ Flickable {
...
@@ -86,7 +87,7 @@ Flickable {
width
:
parent
.
width
width
:
parent
.
width
anchors
{
anchors
{
top
:
daterow
.
bottom
top
:
daterow
.
bottom
topMargin
:
50
topMargin
:
Theme
.
itemSpacingHuge
}
}
spacing
:
Theme
.
itemSpacingHuge
spacing
:
Theme
.
itemSpacingHuge
Repeater
{
Repeater
{
...
...
src/qml/Lockscreen.qml
View file @
473f44f3
...
@@ -14,7 +14,6 @@ Image {
...
@@ -14,7 +14,6 @@ Image {
key
:
"
/home/glacier/lockScreen/wallpaperImage
"
key
:
"
/home/glacier/lockScreen/wallpaperImage
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg
"
}
}
LockscreenClock
{
LockscreenClock
{
id
:
clock
id
:
clock
anchors
{
anchors
{
...
@@ -25,6 +24,7 @@ Image {
...
@@ -25,6 +24,7 @@ Image {
}
}
DeviceLockUI
{
DeviceLockUI
{
id
:
deviceLockUI
id
:
deviceLockUI
visible
:
false
//DeviceLock.state === DeviceLock.Locked
anchors
{
anchors
{
top
:
clock
.
bottom
top
:
clock
.
bottom
left
:
parent
.
left
left
:
parent
.
left
...
...
src/qml/LockscreenClock.qml
View file @
473f44f3
import
QtQuick
2.0
import
QtQuick
2.1
import
org
.
nemomobile
.
devicelock
1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
Rectangle
{
Rectangle
{
id
:
lockscreenClock
id
:
lockscreenClock
...
@@ -22,10 +25,10 @@ Rectangle {
...
@@ -22,10 +25,10 @@ Rectangle {
Text
{
Text
{
id
:
timeDisplay
id
:
timeDisplay
font.pointSize
:
16
font.pointSize
:
Theme
.
fontSizeExtraLarge
font.weight
:
Font
.
Light
font.weight
:
Font
.
Light
lineHeight
:
0.85
lineHeight
:
0.85
color
:
"
white
"
color
:
Theme
.
textColor
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
anchors
{
...
@@ -35,22 +38,46 @@ Rectangle {
...
@@ -35,22 +38,46 @@ Rectangle {
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
hh:mm
"
)
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
hh:mm
"
)
}
}
Rectangle
{
id
:
dateRow
height
:
weekdayDisplay
.
height
width
:
weekdayDisplay
.
width
+
dateDisplay
.
width
anchors
{
horizontalCenter
:
parent
.
horizontalCenter
}
Text
{
color
:
"
transparent
"
id
:
dateDisplay
font.pointSize
:
14
Label
{
color
:
"
white
"
id
:
weekdayDisplay
opacity
:
0.8
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
font.pointSize
:
Theme
.
fontSizeTiny
/
1.5
left
:
parent
.
left
color
:
Theme
.
textColor
right
:
parent
.
right
horizontalAlignment
:
Text
.
AlignHCenter
font.weight
:
Font
.
Bold
anchors
{
left
:
parent
.
left
}
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
dddd
"
)
+
"
,
"
}
}
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
<b>dddd</b>, d MMMM yyyy
"
)
Label
{
id
:
dateDisplay
font.pointSize
:
Theme
.
fontSizeTiny
/
1.5
color
:
Theme
.
textColor
horizontalAlignment
:
Text
.
AlignHCenter
font.weight
:
Font
.
Light
anchors
{
left
:
weekdayDisplay
.
right
top
:
parent
.
top
}
text
:
Qt
.
formatDate
(
wallClock
.
time
,
"
d MMMM yyyy
"
)
}
}
}
}
}
}
}
src/qml/MainScreen.qml
View file @
473f44f3
...
@@ -58,7 +58,10 @@ Page {
...
@@ -58,7 +58,10 @@ Page {
id
:
desktop
id
:
desktop
property
alias
lockscreen
:
lockScreen
property
alias
lockscreen
:
lockScreen
property
alias
switcher
:
switcher
property
alias
switcher
:
switcher
property
alias
codepad
:
codePad
property
int
statusBarHeight
:
statusbar
.
height
property
int
statusBarHeight
:
statusbar
.
height
property
bool
codepadVisible
:
false
// Implements back key navigation
// Implements back key navigation
Keys.onReleased
:
{
Keys.onReleased
:
{
...
@@ -142,7 +145,7 @@ Page {
...
@@ -142,7 +145,7 @@ Page {
}
}
// Initial view should be the AppLauncher
// Initial view should be the AppLauncher
currentIndex
:
0
//
currentIndex: 0
}
}
Image
{
Image
{
id
:
wallpaper
id
:
wallpaper
...
@@ -153,10 +156,19 @@ Page {
...
@@ -153,10 +156,19 @@ Page {
}
}
Lockscreen
{
Lockscreen
{
id
:
lockScreen
id
:
lockScreen
visible
:
DeviceLock
.
state
>
=
DeviceLock
.
Locked
visible
:
lockscreenVisible
()
//DeviceLock.state =
= DeviceLock.Locked
width
:
parent
.
width
width
:
parent
.
width
height
:
parent
.
height
height
:
parent
.
height
z
:
200
z
:
200
}
}
DeviceLockUI
{
id
:
codePad
visible
:
DeviceLock
.
state
==
DeviceLock
.
Locked
&&
codepadVisible
width
:
lockScreen
.
width
height
:
lockScreen
.
height
/
2
anchors.centerIn
:
lockScreen
z
:
200
}
}
}
src/qml/Statusbar.qml
View file @
473f44f3
...
@@ -42,13 +42,13 @@ import "statusbar"
...
@@ -42,13 +42,13 @@ import "statusbar"
Item
{
Item
{
id
:
root
id
:
root
z
:
201
z
:
201
height
:
Math
.
min
(
parent
.
width
,
parent
.
height
)
/
10
height
:
Theme
.
itemHeightMedium
width
:
parent
.
width
width
:
parent
.
width
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
Rectangle
{
Rectangle
{
id
:
statusbar
id
:
statusbar
color
:
"
black
"
color
:
Theme
.
fillDarkColor
anchors.fill
:
parent
anchors.fill
:
parent
opacity
:
0.5
opacity
:
0.5
z
:
200
z
:
200
...
...
src/qml/compositor.qml
View file @
473f44f3
...
@@ -135,7 +135,7 @@ Compositor {
...
@@ -135,7 +135,7 @@ Compositor {
property
real
lockThreshold
:
0.25
property
real
lockThreshold
:
0.25
property
int
lockscreenX
property
int
lockscreenX
property
int
lockscreenY
property
int
lockscreenY
enabled
:
DeviceLock
.
state
!=
DeviceLock
.
Locked
enabled
:
!
Desktop
.
instance
.
codepadVisible
//
DeviceLock.state != DeviceLock.Locked
onGestureStarted
:
{
onGestureStarted
:
{
swipeAnimation
.
stop
()
swipeAnimation
.
stop
()
...
@@ -158,27 +158,34 @@ Compositor {
...
@@ -158,27 +158,34 @@ Compositor {
cancelAnimation
.
start
()
cancelAnimation
.
start
()
}
}
}
else
if
(
root
.
homeActive
){
}
else
if
(
root
.
homeActive
){
if
(
gestureArea
.
progress
>=
lockThreshold
)
{
if
(
gestureArea
.
progress
>=
lockThreshold
)
{
lockAnimation
.
valueTo
=
(
gesture
==
"
left
"
?
lockAnimation
.
valueTo
=
(
gesture
==
"
left
"
?
Desktop
.
instance
.
lockscreen
.
width
:
Desktop
.
instance
.
lockscreen
.
width
:
-
Desktop
.
instance
.
lockscreen
.
width
)
-
Desktop
.
instance
.
lockscreen
.
width
)
lockAnimation
.
start
()
lockAnimation
.
start
()
// Locks or unlocks depending if the screen is locked.
// Locks, unlocks or brings up codepad to enter security code
if
(
!
Desktop
.
instance
.
lockscreenVisible
())
{
//Locks
Desktop
.
instance
.
setLockScreen
(
true
)
if
(
!
Desktop
.
instance
.
lockscreenVisible
())
{
Desktop
.
instance
.
setLockScreen
(
true
)
}
//Brings up codepad
else
if
(
Desktop
.
instance
.
lockscreenVisible
()
&&
!
Desktop
.
instance
.
codepad
.
visible
&&
DeviceLock
.
state
==
DeviceLock
.
Locked
)
{
Desktop
.
instance
.
codepadVisible
=
true
}
//Unlocks if no security code required
else
if
(
DeviceLock
.
state
!==
DeviceLock
.
Locked
&&
Desktop
.
instance
.
lockscreenVisible
())
{
Desktop
.
instance
.
setLockScreen
(
false
)
}
}
else
{
}
else
{
Desktop
.
instance
.
setLockScreen
(
false
)
cancelAnimation
.
start
(
)
}
}
}
else
{
cancelAnimation
.
start
()
}
}
}
}
}
states
:
[
states
:
[
State
{
State
{
name
:
"
swipe
"
name
:
"
swipe
"
when
:
DeviceLock
.
state
!=
DeviceLock
.
Locked
when
:
!
Desktop
.
instance
.
codepadVisible
PropertyChanges
{
PropertyChanges
{
target
:
gestureArea
target
:
gestureArea
delayReset
:
true
delayReset
:
true
...
@@ -192,7 +199,7 @@ Compositor {
...
@@ -192,7 +199,7 @@ Compositor {
},
},
State
{
State
{
name
:
"
lock
"
name
:
"
lock
"
when
:
De
viceLock
.
state
==
DeviceLock
.
Locked
when
:
De
sktop
.
instance
.
lockscreenVisible
()
PropertyChanges
{
PropertyChanges
{
target
:
Desktop
.
instance
.
lockscreen
target
:
Desktop
.
instance
.
lockscreen
visible
:
true
visible
:
true
...
@@ -221,7 +228,6 @@ Compositor {
...
@@ -221,7 +228,6 @@ Compositor {
Desktop
.
instance
.
lockscreen
.
width
)
+
gestureArea
.
value
)
)
)
Desktop
.
instance
.
lockscreen
.
width
)
+
gestureArea
.
value
)
)
)
}
}
}
}
]
]
SequentialAnimation
{
SequentialAnimation
{
...
@@ -242,6 +248,23 @@ Compositor {
...
@@ -242,6 +248,23 @@ Compositor {
}
}
}
}
SequentialAnimation
{
id
:
codePadAnimation
property
alias
valueTo
:
valueAnimationCode
.
to
SmoothedAnimation
{
id
:
valueAnimationCode
target
:
Desktop
.
instance
.
codepad
property
:
"
opacity
"
easing.type
:
Easing
.
OutQuint
}
PropertyAction
{
target
:
gestureArea
property
:
"
state
"
value
:
""
}
}
SequentialAnimation
{
SequentialAnimation
{
id
:
lockAnimation
id
:
lockAnimation
property
alias
valueTo
:
valueAnimationLock
.
to
property
alias
valueTo
:
valueAnimationLock
.
to
...
...
src/qml/notifications/NotificationPreview.qml
View file @
473f44f3
...
@@ -145,7 +145,7 @@ Item {
...
@@ -145,7 +145,7 @@ Item {
//bottomMargin: notificationArea.notificationMargin
//bottomMargin: notificationArea.notificationMargin
}
}
font.pixelSize
:
Theme
.
fontSizeLarge
font.pixelSize
:
Theme
.
fontSizeLarge
text
:
"
Notification
"
//
notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewSummary : ""
text
:
notificationPreviewPresenter
.
notification
!=
null
?
notificationPreviewPresenter
.
notification
.
previewSummary
:
""
color
:
Theme
.
textColor
color
:
Theme
.
textColor
clip
:
true
clip
:
true
elide
:
Text
.
ElideRight
elide
:
Text
.
ElideRight
...
...
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