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
48e961ef
Commit
48e961ef
authored
May 30, 2017
by
m2ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scaling to notification preview
parent
66ebe6dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
25 deletions
+35
-25
NotificationPreview.qml
src/qml/notifications/NotificationPreview.qml
+35
-25
No files found.
src/qml/notifications/NotificationPreview.qml
View file @
48e961ef
...
...
@@ -26,6 +26,7 @@ import QtQuick 2.0
import
org
.
nemomobile
.
lipstick
0.1
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtGraphicalEffects
1.0
import
"
../scripts/desktop.js
"
as
Desktop
...
...
@@ -39,27 +40,12 @@ Item {
rotation
:
Desktop
.
instance
.
parent
.
rotation
x
:
Desktop
.
instance
.
parent
.
x
y
:
Desktop
.
instance
.
parent
.
y
Rectangle
{
id
:
dimmer
height
:
Math
.
min
(
parent
.
width
,
parent
.
height
)
/
14
anchors.top
:
parent
.
top
anchors.topMargin
:
notificationArea
.
notificationHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
gradient
:
Gradient
{
GradientStop
{
position
:
1.0
;
color
:
"
black
"
}
GradientStop
{
position
:
0
;
color
:
"
transparent
"
}
}
}
MouseArea
{
id
:
notificationArea
property
int
notificationHeight
:
Math
.
min
(
parent
.
width
,
parent
.
height
)
/
12
property
int
notificationMargin
:
14
property
int
notificationIconSize
:
Math
.
min
(
parent
.
width
,
parent
.
height
)
/
12
property
int
notificationHeight
:
Theme
.
itemHeightExtraLarge
property
int
notificationMargin
:
Theme
.
itemSpacingExtraSmall
property
int
notificationIconSize
:
Theme
.
itemHeightMedium
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
width
:
notificationWindow
.
width
...
...
@@ -67,14 +53,18 @@ Item {
onClicked
:
if
(
notificationPreviewPresenter
.
notification
!=
null
)
notificationPreviewPresenter
.
notification
.
actionInvoked
(
"
default
"
)
Rectangle
{
id
:
notificationPreview
anchors
{
fill
:
parent
}
color
:
"
transparent
"
radius
:
10
gradient
:
Gradient
{
GradientStop
{
position
:
1.0
;
color
:
"
black
"
}
GradientStop
{
position
:
0
;
color
:
"
transparent
"
}
}
opacity
:
0
states
:
[
...
...
@@ -149,13 +139,14 @@ Item {
top
:
parent
.
top
left
:
icon
.
right
right
:
parent
.
right
leftMargin
:
notificationArea
.
notificationMargin
+
26
topMargin
:
notificationArea
.
notificationMargin
leftMargin
:
notificationArea
.
notificationMargin
*
2
rightMargin
:
notificationArea
.
notificationMargin
bottomMargin
:
notificationArea
.
notificationMargin
//
bottomMargin: notificationArea.notificationMargin
}
font.p
ointSize
:
12
font.p
ixelSize
:
Theme
.
fontSizeLarge
text
:
notificationPreviewPresenter
.
notification
!=
null
?
notificationPreviewPresenter
.
notification
.
previewSummary
:
""
color
:
"
white
"
color
:
"
darkgray
"
clip
:
true
elide
:
Text
.
ElideRight
}
...
...
@@ -168,7 +159,7 @@ Item {
right
:
summary
.
right
}
font
{
p
ointSize
:
10
p
ixelSize
:
Theme
.
fontSizeMedium
bold
:
true
}
text
:
notificationPreviewPresenter
.
notification
!=
null
?
notificationPreviewPresenter
.
notification
.
previewBody
:
""
...
...
@@ -176,6 +167,25 @@ Item {
clip
:
true
elide
:
Text
.
ElideRight
}
//The close button goes here that is in one of the designs
MouseArea
{
id
:
notificationCloser
anchors
{
right
:
parent
.
right
top
:
parent
.
top
}
height
:
notificationArea
.
notificationHeight
width
:
height
//The X icon goes here
/*Image {
id: closeIcon
anchors.centerIn: parent
width: Theme.itemHeightMedium
height: width
source: "/usr/share/lipstick-glacier-home-qt5/qml/images/closeapp.svg"
}*/
}
Connections
{
target
:
notificationPreviewPresenter
;
...
...
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