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
5126dce6
Commit
5126dce6
authored
Jun 19, 2017
by
m2ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scaling and orientation fix to codepad
parent
7b20b950
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
DeviceLockUI.qml
src/qml/DeviceLockUI.qml
+20
-9
MainScreen.qml
src/qml/MainScreen.qml
+2
-1
compositor.qml
src/qml/compositor.qml
+1
-1
No files found.
src/qml/DeviceLockUI.qml
View file @
5126dce6
...
@@ -51,34 +51,45 @@ Item {
...
@@ -51,34 +51,45 @@ Item {
ColumnLayout
{
ColumnLayout
{
anchors.fill
:
parent
anchors.fill
:
parent
spacing
:
40
spacing
:
Theme
.
itemSpacingLarge
TextField
{
TextField
{
id
:
lockCodeField
id
:
lockCodeField
anchors.horizontalCenter
:
parent
.
horizontalCenter
readOnly
:
true
readOnly
:
true
echoMode
:
TextInput
.
PasswordEchoOnEdit
echoMode
:
TextInput
.
PasswordEchoOnEdit
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
GridLayout
{
GridLayout
{
height
:
parent
.
height
height
:
parent
.
height
width
:
parent
.
width
width
:
parent
.
width
anchors.horizontalCenter
:
parent
.
horizontalCenter
columns
:
3
columns
:
3
Repeater
{
Repeater
{
model
:
[
"
1
"
,
"
2
"
,
"
3
"
,
"
4
"
,
"
5
"
,
"
6
"
,
"
7
"
,
"
8
"
,
"
9
"
,
"
Ca
"
,
"
0
"
,
"
OK
"
]
model
:
[
"
1
"
,
"
2
"
,
"
3
"
,
"
4
"
,
"
5
"
,
"
6
"
,
"
7
"
,
"
8
"
,
"
9
"
,
"
Ca
"
,
"
0
"
,
"
OK
"
]
delegate
:
delegate
:
Button
{
Button
{
style
:
ButtonStyle
{}
height
:
Theme
.
itemHeightHuge
Layout.fillWidth
:
true
width
:
Theme
.
itemHeightHuge
text
:
modelData
Layout.maximumWidth
:
Theme
.
itemHeightHuge
*
1.5
Layout.maximumHeight
:
Theme
.
itemHeightHuge
*
1.5
Label
{
id
:
btnLabel
text
:
modelData
font.pixelSize
:
Theme
.
fontSizeExtraLarge
*
1.5
anchors
{
centerIn
:
parent
}
}
onClicked
:
{
onClicked
:
{
if
(
text
!==
"
Ca
"
&&
text
!==
"
OK
"
)
{
if
(
btnLabel
.
text
!==
"
Ca
"
&&
btnLabel
.
text
!==
"
OK
"
)
{
lockCodeField
.
insert
(
lockCodeField
.
cursorPosition
,
text
)
lockCodeField
.
insert
(
lockCodeField
.
cursorPosition
,
btnLabel
.
text
)
}
else
{
}
else
{
if
(
text
===
"
OK
"
)
{
if
(
btnLabel
.
text
===
"
OK
"
)
{
authenticator
.
enterLockCode
(
lockCodeField
.
text
)
authenticator
.
enterLockCode
(
lockCodeField
.
text
)
lockCodeField
.
text
=
""
lockCodeField
.
text
=
""
}
else
if
(
text
===
"
Ca
"
){
}
else
if
(
btnLabel
.
text
===
"
Ca
"
){
lockCodeField
.
text
=
""
lockCodeField
.
text
=
""
}
}
}
}
...
...
src/qml/MainScreen.qml
View file @
5126dce6
...
@@ -75,6 +75,7 @@ Page {
...
@@ -75,6 +75,7 @@ Page {
Statusbar
{
Statusbar
{
id
:
statusbar
id
:
statusbar
enabled
:
DeviceLock
.
state
!==
DeviceLock
.
Locked
}
}
GlacierRotation
{
GlacierRotation
{
...
@@ -83,7 +84,7 @@ Page {
...
@@ -83,7 +84,7 @@ Page {
unrotatedItems
:
[
lockScreen
]
unrotatedItems
:
[
lockScreen
]
}
}
orientation
:
Lipstick
.
compositor
.
screenOrientation
orientation
:
DeviceLock
.
state
==
DeviceLock
.
Locked
?
nativeOrientation
:
Lipstick
.
compositor
.
screenOrientation
onOrientationChanged
:
{
onOrientationChanged
:
{
if
(
!
lockscreenVisible
())
if
(
!
lockscreenVisible
())
...
...
src/qml/compositor.qml
View file @
5126dce6
...
@@ -259,7 +259,7 @@ Compositor {
...
@@ -259,7 +259,7 @@ Compositor {
PropertyChanges
{
PropertyChanges
{
target
:
Desktop
.
instance
.
codepad
target
:
Desktop
.
instance
.
codepad
//
Extremely c
onfusing logic and math to get the codepad follow your finger
//
C
onfusing logic and math to get the codepad follow your finger
x
:
gestureArea
.
lockscreenX
+
(
gestureArea
.
value
<
0
?
Desktop
.
instance
.
lockscreen
.
width
:
-
Desktop
.
instance
.
lockscreen
.
width
)
+
x
:
gestureArea
.
lockscreenX
+
(
gestureArea
.
value
<
0
?
Desktop
.
instance
.
lockscreen
.
width
:
-
Desktop
.
instance
.
lockscreen
.
width
)
+
((
gestureArea
.
horizontal
)
?
(
Desktop
.
instance
.
lockscreenVisible
()?(
gestureArea
.
value
)
:
((
gestureArea
.
horizontal
)
?
(
Desktop
.
instance
.
lockscreenVisible
()?(
gestureArea
.
value
)
:
(
gestureArea
.
gesture
==
"
right
"
?
(
gestureArea
.
gesture
==
"
right
"
?
...
...
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