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
17859efd
Commit
17859efd
authored
Nov 16, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #33 from filippz/master
Cleanup and fix notification position
parents
623057c3
80f05568
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
44 deletions
+9
-44
lipstick-glacier-home-qt5.spec
rpm/lipstick-glacier-home-qt5.spec
+1
-1
lipstick-glacier-home-qt5.yaml
rpm/lipstick-glacier-home-qt5.yaml
+1
-1
NotificationPreview.qml
src/qml/NotificationPreview.qml
+7
-42
No files found.
rpm/lipstick-glacier-home-qt5.spec
View file @
17859efd
...
@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5
...
@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5
# << macros
# << macros
Summary: A nice homescreen for Glacier experience
Summary: A nice homescreen for Glacier experience
Version: 0.1
8
Version: 0.1
9
Release: 1
Release: 1
Group: System/GUI/Other
Group: System/GUI/Other
License: BSD
License: BSD
...
...
rpm/lipstick-glacier-home-qt5.yaml
View file @
17859efd
Name
:
lipstick-glacier-home-qt5
Name
:
lipstick-glacier-home-qt5
Summary
:
A nice homescreen for Glacier experience
Summary
:
A nice homescreen for Glacier experience
Version
:
0.1
8
Version
:
0.1
9
Release
:
1
Release
:
1
Group
:
System/GUI/Other
Group
:
System/GUI/Other
License
:
BSD
License
:
BSD
...
...
src/qml/NotificationPreview.qml
View file @
17859efd
...
@@ -23,62 +23,30 @@
...
@@ -23,62 +23,30 @@
// Contact: Vesa Halttunen <vesa.halttunen@jollamobile.com>
// Contact: Vesa Halttunen <vesa.halttunen@jollamobile.com>
import
QtQuick
2.0
import
QtQuick
2.0
//import org.freedesktop.contextkit 1.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
lipstick
0.1
import
"
../scripts/desktop.js
"
as
Desktop
Item
{
Item
{
id
:
notificationWindow
id
:
notificationWindow
property
alias
summary
:
summary
.
text
property
alias
summary
:
summary
.
text
property
alias
body
:
body
.
text
property
alias
body
:
body
.
text
property
alias
icon
:
icon
.
source
property
alias
icon
:
icon
.
source
width
:
initialSize
.
width
width
:
Desktop
.
instance
.
parent
.
width
height
:
initialSize
.
height
height
:
Desktop
.
instance
.
parent
.
height
rotation
:
Desktop
.
instance
.
parent
.
rotation
/*
x
:
Desktop
.
instance
.
parent
.
x
TODO
y
:
Desktop
.
instance
.
parent
.
y
ContextProperty {
id: orientationAngleContextProperty
key: "/Screen/CurrentWindow/OrientationAngle"
}
*/
QtObject
{
id
:
orientationAngleContextProperty
property
int
value
:
0
}
MouseArea
{
MouseArea
{
id
:
notificationArea
id
:
notificationArea
property
bool
isPortrait
:
(
orientationAngleContextProperty
.
value
==
90
||
orientationAngleContextProperty
.
value
==
270
)
property
int
notificationHeight
:
102
property
int
notificationHeight
:
102
property
int
notificationMargin
:
14
property
int
notificationMargin
:
14
property
int
notificationIconSize
:
60
property
int
notificationIconSize
:
60
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.bottomMargin
:
48
anchors.bottomMargin
:
48
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
width
:
isPortrait
?
notificationWindow
.
height
:
notificationWindow
.
width
width
:
notificationWindow
.
width
height
:
notificationArea
.
notificationHeight
height
:
notificationArea
.
notificationHeight
transform
:
Rotation
{
origin.x
:
{
switch
(
orientationAngleContextProperty
.
value
)
{
case
270
:
return
notificationWindow
.
height
/
2
case
180
:
case
90
:
return
notificationWindow
.
width
/
2
default
:
return
0
}
}
origin
.
y
:
{
switch
(
orientationAngleContextProperty
.
value
)
{
case
270
:
case
180
:
return
notificationWindow
.
height
/
2
case
90
:
return
notificationWindow
.
width
/
2
default
:
return
0
}
}
angle
:
(
orientationAngleContextProperty
.
value
===
undefined
||
orientationAngleContextProperty
.
value
==
0
)
?
0
:
-
360
+
orientationAngleContextProperty
.
value
}
onClicked
:
if
(
notificationPreviewPresenter
.
notification
!=
null
)
notificationPreviewPresenter
.
notification
.
actionInvoked
(
"
default
"
)
onClicked
:
if
(
notificationPreviewPresenter
.
notification
!=
null
)
notificationPreviewPresenter
.
notification
.
actionInvoked
(
"
default
"
)
...
@@ -102,9 +70,6 @@ Item {
...
@@ -102,9 +70,6 @@ Item {
StateChangeScript
{
StateChangeScript
{
name
:
"
notificationShown
"
name
:
"
notificationShown
"
script
:
{
script
:
{
var
topLeft
=
notificationPreview
.
mapToItem
(
notificationWindow
,
0
,
0
)
var
bottomRight
=
notificationPreview
.
mapToItem
(
notificationWindow
,
notificationPreview
.
width
,
notificationPreview
.
height
)
notificationPreviewPresenter
.
setNotificationPreviewRect
(
topLeft
.
x
,
topLeft
.
y
,
bottomRight
.
x
,
bottomRight
.
y
)
notificationTimer
.
start
()
notificationTimer
.
start
()
}
}
}
}
...
...
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