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 @@
// Copyright (c) 2011, Tom Swindell <t.swindell@rubyx.co.uk>
// Copyright (c) 2012, Timur Kristóf <venemo@fedoraproject.org>
import
QtQuick
2.
2
import
QtQuick
2.
6
import
org
.
nemomobile
.
lipstick
0.1
import
QtQuick
.
Controls
1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
org
.
nemomobile
.
glacier
1.0
...
...
@@ -33,7 +34,6 @@ import org.nemomobile.glacier 1.0
Item
{
id
:
switcherRoot
property
bool
closeMode
:
false
property
bool
visibleInHome
:
false
property
alias
runningAppsCount
:
switcherModel
.
itemCount
...
...
@@ -46,12 +46,32 @@ Item {
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
{
id
:
flickable
contentHeight
:
gridview
.
height
width
:
closeMode
?
parent
.
width
-
20
:
parent
.
width
// see comment re right anchor below
MouseArea
{
height
:
flickable
.
contentHeight
>
flickable
.
height
?
flickable
.
contentHeight
:
flickable
.
height
width
:
flickable
.
width
...
...
@@ -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
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
"
scripts/desktop.js
"
as
Desktop
Item
{
id
:
root
...
...
@@ -39,6 +41,8 @@ Item {
id
:
authenticator
onAuthenticated
:
{
DeviceLock
.
unlock
(
authenticationToken
)
Desktop
.
instance
.
setLockScreen
(
false
)
Desktop
.
instance
.
codepadVisible
=
false
}
onFeedback
:
{
console
.
log
(
'
### still locked
'
,
feedback
,
attemptsRemaining
)
...
...
src/qml/FeedsPage.qml
View file @
473f44f3
...
...
@@ -43,7 +43,7 @@ Flickable {
// Day of week
Rectangle
{
id
:
daterow
height
:
displayCurrentDate
.
height
+
15
height
:
Theme
.
itemHeightMedium
width
:
childrenRect
.
width
anchors
{
...
...
@@ -59,8 +59,8 @@ Flickable {
id
:
displayDayOfWeek
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
dddd
"
)
+
"
,
"
color
:
Theme
.
textColor
font.p
ixelSize
:
Theme
.
fontSizeExtraLarge
font.
bold
:
true
font.p
ointSize
:
Theme
.
fontSizeTiny
/
1.5
font.
weight
:
Font
.
Bold
anchors
{
top
:
parent
.
top
left
:
parent
.
left
...
...
@@ -71,8 +71,9 @@ Flickable {
Label
{
id
:
displayCurrentDate
text
:
Qt
.
formatDate
(
wallClock
.
time
,
"
d MMMM yyyy
"
)
font.p
ixelSize
:
Theme
.
fontSizeExtraLarge
font.p
ointSize
:
Theme
.
fontSizeTiny
/
1.5
color
:
Theme
.
textColor
font.weight
:
Font
.
Light
wrapMode
:
Text
.
WordWrap
anchors
{
left
:
displayDayOfWeek
.
right
...
...
@@ -86,7 +87,7 @@ Flickable {
width
:
parent
.
width
anchors
{
top
:
daterow
.
bottom
topMargin
:
50
topMargin
:
Theme
.
itemSpacingHuge
}
spacing
:
Theme
.
itemSpacingHuge
Repeater
{
...
...
src/qml/Lockscreen.qml
View file @
473f44f3
...
...
@@ -14,7 +14,6 @@ Image {
key
:
"
/home/glacier/lockScreen/wallpaperImage
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg
"
}
LockscreenClock
{
id
:
clock
anchors
{
...
...
@@ -25,6 +24,7 @@ Image {
}
DeviceLockUI
{
id
:
deviceLockUI
visible
:
false
//DeviceLock.state === DeviceLock.Locked
anchors
{
top
:
clock
.
bottom
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
{
id
:
lockscreenClock
...
...
@@ -22,10 +25,10 @@ Rectangle {
Text
{
id
:
timeDisplay
font.pointSize
:
16
font.pointSize
:
Theme
.
fontSizeExtraLarge
font.weight
:
Font
.
Light
lineHeight
:
0.85
color
:
"
white
"
color
:
Theme
.
textColor
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
...
...
@@ -35,22 +38,46 @@ Rectangle {
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
hh:mm
"
)
}
Rectangle
{
id
:
dateRow
height
:
weekdayDisplay
.
height
width
:
weekdayDisplay
.
width
+
dateDisplay
.
width
anchors
{
horizontalCenter
:
parent
.
horizontalCenter
}
Text
{
id
:
dateDisplay
color
:
"
transparent
"
font.pointSize
:
14
color
:
"
white
"
opacity
:
0.8
horizontalAlignment
:
Text
.
AlignHCenter
Label
{
id
:
weekdayDisplay
anchors
{
left
:
parent
.
left
right
:
parent
.
right
font.pointSize
:
Theme
.
fontSizeTiny
/
1.5
color
:
Theme
.
textColor
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 {
id
:
desktop
property
alias
lockscreen
:
lockScreen
property
alias
switcher
:
switcher
property
alias
codepad
:
codePad
property
int
statusBarHeight
:
statusbar
.
height
property
bool
codepadVisible
:
false
// Implements back key navigation
Keys.onReleased
:
{
...
...
@@ -142,7 +145,7 @@ Page {
}
// Initial view should be the AppLauncher
currentIndex
:
0
//
currentIndex: 0
}
Image
{
id
:
wallpaper
...
...
@@ -153,10 +156,19 @@ Page {
}
Lockscreen
{
id
:
lockScreen
visible
:
DeviceLock
.
state
>
=
DeviceLock
.
Locked
visible
:
lockscreenVisible
()
//DeviceLock.state =
= DeviceLock.Locked
width
:
parent
.
width
height
:
parent
.
height
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"
Item
{
id
:
root
z
:
201
height
:
Math
.
min
(
parent
.
width
,
parent
.
height
)
/
10
height
:
Theme
.
itemHeightMedium
width
:
parent
.
width
anchors.bottom
:
parent
.
bottom
Rectangle
{
id
:
statusbar
color
:
"
black
"
color
:
Theme
.
fillDarkColor
anchors.fill
:
parent
opacity
:
0.5
z
:
200
...
...
src/qml/compositor.qml
View file @
473f44f3
...
...
@@ -135,7 +135,7 @@ Compositor {
property
real
lockThreshold
:
0.25
property
int
lockscreenX
property
int
lockscreenY
enabled
:
DeviceLock
.
state
!=
DeviceLock
.
Locked
enabled
:
!
Desktop
.
instance
.
codepadVisible
//
DeviceLock.state != DeviceLock.Locked
onGestureStarted
:
{
swipeAnimation
.
stop
()
...
...
@@ -158,27 +158,34 @@ Compositor {
cancelAnimation
.
start
()
}
}
else
if
(
root
.
homeActive
){
if
(
gestureArea
.
progress
>=
lockThreshold
)
{
lockAnimation
.
valueTo
=
(
gesture
==
"
left
"
?
Desktop
.
instance
.
lockscreen
.
width
:
-
Desktop
.
instance
.
lockscreen
.
width
)
lockAnimation
.
start
()
// Locks or unlocks depending if the screen is locked.
if
(
!
Desktop
.
instance
.
lockscreenVisible
())
{
Desktop
.
instance
.
setLockScreen
(
true
)
if
(
gestureArea
.
progress
>=
lockThreshold
)
{
lockAnimation
.
valueTo
=
(
gesture
==
"
left
"
?
Desktop
.
instance
.
lockscreen
.
width
:
-
Desktop
.
instance
.
lockscreen
.
width
)
lockAnimation
.
start
()
// Locks, unlocks or brings up codepad to enter security code
//Locks
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
{
Desktop
.
instance
.
setLockScreen
(
false
)
cancelAnimation
.
start
(
)
}
}
else
{
cancelAnimation
.
start
()
}
}
}
states
:
[
State
{
name
:
"
swipe
"
when
:
DeviceLock
.
state
!=
DeviceLock
.
Locked
when
:
!
Desktop
.
instance
.
codepadVisible
PropertyChanges
{
target
:
gestureArea
delayReset
:
true
...
...
@@ -192,7 +199,7 @@ Compositor {
},
State
{
name
:
"
lock
"
when
:
De
viceLock
.
state
==
DeviceLock
.
Locked
when
:
De
sktop
.
instance
.
lockscreenVisible
()
PropertyChanges
{
target
:
Desktop
.
instance
.
lockscreen
visible
:
true
...
...
@@ -221,7 +228,6 @@ Compositor {
Desktop
.
instance
.
lockscreen
.
width
)
+
gestureArea
.
value
)
)
)
}
}
]
SequentialAnimation
{
...
...
@@ -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
{
id
:
lockAnimation
property
alias
valueTo
:
valueAnimationLock
.
to
...
...
src/qml/notifications/NotificationPreview.qml
View file @
473f44f3
...
...
@@ -145,7 +145,7 @@ Item {
//bottomMargin: notificationArea.notificationMargin
}
font.pixelSize
:
Theme
.
fontSizeLarge
text
:
"
Notification
"
//
notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewSummary : ""
text
:
notificationPreviewPresenter
.
notification
!=
null
?
notificationPreviewPresenter
.
notification
.
previewSummary
:
""
color
:
Theme
.
textColor
clip
:
true
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