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 ...@@ -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.14 Version: 0.15
Release: 1 Release: 1
Group: System/GUI/Other Group: System/GUI/Other
License: BSD License: BSD
...@@ -25,7 +25,7 @@ Requires: qt5-qtdeclarative-import-window2 ...@@ -25,7 +25,7 @@ Requires: qt5-qtdeclarative-import-window2
Requires: qt5-qtquickcontrols-nemo Requires: qt5-qtquickcontrols-nemo
Requires: nemo-qml-plugin-contextkit-qt5 Requires: nemo-qml-plugin-contextkit-qt5
Requires: connman-qt5 Requires: connman-qt5
Requires: libqofono-qt5 Requires: libqofono-qt5-declarative
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(lipstick-qt5) >= 0.12.0 BuildRequires: pkgconfig(lipstick-qt5) >= 0.12.0
......
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.14 Version: 0.15
Release: 1 Release: 1
Group: System/GUI/Other Group: System/GUI/Other
License: BSD License: BSD
...@@ -18,7 +18,7 @@ Requires: ...@@ -18,7 +18,7 @@ Requires:
- qt5-qtquickcontrols-nemo - qt5-qtquickcontrols-nemo
- nemo-qml-plugin-contextkit-qt5 - nemo-qml-plugin-contextkit-qt5
- connman-qt5 - connman-qt5
- libqofono-qt5 - libqofono-qt5-declarative
PkgConfigBR: PkgConfigBR:
- Qt5Core - Qt5Core
- Qt5Quick - Qt5Quick
......
...@@ -38,6 +38,11 @@ int main(int argc, char **argv) ...@@ -38,6 +38,11 @@ int main(int argc, char **argv)
app.setCompositorPath("/usr/share/lipstick-glacier-home-qt5/qml/compositor.qml"); app.setCompositorPath("/usr/share/lipstick-glacier-home-qt5/qml/compositor.qml");
qmlRegisterType<GlacierWindowModel>("org.nemomobile.glacier", 1, 0 ,"GlacierWindowModel"); qmlRegisterType<GlacierWindowModel>("org.nemomobile.glacier", 1, 0 ,"GlacierWindowModel");
app.setQmlPath("/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml"); 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(); app.mainWindowInstance()->showFullScreen();
return app.exec(); return app.exec();
} }
......
...@@ -28,11 +28,15 @@ import QtQuick.Controls.Nemo 1.0 ...@@ -28,11 +28,15 @@ import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0 import QtQuick.Controls.Styles.Nemo 1.0
// Feeds page: // Feeds page:
// the place for an event feed. // the place for an event feed.
Flickable {
id: mainFlickable
Item { contentHeight: rootitem.height
id: rootitem contentWidth: parent.width
Column { Item {
spacing: 40 id: rootitem
width: parent.width
height: childrenRect.height
// Day of week // Day of week
Row { Row {
id: daterow id: daterow
...@@ -67,18 +71,19 @@ Item { ...@@ -67,18 +71,19 @@ Item {
} }
Column { Column {
id: notificationColumn
anchors.top: daterow.bottom anchors.top: daterow.bottom
spacing: 40 anchors.topMargin: 20
spacing: 10
Repeater { Repeater {
model: NotificationListModel { model: NotificationListModel {
id: notifmodel id: notifmodel
} }
delegate: Row { delegate:
spacing: 16
height: 40
width: rootitem.width
MouseArea { MouseArea {
anchors.fill: parent height: Math.max(appSummary.height,appBody.height)
width: rootitem.width
onClicked: { onClicked: {
if (modelData.userRemovable) { if (modelData.userRemovable) {
modelData.actionInvoked("default") modelData.actionInvoked("default")
...@@ -88,8 +93,8 @@ Item { ...@@ -88,8 +93,8 @@ Item {
Image { Image {
id: appIcon id: appIcon
source: { source: {
if (modelData.appIcon) if (modelData.icon)
return "image://theme/" + modelData.appIcon return "image://theme/" + modelData.icon
else else
return "" return ""
} }
...@@ -98,13 +103,14 @@ Item { ...@@ -98,13 +103,14 @@ Item {
Label { Label {
id: appSummary id: appSummary
text: modelData.summary text: modelData.summary
width: rootitem.width/2 width: (rootitem.width-appIcon.width)/2
font.pointSize: 10 font.pointSize: 10
anchors.left: appIcon.right anchors.left: appIcon.right
wrapMode: Text.Wrap wrapMode: Text.Wrap
} }
Label { Label {
width: rootitem.width/2 id: appBody
width: (rootitem.width-appIcon.width)/2
text: modelData.body text: modelData.body
font.pointSize: 8 font.pointSize: 8
wrapMode: Text.Wrap wrapMode: Text.Wrap
...@@ -114,5 +120,5 @@ Item { ...@@ -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 @@ ...@@ -29,6 +29,7 @@
** **
****************************************************************************************/ ****************************************************************************************/
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Layouts 1.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.freedesktop.contextkit 1.0 import org.freedesktop.contextkit 1.0
...@@ -109,7 +110,8 @@ Item { ...@@ -109,7 +110,8 @@ Item {
visible: false visible: false
} }
Row { RowLayout {
anchors.fill: statusbar
spacing: 16 spacing: 16
StatusbarItem { StatusbarItem {
source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1" source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"
...@@ -175,8 +177,6 @@ Item { ...@@ -175,8 +177,6 @@ Item {
source: "image://theme/icon_play_pause" source: "image://theme/icon_play_pause"
} }
StatusbarItem { StatusbarItem {
width: 30
height: 48
Label { Label {
id: hours id: hours
width: 16 width: 16
......
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.0
Item { Item {
height: 48
width: 48
property alias source: icon.source property alias source: icon.source
property string panel_source property string panel_source
property Component panel property Component panel
Layout.fillWidth: true
Layout.fillHeight: true
Image { Image {
id: icon id: icon
anchors.centerIn: parent anchors.centerIn: parent
......
...@@ -33,7 +33,8 @@ qml.files = qml/MainScreen.qml \ ...@@ -33,7 +33,8 @@ qml.files = qml/MainScreen.qml \
qml/Pager.qml \ qml/Pager.qml \
qml/VolumeControl.qml \ qml/VolumeControl.qml \
qml/BatteryPanel.qml \ qml/BatteryPanel.qml \
qml/CommonPanel.qml qml/CommonPanel.qml \
qml/ShutdownScreen.qml
qmlcompositor.path = /usr/share/lipstick-glacier-home-qt5/qml/compositor qmlcompositor.path = /usr/share/lipstick-glacier-home-qt5/qml/compositor
qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \ qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \
...@@ -44,7 +45,19 @@ 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.path = /usr/share/lipstick-glacier-home-qt5/qml/scripts
scripts.files = qml/scripts/desktop.js 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 CONFIG += qt link_pkgconfig
QT += quick compositor QT += quick compositor
...@@ -90,6 +103,7 @@ OTHER_FILES += qml/*.qml \ ...@@ -90,6 +103,7 @@ OTHER_FILES += qml/*.qml \
qml/USBModeSelector.qml \ qml/USBModeSelector.qml \
qml/VolumeControl.qml \ qml/VolumeControl.qml \
qml/BatteryPanel.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