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
# << macros
Summary: A nice homescreen for Glacier experience
Version: 0.12
Version: 0.13
Release: 1
Group: System/GUI/Other
License: BSD
......
Name: lipstick-glacier-home-qt5
Summary: A nice homescreen for Glacier experience
Version: 0.12
Version: 0.13
Release: 1
Group: System/GUI/Other
License: BSD
......
......@@ -27,7 +27,7 @@ Image {
id: closeButton
signal clicked()
source: 'theme/icon-m-framework-close-thumbnail.png'
source: 'qrc:/qml/theme/icon-m-framework-close-thumbnail.png'
MouseArea {
anchors.fill: parent
......
......@@ -30,6 +30,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
// the place for an event feed.
Item {
id: rootitem
Column {
spacing: 40
// Day of week
......@@ -62,6 +63,7 @@ Item {
}
}
}
Column {
anchors.top: daterow.bottom
spacing: 40
......@@ -72,7 +74,17 @@ Item {
delegate: Row {
spacing: 16
height: 40
width: rootitem.width
MouseArea {
anchors.fill: parent
onClicked: {
if (modelData.userRemovable) {
modelData.removeRequested()
}
}
Image {
id: appIcon
source: {
if (modelData.appIcon)
return "image://theme/" + modelData.appIcon
......@@ -85,10 +97,15 @@ Item {
id: appSummary
text: modelData.summary
font.pointSize: 10
anchors.left: appIcon.right
wrapMode: Text.WordWrap
}
Label {
text: modelData.body
font.pointSize: 8
wrapMode: Text.WordWrap
anchors.left: appSummary.right
}
}
}
}
......
......@@ -26,6 +26,7 @@
import QtQuick 2.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import org.nemomobile.lipstick 0.1
Item {
id: wrapper
......@@ -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
MouseArea {
id: launcherItem
......@@ -65,7 +107,16 @@ Item {
onClicked: {
// TODO: disallow if close mode enabled
if (model.object.type !== LauncherModel.Folder) {
model.object.launchApplication()
} else {
if (!folderLoader.visible) {
folderLoader.visible = true
folderLoader.model = model.object
} else {
folderLoader.visible = false
}
}
}
onPressAndHold: {
......@@ -157,7 +208,7 @@ Item {
Spinner {
id: spinner
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 {
right: parent.right
}
}
MouseArea {
anchors.fill: parent
}
}
......@@ -54,6 +54,7 @@ Item {
property int notificationMargin: 14
property int notificationIconSize: 60
anchors.bottom: parent.bottom
anchors.bottomMargin: 48
anchors.left: parent.left
width: isPortrait ? notificationWindow.height : notificationWindow.width
height: notificationArea.notificationHeight
......
......@@ -36,12 +36,19 @@ import MeeGo.QOfono 0.2
Component {
Rectangle {
id: simpanel
height: 240
width: root.width
color: "#313131"
opacity: 0.5
property bool _needsPin: simManager.pinRequired === OfonoSimManager.SimPin ||
property bool needsPin: simManager.pinRequired === OfonoSimManager.SimPin ||
simManager.pinRequired === OfonoSimManager.SimPuk
onNeedsPinChanged: {
if (needsPin === false) {
panel_loader.visible = false
}
}
Component.onCompleted: {
simManager.modemPath = manager.modems
}
......@@ -55,7 +62,7 @@ Component {
}
Column {
visible: _needsPin
visible: needsPin
spacing: 10
Row {
spacing: 16
......@@ -128,7 +135,7 @@ Component {
}
}
Label {
visible: !_needsPin
visible: !needsPin
text: "No pin required!"
font.pointSize: 16
}
......
......@@ -100,10 +100,8 @@ MouseArea {
opacity: scale
enabled: !closeAnimation.running
anchors {
top: parent.top
right: parent.right
topMargin: -10
rightMargin: -10
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
}
onClicked: closeAnimation.start()
}
......
......@@ -41,6 +41,7 @@ Compositor {
// The application window that was most recently topmost
property Item topmostApplicationWindow
property Item topmostAlarmWindow: null
function windowToFront(winId) {
var o = root.windowForId(winId)
......@@ -112,11 +113,15 @@ Compositor {
id: notificationLayer
z: 6
}
Item {
id: alarmsLayer
z: 3
}
}
ScreenGestureArea {
id: gestureArea
z: 2
z: 7
anchors.fill: parent
......@@ -173,7 +178,7 @@ Compositor {
}
PropertyChanges {
target: appLayer
target: root.topmostAlarmWindow == null ? appLayer : alarmsLayer
x: gestureArea.horizontal ? gestureArea.value : 0
y: gestureArea.horizontal ? 0 : gestureArea.value
}
......@@ -283,13 +288,16 @@ Compositor {
WindowWrapperMystic { }
}
onDisplayOff: setCurrentWindow(root.homeWindow)
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 isDialogWindow = window.category === "dialog"
var isNotificationWindow = window.category == "notification"
var isOverlayWindow = window.category == "overlay"
var isAlarmWindow = window.category == "alarm"
var parent = null
if (window.category == "cover") {
window.visible = false
......@@ -301,6 +309,8 @@ Compositor {
parent = notificationLayer
} else if (isOverlayWindow){
parent = overlayLayer
} else if (isAlarmWindow) {
parent = alarmsLayer
} else {
parent = appLayer
}
......@@ -318,18 +328,28 @@ Compositor {
} else if (isDialogWindow){
setCurrentWindow(window)
} else if (isAlarmWindow){
root.topmostAlarmWindow = window
w = mysticWrapper.createObject(parent, {window: window})
window.userData = w
setCurrentWindow(w)
} else {
if (!root.topmostAlarmWindow) {
w = mysticWrapper.createObject(parent, {window: window})
window.userData = w
setCurrentWindow(w)
}
}
}
onWindowRemoved: {
if (debug) console.log("Compositor: Window removed \"" + window.title + "\"")
console.log("Compositor: Window removed \"" + window.title + "\"" + " category: " + window.category)
var w = window.userData;
if (window.category == "alarm") {
root.topmostAlarmWindow = null
setCurrentWindow(root.homeWindow)
}
if (root.topmostWindow == w)
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