Skip to content

Commit

Permalink
[home] Revert lipstick api changes and modify scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
locusf committed Mar 26, 2017
1 parent 599bc36 commit 66ebe6d
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 36 deletions.
4 changes: 2 additions & 2 deletions src/qml/AppLauncher.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ GridView {

// just for margin purposes
header: Item {
height: 100
height: Math.min(parent.width,parent.height)/10
}
footer: Item {
height: 100
height: Math.min(parent.width,parent.height)/10
}

Item {
Expand Down
10 changes: 8 additions & 2 deletions src/qml/LauncherItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ Item {

Spinner {
id: spinner
anchors.centerIn: parent
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: 8
}
width: gridview.cellWidth - gridview.cellWidth/10
height: width
enabled: (model.object.type === LauncherModel.Application) ? model.object.isLaunching : false
}
}
Expand All @@ -259,7 +265,7 @@ Item {
width: parent.width
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
font.pixelSize: gridview.cellWidth/10
font.pixelSize: gridview.cellWidth/8
color: 'white'
anchors {
left: parent.left
Expand Down
4 changes: 2 additions & 2 deletions src/qml/LockscreenClock.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Rectangle {
Text {
id: timeDisplay

font.pixelSize: 80
font.pointSize: 16
font.weight: Font.Light
lineHeight: 0.85
color: "white"
Expand All @@ -39,7 +39,7 @@ Rectangle {
Text {
id: dateDisplay

font.pixelSize: 20
font.pointSize: 14
color: "white"
opacity: 0.8
horizontalAlignment: Text.AlignHCenter
Expand Down
1 change: 1 addition & 0 deletions src/qml/MainScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Page {
id: desktop
property alias lockscreen: lockScreen
property alias switcher: switcher
property int statusBarHeight: statusbar.height
// Implements back key navigation

Keys.onReleased: {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/Statusbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import "statusbar"
Item {
id: root
z: 201
height: Math.min(parent.width,parent.height)/12
height: Math.min(parent.width,parent.height)/10
width: parent.width
anchors.bottom: parent.bottom

Expand Down
5 changes: 2 additions & 3 deletions src/qml/notifications/NotificationItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MouseArea {
id: appSummary
text: modelData.summary
width: (rootitem.width-appIcon.width)-40
font.pointSize: 10
font.pointSize: 12
font.bold :true
font.capitalization: Font.AllUppercase

Expand All @@ -52,8 +52,7 @@ MouseArea {
id: appBody
width: (rootitem.width-appIcon.width)-40
text: modelData.body
font.pointSize: 8

font.pointSize: 14
anchors{
left: appSummary.left
top: appSummary.bottom
Expand Down
53 changes: 27 additions & 26 deletions src/qml/notifications/NotificationPreview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

import QtQuick 2.0
import org.nemomobile.lipstick 0.1
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0

import "../scripts/desktop.js" as Desktop

Item {
Expand All @@ -36,14 +39,28 @@ 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: 102
property int notificationHeight: Math.min(parent.width,parent.height)/12
property int notificationMargin: 14
property int notificationIconSize: 60
anchors.bottom: parent.bottom
anchors.bottomMargin: 48
property int notificationIconSize: Math.min(parent.width,parent.height)/12
anchors.top: parent.top
anchors.left: parent.left
width: notificationWindow.width
height: notificationArea.notificationHeight
Expand All @@ -56,7 +73,7 @@ Item {
fill: parent
}
color: "transparent"
radius: 5
radius: 10

opacity: 0

Expand Down Expand Up @@ -89,20 +106,6 @@ Item {
}
}
]
Rectangle {
id: dimmer

height: 15

anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right

gradient: Gradient {
GradientStop { position: 0; color: "black" }
GradientStop { position: 1.0; color: "transparent" }
}
}
transitions: [
Transition {
to: "show"
Expand Down Expand Up @@ -140,34 +143,32 @@ Item {
source: "/usr/share/lipstick-glacier-home-qt5/qml/images/notification-circle.png"
}

Text {
Label {
id: summary
anchors {
top: parent.top
left: icon.right
right: parent.right
topMargin: notificationArea.notificationMargin
leftMargin: notificationArea.notificationMargin + 26
rightMargin: notificationArea.notificationMargin
bottomMargin: notificationArea.notificationMargin
}
font {
pixelSize: 36
}
font.pointSize: 12
text: notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewSummary : ""
color: "white"
clip: true
elide: Text.ElideRight
}

Text {
Label {
id: body
anchors {
top: summary.bottom
left: summary.left
right: summary.right
}
font {
pixelSize: 18
pointSize: 10
bold: true
}
text: notificationPreviewPresenter.notification != null ? notificationPreviewPresenter.notification.previewBody : ""
Expand Down

0 comments on commit 66ebe6d

Please sign in to comment.