Commit 6a3fc00e authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

Merge pull request #29 from locusf/master

New stuff for notifications and layouts for statusbar + shutdown screen
parents f5bb4ef5 99d8c96c
......@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5
# << macros
Summary: A nice homescreen for Glacier experience
Version: 0.14
Version: 0.15
Release: 1
Group: System/GUI/Other
License: BSD
......@@ -25,7 +25,7 @@ Requires: qt5-qtdeclarative-import-window2
Requires: qt5-qtquickcontrols-nemo
Requires: nemo-qml-plugin-contextkit-qt5
Requires: connman-qt5
Requires: libqofono-qt5
Requires: libqofono-qt5-declarative
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(lipstick-qt5) >= 0.12.0
......
Name: lipstick-glacier-home-qt5
Summary: A nice homescreen for Glacier experience
Version: 0.14
Version: 0.15
Release: 1
Group: System/GUI/Other
License: BSD
......@@ -18,7 +18,7 @@ Requires:
- qt5-qtquickcontrols-nemo
- nemo-qml-plugin-contextkit-qt5
- connman-qt5
- libqofono-qt5
- libqofono-qt5-declarative
PkgConfigBR:
- Qt5Core
- Qt5Quick
......
......@@ -38,6 +38,11 @@ int main(int argc, char **argv)
app.setCompositorPath("/usr/share/lipstick-glacier-home-qt5/qml/compositor.qml");
qmlRegisterType<GlacierWindowModel>("org.nemomobile.glacier", 1, 0 ,"GlacierWindowModel");
app.setQmlPath("/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml");
// Give these to the environment inside the lipstick homescreen
// Fixes a bug where some applications wouldn't launch, eg. terminal or browser
setenv("EGL_PLATFORM", "wayland", 1);
setenv("QT_QPA_PLATFORM", "wayland", 1);
setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1);
app.mainWindowInstance()->showFullScreen();
return app.exec();
}
......
......@@ -28,11 +28,15 @@ import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
// Feeds page:
// the place for an event feed.
Flickable {
id: mainFlickable
Item {
id: rootitem
Column {
spacing: 40
contentHeight: rootitem.height
contentWidth: parent.width
Item {
id: rootitem
width: parent.width
height: childrenRect.height
// Day of week
Row {
id: daterow
......@@ -67,18 +71,19 @@ Item {
}
Column {
id: notificationColumn
anchors.top: daterow.bottom
spacing: 40
anchors.topMargin: 20
spacing: 10
Repeater {
model: NotificationListModel {
id: notifmodel
}
delegate: Row {
spacing: 16
height: 40
width: rootitem.width
delegate:
MouseArea {
anchors.fill: parent
height: Math.max(appSummary.height,appBody.height)
width: rootitem.width
onClicked: {
if (modelData.userRemovable) {
modelData.actionInvoked("default")
......@@ -88,8 +93,8 @@ Item {
Image {
id: appIcon
source: {
if (modelData.appIcon)
return "image://theme/" + modelData.appIcon
if (modelData.icon)
return "image://theme/" + modelData.icon
else
return ""
}
......@@ -98,13 +103,14 @@ Item {
Label {
id: appSummary
text: modelData.summary
width: rootitem.width/2
width: (rootitem.width-appIcon.width)/2
font.pointSize: 10
anchors.left: appIcon.right
wrapMode: Text.Wrap
}
Label {
width: rootitem.width/2
id: appBody
width: (rootitem.width-appIcon.width)/2
text: modelData.body
font.pointSize: 8
wrapMode: Text.Wrap
......@@ -114,5 +120,5 @@ Item {
}
}
}
}
}
import QtQuick 2.0
import QtQuick.Window 2.0
import org.nemomobile.lipstick 0.1
Rectangle {
id: shutdownWindow
width: Screen.width
height: Screen.height
color: "black"
property bool shouldVisible
opacity: shutdownScreen.windowVisible
Image {
anchors.centerIn: parent
source: shutdownMode ? "" : "image://theme/graphic-shutdown-logo"
}
Behavior on opacity {
NumberAnimation {
duration: 500
onRunningChanged: if (!running && shutdownWindow.opacity == 0) shutdownScreen.windowVisible = false
}
}
}
......@@ -29,6 +29,7 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick.Layouts 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import org.freedesktop.contextkit 1.0
......@@ -109,7 +110,8 @@ Item {
visible: false
}
Row {
RowLayout {
anchors.fill: statusbar
spacing: 16
StatusbarItem {
source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"
......@@ -175,8 +177,6 @@ Item {
source: "image://theme/icon_play_pause"
}
StatusbarItem {
width: 30
height: 48
Label {
id: hours
width: 16
......
import QtQuick 2.0
import QtQuick.Layouts 1.0
Item {
height: 48
width: 48
property alias source: icon.source
property string panel_source
property Component panel
Layout.fillWidth: true
Layout.fillHeight: true
Image {
id: icon
anchors.centerIn: parent
......
......@@ -33,7 +33,8 @@ qml.files = qml/MainScreen.qml \
qml/Pager.qml \
qml/VolumeControl.qml \
qml/BatteryPanel.qml \
qml/CommonPanel.qml
qml/CommonPanel.qml \
qml/ShutdownScreen.qml
qmlcompositor.path = /usr/share/lipstick-glacier-home-qt5/qml/compositor
qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \
......@@ -44,7 +45,19 @@ qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \
scripts.path = /usr/share/lipstick-glacier-home-qt5/qml/scripts
scripts.files = qml/scripts/desktop.js
INSTALLS += styles qml qmlcompositor scripts
system.path = /usr/share/lipstick-glacier-home-qt5/qml/system
system.files = qml/ShutdownScreen.qml
volumecontrol.path = /usr/share/lipstick-glacier-home-qt5/qml/volumecontrol
volumecontrol.files = qml/VolumeControl.qml
connectivity.path = /usr/share/lipstick-glacier-home-qt5/qml/connectivity
connectivity.files = qml/USBModeSelector.qml
notifications.path = /usr/share/lipstick-glacier-home-qt5/qml/notifications
notifications.files = qml/NotificationPreview.qml
INSTALLS += styles qml qmlcompositor scripts system volumecontrol connectivity notifications
CONFIG += qt link_pkgconfig
QT += quick compositor
......@@ -90,6 +103,7 @@ OTHER_FILES += qml/*.qml \
qml/USBModeSelector.qml \
qml/VolumeControl.qml \
qml/BatteryPanel.qml \
qml/CommonPanel.qml
qml/CommonPanel.qml \
qml/ShutdownScreen.qml
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