Commit e9f9e7ec authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

Merge pull request #27 from locusf/master

Many new things
parents d475d3c0 d7c3fb31
...@@ -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.12 Version: 0.13
Release: 1 Release: 1
Group: System/GUI/Other Group: System/GUI/Other
License: BSD License: BSD
......
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.12 Version: 0.13
Release: 1 Release: 1
Group: System/GUI/Other Group: System/GUI/Other
License: BSD License: BSD
......
...@@ -27,7 +27,7 @@ Image { ...@@ -27,7 +27,7 @@ Image {
id: closeButton id: closeButton
signal clicked() signal clicked()
source: 'theme/icon-m-framework-close-thumbnail.png' source: 'qrc:/qml/theme/icon-m-framework-close-thumbnail.png'
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
......
...@@ -30,6 +30,7 @@ import QtQuick.Controls.Styles.Nemo 1.0 ...@@ -30,6 +30,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
// the place for an event feed. // the place for an event feed.
Item { Item {
id: rootitem
Column { Column {
spacing: 40 spacing: 40
// Day of week // Day of week
...@@ -62,6 +63,7 @@ Item { ...@@ -62,6 +63,7 @@ Item {
} }
} }
} }
Column { Column {
anchors.top: daterow.bottom anchors.top: daterow.bottom
spacing: 40 spacing: 40
...@@ -72,7 +74,17 @@ Item { ...@@ -72,7 +74,17 @@ Item {
delegate: Row { delegate: Row {
spacing: 16 spacing: 16
height: 40 height: 40
width: rootitem.width
MouseArea {
anchors.fill: parent
onClicked: {
if (modelData.userRemovable) {
modelData.removeRequested()
}
}
Image { Image {
id: appIcon
source: { source: {
if (modelData.appIcon) if (modelData.appIcon)
return "image://theme/" + modelData.appIcon return "image://theme/" + modelData.appIcon
...@@ -85,10 +97,15 @@ Item { ...@@ -85,10 +97,15 @@ Item {
id: appSummary id: appSummary
text: modelData.summary text: modelData.summary
font.pointSize: 10 font.pointSize: 10
anchors.left: appIcon.right
wrapMode: Text.WordWrap
} }
Label { Label {
text: modelData.body text: modelData.body
font.pointSize: 8 font.pointSize: 8
wrapMode: Text.WordWrap
anchors.left: appSummary.right
}
} }
} }
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls.Nemo 1.0 import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0 import QtQuick.Controls.Styles.Nemo 1.0
import org.nemomobile.lipstick 0.1
Item { Item {
id: wrapper id: wrapper
...@@ -52,6 +53,47 @@ Item { ...@@ -52,6 +53,47 @@ Item {
} }
} }
GridView {
id: folderLoader
anchors.top: parent.bottom
width: gridview.width
height: childrenRect.height
cellWidth: 115
cellHeight: cellWidth + 30
Rectangle {
anchors.fill: parent
opacity: 0.75
color: "white"
}
delegate: MouseArea {
width: gridview.cellWidth
height: gridview.cellHeight
Image {
id: iconimage
source: model.object.iconId == "" ? ":/images/icons/apps.png" : (model.object.iconId.indexOf("/") == 0 ? "file://" : "image://theme/") + model.object.iconId
}
Text {
id: icontext
// elide only works if an explicit width is set
width: parent.width
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 18
color: 'white'
anchors {
left: parent.left
right: parent.right
top: iconimage.bottom
topMargin: 5
}
}
onClicked: {
model.object.launchApplication()
}
}
}
// Application icon for the launcher // Application icon for the launcher
MouseArea { MouseArea {
id: launcherItem id: launcherItem
...@@ -65,7 +107,16 @@ Item { ...@@ -65,7 +107,16 @@ Item {
onClicked: { onClicked: {
// TODO: disallow if close mode enabled // TODO: disallow if close mode enabled
if (model.object.type !== LauncherModel.Folder) {
model.object.launchApplication() model.object.launchApplication()
} else {
if (!folderLoader.visible) {
folderLoader.visible = true
folderLoader.model = model.object
} else {
folderLoader.visible = false
}
}
} }
onPressAndHold: { onPressAndHold: {
...@@ -157,7 +208,7 @@ Item { ...@@ -157,7 +208,7 @@ Item {
Spinner { Spinner {
id: spinner id: spinner
anchors.centerIn: parent anchors.centerIn: parent
enabled: (model.object.type === 0) ? model.object.isLaunching : false enabled: (model.object.type === LauncherModel.Application) ? model.object.isLaunching : false
} }
} }
......
...@@ -12,5 +12,8 @@ Image { ...@@ -12,5 +12,8 @@ Image {
right: parent.right right: parent.right
} }
} }
MouseArea {
anchors.fill: parent
}
} }
...@@ -54,6 +54,7 @@ Item { ...@@ -54,6 +54,7 @@ Item {
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.left: parent.left anchors.left: parent.left
width: isPortrait ? notificationWindow.height : notificationWindow.width width: isPortrait ? notificationWindow.height : notificationWindow.width
height: notificationArea.notificationHeight height: notificationArea.notificationHeight
......
...@@ -36,12 +36,19 @@ import MeeGo.QOfono 0.2 ...@@ -36,12 +36,19 @@ import MeeGo.QOfono 0.2
Component { Component {
Rectangle { Rectangle {
id: simpanel
height: 240 height: 240
width: root.width width: root.width
color: "#313131" color: "#313131"
opacity: 0.5 opacity: 0.5
property bool _needsPin: simManager.pinRequired === OfonoSimManager.SimPin || property bool needsPin: simManager.pinRequired === OfonoSimManager.SimPin ||
simManager.pinRequired === OfonoSimManager.SimPuk simManager.pinRequired === OfonoSimManager.SimPuk
onNeedsPinChanged: {
if (needsPin === false) {
panel_loader.visible = false
}
}
Component.onCompleted: { Component.onCompleted: {
simManager.modemPath = manager.modems simManager.modemPath = manager.modems
} }
...@@ -55,7 +62,7 @@ Component { ...@@ -55,7 +62,7 @@ Component {
} }
Column { Column {
visible: _needsPin visible: needsPin
spacing: 10 spacing: 10
Row { Row {
spacing: 16 spacing: 16
...@@ -128,7 +135,7 @@ Component { ...@@ -128,7 +135,7 @@ Component {
} }
} }
Label { Label {
visible: !_needsPin visible: !needsPin
text: "No pin required!" text: "No pin required!"
font.pointSize: 16 font.pointSize: 16
} }
......
...@@ -100,10 +100,8 @@ MouseArea { ...@@ -100,10 +100,8 @@ MouseArea {
opacity: scale opacity: scale
enabled: !closeAnimation.running enabled: !closeAnimation.running
anchors { anchors {
top: parent.top bottom: parent.bottom
right: parent.right horizontalCenter: parent.horizontalCenter
topMargin: -10
rightMargin: -10
} }
onClicked: closeAnimation.start() onClicked: closeAnimation.start()
} }
......
...@@ -41,6 +41,7 @@ Compositor { ...@@ -41,6 +41,7 @@ Compositor {
// The application window that was most recently topmost // The application window that was most recently topmost
property Item topmostApplicationWindow property Item topmostApplicationWindow
property Item topmostAlarmWindow: null
function windowToFront(winId) { function windowToFront(winId) {
var o = root.windowForId(winId) var o = root.windowForId(winId)
...@@ -112,11 +113,15 @@ Compositor { ...@@ -112,11 +113,15 @@ Compositor {
id: notificationLayer id: notificationLayer
z: 6 z: 6
} }
Item {
id: alarmsLayer
z: 3
}
} }
ScreenGestureArea { ScreenGestureArea {
id: gestureArea id: gestureArea
z: 2 z: 7
anchors.fill: parent anchors.fill: parent
...@@ -173,7 +178,7 @@ Compositor { ...@@ -173,7 +178,7 @@ Compositor {
} }
PropertyChanges { PropertyChanges {
target: appLayer target: root.topmostAlarmWindow == null ? appLayer : alarmsLayer
x: gestureArea.horizontal ? gestureArea.value : 0 x: gestureArea.horizontal ? gestureArea.value : 0
y: gestureArea.horizontal ? 0 : gestureArea.value y: gestureArea.horizontal ? 0 : gestureArea.value
} }
...@@ -283,13 +288,16 @@ Compositor { ...@@ -283,13 +288,16 @@ Compositor {
WindowWrapperMystic { } WindowWrapperMystic { }
} }
onDisplayOff: setCurrentWindow(root.homeWindow)
onWindowAdded: { onWindowAdded: {
if (debug) console.log("Compositor: Window added \"" + window.title + "\"") console.log("Compositor: Window added \"" + window.title + "\"" + " category: " + window.category)
var isHomeWindow = window.isInProcess && root.homeWindow == null && window.title === "Home" var isHomeWindow = window.isInProcess && root.homeWindow == null && window.title === "Home"
var isDialogWindow = window.category === "dialog" var isDialogWindow = window.category === "dialog"
var isNotificationWindow = window.category == "notification" var isNotificationWindow = window.category == "notification"
var isOverlayWindow = window.category == "overlay" var isOverlayWindow = window.category == "overlay"
var isAlarmWindow = window.category == "alarm"
var parent = null var parent = null
if (window.category == "cover") { if (window.category == "cover") {
window.visible = false window.visible = false
...@@ -301,6 +309,8 @@ Compositor { ...@@ -301,6 +309,8 @@ Compositor {
parent = notificationLayer parent = notificationLayer
} else if (isOverlayWindow){ } else if (isOverlayWindow){
parent = overlayLayer parent = overlayLayer
} else if (isAlarmWindow) {
parent = alarmsLayer
} else { } else {
parent = appLayer parent = appLayer
} }
...@@ -318,18 +328,28 @@ Compositor { ...@@ -318,18 +328,28 @@ Compositor {
} else if (isDialogWindow){ } else if (isDialogWindow){
setCurrentWindow(window) setCurrentWindow(window)
} else if (isAlarmWindow){
root.topmostAlarmWindow = window
w = mysticWrapper.createObject(parent, {window: window})
window.userData = w
setCurrentWindow(w)
} else { } else {
if (!root.topmostAlarmWindow) {
w = mysticWrapper.createObject(parent, {window: window}) w = mysticWrapper.createObject(parent, {window: window})
window.userData = w window.userData = w
setCurrentWindow(w) setCurrentWindow(w)
} }
} }
}
onWindowRemoved: { onWindowRemoved: {
if (debug) console.log("Compositor: Window removed \"" + window.title + "\"") console.log("Compositor: Window removed \"" + window.title + "\"" + " category: " + window.category)
var w = window.userData; var w = window.userData;
if (window.category == "alarm") {
root.topmostAlarmWindow = null
setCurrentWindow(root.homeWindow)
}
if (root.topmostWindow == w) if (root.topmostWindow == w)
setCurrentWindow(root.homeWindow); setCurrentWindow(root.homeWindow);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment