Commit 89338c7e authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

[qmlpath] Migrate to new Lipstick QmlPath API.

parent 7a570195
...@@ -73,5 +73,6 @@ ln -s ../lipstick.service %{buildroot}%{_libdir}/systemd/user/user-session.targe ...@@ -73,5 +73,6 @@ ln -s ../lipstick.service %{buildroot}%{_libdir}/systemd/user/user-session.targe
%config /etc/xdg/autostart/*.desktop %config /etc/xdg/autostart/*.desktop
%{_libdir}/systemd/user/user-session.target.wants/lipstick.service %{_libdir}/systemd/user/user-session.target.wants/lipstick.service
%{_datadir}/lipstick-glacier-home-qt5/nemovars.conf %{_datadir}/lipstick-glacier-home-qt5/nemovars.conf
%{_datadir}/lipstick-glacier-home-qt5/qml
# >> files # >> files
# << files # << files
...@@ -32,3 +32,4 @@ Files: ...@@ -32,3 +32,4 @@ Files:
- "%config /etc/xdg/autostart/*.desktop" - "%config /etc/xdg/autostart/*.desktop"
- "%{_libdir}/systemd/user/user-session.target.wants/lipstick.service" - "%{_libdir}/systemd/user/user-session.target.wants/lipstick.service"
- "%{_datadir}/lipstick-glacier-home-qt5/nemovars.conf" - "%{_datadir}/lipstick-glacier-home-qt5/nemovars.conf"
- "%{_datadir}/lipstick-glacier-home-qt5/qml"
...@@ -24,22 +24,20 @@ ...@@ -24,22 +24,20 @@
#include <homeapplication.h> #include <homeapplication.h>
#include <QFont> #include <QFont>
#include <homewindow.h> #include <homewindow.h>
#include <lipstickqmlpath.h>
#include <QQmlEngine> #include <QQmlEngine>
#include <QQmlContext> #include <QQmlContext>
#include "glacierwindowmodel.h" #include "glacierwindowmodel.h"
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
QmlPath::append("/usr/share/lipstick-glacier-home-qt5/qml");
HomeApplication app(argc, argv, QString()); HomeApplication app(argc, argv, QString());
QGuiApplication::setFont(QFont("Open Sans")); QGuiApplication::setFont(QFont("Open Sans"));
setenv("EGL_PLATFORM", "wayland", 1); app.setCompositorPath("/usr/share/lipstick-glacier-home-qt5/qml/compositor.qml");
setenv("QT_QPA_PLATFORM", "wayland", 1);
setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1);
app.setCompositorPath("qrc:/qml/compositor.qml");
qmlRegisterType<GlacierWindowModel>("org.nemomobile.glacier", 1, 0 ,"GlacierWindowModel"); qmlRegisterType<GlacierWindowModel>("org.nemomobile.glacier", 1, 0 ,"GlacierWindowModel");
app.setQmlPath("qrc:/qml/MainScreen.qml"); app.setQmlPath("/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml");
app.mainWindowInstance()->showFullScreen(); app.mainWindowInstance()->showFullScreen();
return app.exec(); return app.exec();
} }
......
...@@ -2,7 +2,7 @@ import QtQuick 2.0 ...@@ -2,7 +2,7 @@ import QtQuick 2.0
Image { Image {
id: lockScreen id: lockScreen
source: "images/graphics-wallpaper-home.jpg" source: "qrc:/qml/images/graphics-wallpaper-home.jpg"
visible: LipstickSettings.lockscreenVisible visible: LipstickSettings.lockscreenVisible
LockscreenClock { LockscreenClock {
......
...@@ -50,7 +50,7 @@ Page { ...@@ -50,7 +50,7 @@ Page {
ConfigurationValue { ConfigurationValue {
id: wallpaperSource id: wallpaperSource
key: desktop.isPortrait ? "/desktop/meego/background/portrait/picture_filename" : "/desktop/meego/background/landscape/picture_filename" key: desktop.isPortrait ? "/desktop/meego/background/portrait/picture_filename" : "/desktop/meego/background/landscape/picture_filename"
defaultValue: "images/graphics-wallpaper-home.jpg" defaultValue: "qrc:/qml/images/graphics-wallpaper-home.jpg"
} }
id: desktop id: desktop
property alias lockscreen: lockScreen property alias lockscreen: lockScreen
...@@ -112,7 +112,7 @@ Page { ...@@ -112,7 +112,7 @@ Page {
} }
Image { Image {
id:wallpaper id:wallpaper
source: "images/wallpaper-portrait-bubbles.png" source: "qrc:/qml/images/wallpaper-portrait-bubbles.png"
anchors.fill: parent anchors.fill: parent
z: -100 z: -100
} }
......
...@@ -171,7 +171,7 @@ Item { ...@@ -171,7 +171,7 @@ Item {
} }
width: notificationArea.notificationIconSize width: notificationArea.notificationIconSize
height: width height: width
source: "images/notification-circle.png" source: "qrc:/qml/images/notification-circle.png"
} }
Text { Text {
......
...@@ -196,19 +196,19 @@ Item { ...@@ -196,19 +196,19 @@ Item {
StatusbarItem { StatusbarItem {
source: { source: {
if(batteryChargePercentage.value > 85) { if(batteryChargePercentage.value > 85) {
return "images/battery6.png" return "qrc:/qml/images/battery6.png"
} else if (batteryChargePercentage.value <= 5) { } else if (batteryChargePercentage.value <= 5) {
return "images/battery0.png" return "qrc:/qml/images/battery0.png"
} else if (batteryChargePercentage.value <= 10) { } else if (batteryChargePercentage.value <= 10) {
return "images/battery1.png" return "qrc:/qml/images/battery1.png"
} else if (batteryChargePercentage.value <= 25) { } else if (batteryChargePercentage.value <= 25) {
return "images/battery2.png" return "qrc:/qml/images/battery2.png"
} else if (batteryChargePercentage.value <= 40) { } else if (batteryChargePercentage.value <= 40) {
return "images/battery3.png" return "qrc:/qml/images/battery3.png"
} else if (batteryChargePercentage.value <= 65) { } else if (batteryChargePercentage.value <= 65) {
return "images/battery4.png" return "qrc:/qml/images/battery4.png"
} else if (batteryChargePercentage.value <= 80) { } else if (batteryChargePercentage.value <= 80) {
return "images/battery5.png" return "qrc:/qml/images/battery5.png"
} }
} }
} }
......
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>qml/MainScreen.qml</file>
<file>qml/compositor/ScreenGestureArea.qml</file>
<file>qml/compositor/WindowWrapperAlpha.qml</file>
<file>qml/compositor/WindowWrapperBase.qml</file>
<file>qml/AppLauncher.qml</file>
<file>qml/AppSwitcher.qml</file>
<file>qml/compositor.qml</file>
<file>qml/LauncherItemDelegate.qml</file>
<file>qml/Lockscreen.qml</file>
<file>qml/LockscreenClock.qml</file>
<file>qml/Pager.qml</file>
<file>qml/ToolBarLayoutExample.qml</file>
<file>qml/SwitcherItem.qml</file>
<file>qml/CloseButton.qml</file>
<file>qml/images/button_default.png</file> <file>qml/images/button_default.png</file>
<file>qml/images/button_pressed.png</file> <file>qml/images/button_pressed.png</file>
<file>qml/images/navigation_next_item.png</file> <file>qml/images/navigation_next_item.png</file>
...@@ -30,17 +16,8 @@ ...@@ -30,17 +16,8 @@
<file>qml/images/battery4.png</file> <file>qml/images/battery4.png</file>
<file>qml/images/battery5.png</file> <file>qml/images/battery5.png</file>
<file>qml/images/battery6.png</file> <file>qml/images/battery6.png</file>
<file>qml/compositor/WindowWrapperMystic.qml</file>
<file>qml/theme/icon-m-framework-close-thumbnail.png</file> <file>qml/theme/icon-m-framework-close-thumbnail.png</file>
<file>qml/NotificationPreview.qml</file>
<file>qml/images/notification-circle.png</file> <file>qml/images/notification-circle.png</file>
<file>qml/scripts/desktop.js</file>
<file>qml/FeedsPage.qml</file>
<file>qml/Statusbar.qml</file>
<file>qml/images/wallpaper-portrait-bubbles.png</file> <file>qml/images/wallpaper-portrait-bubbles.png</file>
<file>qml/StatusbarItem.qml</file>
<file>qml/WifiPanel.qml</file>
<file>qml/SimPanel.qml</file>
<file>qml/NumButton.qml</file>
</qresource> </qresource>
</RCC> </RCC>
...@@ -11,7 +11,38 @@ target.path = /usr/bin ...@@ -11,7 +11,38 @@ target.path = /usr/bin
styles.path = /usr/share/lipstick-glacier-home-qt5 styles.path = /usr/share/lipstick-glacier-home-qt5
styles.files = nemovars.conf styles.files = nemovars.conf
INSTALLS += styles qml.path = /usr/share/lipstick-glacier-home-qt5/qml
qml.files = qml/MainScreen.qml \
qml/compositor.qml \
qml/LauncherItemDelegate.qml \
qml/Lockscreen.qml \
qml/LockscreenClock.qml \
qml/AppSwitcher.qml \
qml/AppLauncher.qml \
qml/ToolBarLayoutExample.qml \
qml/SwitcherItem.qml \
qml/CloseButton.qml \
qml/NotificationPreview.qml \
qml/FeedsPage.qml \
qml/Statusbar.qml \
qml/StatusbarItem.qml \
qml/WifiPanel.qml \
qml/SimPanel.qml \
qml/NumButton.qml \
qml/USBModeSelector.qml \
qml/Pager.qml \
qml/VolumeControl.qml
qmlcompositor.path = /usr/share/lipstick-glacier-home-qt5/qml/compositor
qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \
qml/compositor/WindowWrapperBase.qml \
qml/compositor/WindowWrapperAlpha.qml \
qml/compositor/ScreenGestureArea.qml
scripts.path = /usr/share/lipstick-glacier-home-qt5/qml/scripts
scripts.files = qml/scripts/desktop.js
INSTALLS += styles qml qmlcompositor scripts
CONFIG += qt link_pkgconfig CONFIG += qt link_pkgconfig
QT += quick compositor QT += quick compositor
...@@ -51,6 +82,8 @@ OTHER_FILES += qml/*.qml \ ...@@ -51,6 +82,8 @@ OTHER_FILES += qml/*.qml \
qml/WifiPanel.qml \ qml/WifiPanel.qml \
nemovars.conf \ nemovars.conf \
qml/SimPanel.qml \ qml/SimPanel.qml \
qml/NumButton.qml qml/NumButton.qml \
qml/USBModeSelector.qml \
qml/VolumeControl.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