Add splash screen support

This commit is contained in:
Michael Zanetti 2021-03-21 15:24:54 +01:00
parent b8aba4b4ce
commit 5c34fc22b0
17 changed files with 910 additions and 31 deletions

View File

@ -256,5 +256,6 @@
<file>ui/images/sensors/water.svg</file> <file>ui/images/sensors/water.svg</file>
<file>ui/images/zigbee/deCONZ.svg</file> <file>ui/images/zigbee/deCONZ.svg</file>
<file>ui/images/zigbee/NXP.svg</file> <file>ui/images/zigbee/NXP.svg</file>
<file>ui/images/nymea-splash-horizontal.svg</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -88,6 +88,8 @@ int main(int argc, char *argv[])
parser.addOption(defaultViewsOption); parser.addOption(defaultViewsOption);
QCommandLineOption kioskOption = QCommandLineOption({"k", "kiosk"}, "Start the application in kiosk mode."); QCommandLineOption kioskOption = QCommandLineOption({"k", "kiosk"}, "Start the application in kiosk mode.");
parser.addOption(kioskOption); parser.addOption(kioskOption);
QCommandLineOption splashOption = QCommandLineOption({"p", "splash"}, "Show a splash screen on startup.");
parser.addOption(splashOption);
parser.process(application); parser.process(application);
// Initialize app log controller as early as possible, but after setting app name etc // Initialize app log controller as early as possible, but after setting app name etc
@ -152,6 +154,7 @@ int main(int argc, char *argv[])
engine->rootContext()->setContextProperty("defaultMainViewFilter", parser.value(defaultViewsOption)); engine->rootContext()->setContextProperty("defaultMainViewFilter", parser.value(defaultViewsOption));
engine->rootContext()->setContextProperty("kioskMode", parser.isSet(kioskOption)); engine->rootContext()->setContextProperty("kioskMode", parser.isSet(kioskOption));
engine->rootContext()->setContextProperty("showSplash", parser.isSet(splashOption));
engine->rootContext()->setContextProperty("autoConnectHost", parser.value(connectOption)); engine->rootContext()->setContextProperty("autoConnectHost", parser.value(connectOption));
engine->rootContext()->setContextProperty("systemProductType", QSysInfo::productType()); engine->rootContext()->setContextProperty("systemProductType", QSysInfo::productType());

View File

@ -84,7 +84,7 @@ void PlatformHelper::requestPermissions()
void PlatformHelper::hideSplashScreen() void PlatformHelper::hideSplashScreen()
{ {
// No splash screen by default... setSplashVisible(false);
} }
@ -173,6 +173,19 @@ void PlatformHelper::setBottomPanelColor(const QColor &color)
} }
} }
bool PlatformHelper::splashVisible() const
{
return m_splashVisible;
}
void PlatformHelper::setSplashVisible(bool splashVisible)
{
if (m_splashVisible != splashVisible) {
m_splashVisible = splashVisible;
emit splashVisibleChanged();
}
}
void PlatformHelper::vibrate(PlatformHelper::HapticsFeedback feedbackType) void PlatformHelper::vibrate(PlatformHelper::HapticsFeedback feedbackType)
{ {
Q_UNUSED(feedbackType) Q_UNUSED(feedbackType)

View File

@ -47,6 +47,7 @@ class PlatformHelper : public QObject
Q_PROPERTY(QString deviceModel READ deviceModel CONSTANT) Q_PROPERTY(QString deviceModel READ deviceModel CONSTANT)
Q_PROPERTY(QString deviceManufacturer READ deviceManufacturer CONSTANT) Q_PROPERTY(QString deviceManufacturer READ deviceManufacturer CONSTANT)
Q_PROPERTY(QString machineHostname READ machineHostname CONSTANT) Q_PROPERTY(QString machineHostname READ machineHostname CONSTANT)
Q_PROPERTY(bool splashVisible READ splashVisible WRITE setSplashVisible NOTIFY splashVisibleChanged)
Q_PROPERTY(bool canControlScreen READ canControlScreen CONSTANT) Q_PROPERTY(bool canControlScreen READ canControlScreen CONSTANT)
Q_PROPERTY(int screenTimeout READ screenTimeout WRITE setScreenTimeout NOTIFY screenTimeoutChanged) Q_PROPERTY(int screenTimeout READ screenTimeout WRITE setScreenTimeout NOTIFY screenTimeoutChanged)
Q_PROPERTY(int screenBrightness READ screenBrightness WRITE setScreenBrightness NOTIFY screenBrightnessChanged) Q_PROPERTY(int screenBrightness READ screenBrightness WRITE setScreenBrightness NOTIFY screenBrightnessChanged)
@ -85,7 +86,11 @@ public:
virtual QColor bottomPanelColor() const; virtual QColor bottomPanelColor() const;
virtual void setBottomPanelColor(const QColor &color); virtual void setBottomPanelColor(const QColor &color);
virtual bool splashVisible() const;
virtual void setSplashVisible(bool splashVisible);
Q_INVOKABLE virtual void hideSplashScreen(); Q_INVOKABLE virtual void hideSplashScreen();
Q_INVOKABLE virtual void vibrate(HapticsFeedback feedbackType); Q_INVOKABLE virtual void vibrate(HapticsFeedback feedbackType);
Q_INVOKABLE virtual void toClipBoard(const QString &text); Q_INVOKABLE virtual void toClipBoard(const QString &text);
@ -100,6 +105,7 @@ signals:
void screenBrightnessChanged(); void screenBrightnessChanged();
void topPanelColorChanged(); void topPanelColorChanged();
void bottomPanelColorChanged(); void bottomPanelColorChanged();
void splashVisibleChanged();
protected: protected:
explicit PlatformHelper(QObject *parent = nullptr); explicit PlatformHelper(QObject *parent = nullptr);
@ -109,6 +115,8 @@ private:
QColor m_topPanelColor = QColor("black"); QColor m_topPanelColor = QColor("black");
QColor m_bottomPanelColor = QColor("black"); QColor m_bottomPanelColor = QColor("black");
bool m_splashVisible = true;
}; };
#endif // PLATFORMHELPER_H #endif // PLATFORMHELPER_H

View File

@ -32,12 +32,11 @@
#include "logging.h" #include "logging.h"
extern "C" {
#include <ply-boot-client.h>
}
Q_DECLARE_LOGGING_CATEGORY(dcPlatformIntegration) Q_DECLARE_LOGGING_CATEGORY(dcPlatformIntegration)
#include <QProcess>
PlatformHelperGeneric::PlatformHelperGeneric(QObject *parent) : PlatformHelper(parent) PlatformHelperGeneric::PlatformHelperGeneric(QObject *parent) : PlatformHelper(parent)
{ {
m_piHelper = new ScreenHelper(this); m_piHelper = new ScreenHelper(this);
@ -73,19 +72,3 @@ void PlatformHelperGeneric::setScreenBrightness(int percent)
emit screenTimeoutChanged(); emit screenTimeoutChanged();
} }
} }
void PlatformHelperGeneric::hideSplashScreen()
{
ply_event_loop_t *loop = ply_event_loop_new();
ply_boot_client_t *client = ply_boot_client_new();
bool status = ply_boot_client_connect(client, [] (void* data, ply_boot_client_t *) -> void {
PlatformHelperGeneric *thiz = reinterpret_cast<PlatformHelperGeneric*>(data);
// ply_event_loop_exit(this.loop, 0);
// ply_boot_client_free(client);
}, this);
if (!status) {
qCCritical(dcPlatformIntegration()) << "Cannot deactivate splash screen";
}
ply_boot_client_attach_to_event_loop(client, loop);
ply_boot_client_tell_daemon_to_deactivate(client, nullptr, nullptr, nullptr);
}

View File

@ -35,6 +35,10 @@
#include "platformhelper.h" #include "platformhelper.h"
#include "screenhelper.h" #include "screenhelper.h"
extern "C" {
#include <ply-boot-client.h>
}
class PlatformHelperGeneric : public PlatformHelper class PlatformHelperGeneric : public PlatformHelper
{ {
Q_OBJECT Q_OBJECT
@ -46,10 +50,11 @@ public:
virtual void setScreenTimeout(int timeout) override; virtual void setScreenTimeout(int timeout) override;
virtual int screenBrightness() const override; virtual int screenBrightness() const override;
virtual void setScreenBrightness(int percent) override; virtual void setScreenBrightness(int percent) override;
virtual void hideSplashScreen() override;
private: private:
ScreenHelper *m_piHelper = nullptr; ScreenHelper *m_piHelper = nullptr;
ply_event_loop_t *m_plyLoop = nullptr;
ply_boot_client_t *m_plyClient = nullptr;
}; };
#endif // PLATFORMHELPERGENERIC_H #endif // PLATFORMHELPERGENERIC_H

View File

@ -556,4 +556,19 @@ ApplicationWindow {
z: 1 z: 1
anchors { left: parent.left; bottom: parent.bottom; right: parent.right } anchors { left: parent.left; bottom: parent.bottom; right: parent.right }
} }
Image {
id: splashScreen
parent: overlay
source: "/ui/images/nymea-splash-horizontal.svg"
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
opacity: PlatformHelper.splashVisible ? 1 : 0
Behavior on opacity { NumberAnimation {duration: 300 }}
visible: showSplash && opacity > 0
antialiasing: true
smooth: true
sourceSize.width: Math.max(width, height)
sourceSize.height: sourceSize.width
}
} }

View File

@ -236,7 +236,6 @@ Item {
if (engine.jsonRpcClient.connected) { if (engine.jsonRpcClient.connected) {
pageStack.push(Qt.resolvedUrl("MainPage.qml")) pageStack.push(Qt.resolvedUrl("MainPage.qml"))
PlatformHelper.hideSplashScreen();
return; return;
} }
@ -414,6 +413,7 @@ Item {
if (!engine.thingManager.fetchingData) { if (!engine.thingManager.fetchingData) {
updatePushNotificationThings() updatePushNotificationThings()
} }
PlatformHelper.hideSplashScreen();
} }
} }

View File

@ -0,0 +1,821 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="Layer_1"
data-name="Layer 1"
viewBox="0 0 841.89 595.28"
version="1.1"
sodipodi:docname="nymea-splash-horizontal.svg"
inkscape:version="1.0.1 (1.0.1+r74)"
width="841.89001"
height="595.28003">
<metadata
id="metadata108">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Artboard 1 copy 5 Kopie 2</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1380"
inkscape:window-height="873"
id="namedview106"
showgrid="true"
inkscape:zoom="0.44473763"
inkscape:cx="248.2707"
inkscape:cy="236.96862"
inkscape:window-x="60"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1"
units="px">
<inkscape:grid
type="xygrid"
id="grid1324" />
</sodipodi:namedview>
<defs
id="defs69">
<style
id="style2">.cls-1{fill:url(#New_Gradient_Swatch_1);}.cls-2{fill:url(#linear-gradient);}.cls-3{fill:url(#linear-gradient-2);}.cls-4{fill:url(#linear-gradient-3);}.cls-5{fill:url(#linear-gradient-4);}.cls-6{fill:url(#linear-gradient-5);}.cls-7{fill:url(#linear-gradient-6);}.cls-8{fill:url(#linear-gradient-7);}.cls-9{fill:url(#linear-gradient-8);}.cls-10{fill:url(#linear-gradient-9);}.cls-11{fill:url(#New_Gradient_Swatch_2);}.cls-12{fill:#676767;}</style>
<linearGradient
id="New_Gradient_Swatch_1"
x1="282.06"
y1="231.14"
x2="354.72"
y2="321.84"
gradientUnits="userSpaceOnUse">
<stop
offset="0.13"
stop-color="#9fc8a4"
id="stop4" />
<stop
offset="0.4"
stop-color="#92bc9e"
id="stop6" />
<stop
offset="0.9"
stop-color="#719b8f"
id="stop8" />
<stop
offset="1"
stop-color="#69938c"
id="stop10" />
</linearGradient>
<linearGradient
id="linear-gradient"
x1="252.74001"
y1="539.15997"
x2="235.17"
y2="539.15997"
gradientTransform="matrix(0.97,0.26,-0.26,0.97,272.36,-301.35)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#e3eae4"
id="stop13" />
<stop
offset="1"
stop-color="#cde2d8"
id="stop15" />
</linearGradient>
<linearGradient
id="linear-gradient-2"
x1="364.04999"
y1="261.20999"
x2="355.76999"
y2="302.63"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#9fc8a4"
id="stop18" />
<stop
offset="0.27"
stop-color="#9bc4a2"
id="stop20" />
<stop
offset="0.54"
stop-color="#8fb89d"
id="stop22" />
<stop
offset="0.82"
stop-color="#7ba494"
id="stop24" />
<stop
offset="1"
stop-color="#69938c"
id="stop26" />
</linearGradient>
<linearGradient
id="linear-gradient-3"
x1="370.64999"
y1="293.82999"
x2="370.51001"
y2="293.82999"
xlink:href="#linear-gradient" />
<linearGradient
id="linear-gradient-4"
x1="380.91"
y1="282.75"
x2="370.64999"
y2="282.75"
xlink:href="#linear-gradient" />
<linearGradient
id="linear-gradient-5"
x1="370.51001"
y1="295.07999"
x2="365.47"
y2="295.07999"
xlink:href="#linear-gradient" />
<linearGradient
id="linear-gradient-6"
x1="365.22"
y1="286.54001"
x2="373.5"
y2="286.54001"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#89ae8e"
id="stop32" />
<stop
offset="1"
stop-color="#79a79f"
id="stop34" />
</linearGradient>
<linearGradient
id="linear-gradient-7"
x1="330.54999"
y1="350.38"
x2="312.60999"
y2="365.42001"
gradientTransform="rotate(1.3,1194.7389,914.71681)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#9fc8a4"
id="stop37" />
<stop
offset="1"
stop-color="#8cc1b6"
id="stop39" />
</linearGradient>
<linearGradient
id="linear-gradient-8"
x1="304.51001"
y1="356.13"
x2="328.32999"
y2="356.13"
gradientTransform="rotate(1.3,1194.7389,914.71681)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#9fc8a4"
id="stop42" />
<stop
offset="0.25"
stop-color="#99c2a1"
id="stop44" />
<stop
offset="0.59"
stop-color="#88b19a"
id="stop46" />
<stop
offset="0.97"
stop-color="#6b958d"
id="stop48" />
<stop
offset="1"
stop-color="#69938c"
id="stop50" />
</linearGradient>
<linearGradient
id="linear-gradient-9"
x1="328.23999"
y1="320.20001"
x2="335.07999"
y2="312.04999"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#79a79f"
id="stop53" />
<stop
offset="0.49"
stop-color="#74a099"
id="stop55" />
<stop
offset="1"
stop-color="#69938c"
id="stop57" />
</linearGradient>
<linearGradient
id="New_Gradient_Swatch_2"
x1="338.64001"
y1="262.42001"
x2="306.78"
y2="298.69"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#9fc8a4"
id="stop60" />
<stop
offset="0.46"
stop-color="#9ac6a8"
id="stop62" />
<stop
offset="0.98"
stop-color="#8dc1b5"
id="stop64" />
<stop
offset="1"
stop-color="#8cc1b6"
id="stop66" />
</linearGradient>
<linearGradient
id="SVGID_1_"
gradientUnits="userSpaceOnUse"
x1="369.02579"
y1="171.88429"
x2="441.68719"
y2="262.58051">
<stop
offset="0.1296"
style="stop-color:#7CC099"
id="stop46-3" />
<stop
offset="0.3785"
style="stop-color:#6FB594"
id="stop48-6" />
<stop
offset="0.835"
style="stop-color:#4E9688"
id="stop50-7" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop52" />
</linearGradient>
<linearGradient
id="SVGID_2_"
gradientUnits="userSpaceOnUse"
x1="936.13898"
y1="154.45329"
x2="918.56207"
y2="154.45329"
gradientTransform="matrix(0.9669,0.2553,-0.2553,0.9669,-399.6603,-163.1002)">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop61" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop63" />
</linearGradient>
<linearGradient
id="SVGID_3_"
gradientUnits="userSpaceOnUse"
x1="451.01599"
y1="201.9489"
x2="442.73761"
y2="243.37801">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop72" />
<stop
offset="0.2568"
style="stop-color:#78BC98"
id="stop74" />
<stop
offset="0.5165"
style="stop-color:#6CB193"
id="stop76" />
<stop
offset="0.7767"
style="stop-color:#589F8C"
id="stop78" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop80" />
</linearGradient>
<linearGradient
id="SVGID_4_"
gradientUnits="userSpaceOnUse"
x1="457.62369"
y1="234.5722"
x2="457.47629"
y2="234.5722">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop87" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop89" />
</linearGradient>
<linearGradient
id="SVGID_5_"
gradientUnits="userSpaceOnUse"
x1="467.88159"
y1="223.4929"
x2="457.62369"
y2="223.4929">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop96" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop98" />
</linearGradient>
<linearGradient
id="SVGID_6_"
gradientUnits="userSpaceOnUse"
x1="457.47629"
y1="235.823"
x2="452.43719"
y2="235.823">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop105" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop107" />
</linearGradient>
<linearGradient
id="SVGID_7_"
gradientUnits="userSpaceOnUse"
x1="452.19159"
y1="227.27921"
x2="460.47461"
y2="227.27921">
<stop
offset="0"
style="stop-color:#6AA583"
id="stop112" />
<stop
offset="1"
style="stop-color:#4C9E96"
id="stop114" />
</linearGradient>
<linearGradient
id="SVGID_8_"
gradientUnits="userSpaceOnUse"
x1="473.17111"
y1="268.90411"
x2="455.23529"
y2="283.95389"
gradientTransform="matrix(0.9997,0.0227,-0.0227,0.9997,-36.4014,-7.9207)">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop119" />
<stop
offset="1"
style="stop-color:#57BAAE"
id="stop121" />
</linearGradient>
<linearGradient
id="SVGID_9_"
gradientUnits="userSpaceOnUse"
x1="447.13129"
y1="274.66199"
x2="470.95151"
y2="274.66199"
gradientTransform="matrix(0.9997,0.0227,-0.0227,0.9997,-36.4014,-7.9207)">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop126" />
<stop
offset="0.2327"
style="stop-color:#76BA97"
id="stop128" />
<stop
offset="0.5485"
style="stop-color:#65AB90"
id="stop130" />
<stop
offset="0.9106"
style="stop-color:#489186"
id="stop132" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop134" />
</linearGradient>
<linearGradient
id="SVGID_10_"
gradientUnits="userSpaceOnUse"
x1="415.2153"
y1="260.93829"
x2="422.0509"
y2="252.7919">
<stop
offset="0"
style="stop-color:#4C9E96"
id="stop141" />
<stop
offset="0.4859"
style="stop-color:#489790"
id="stop143" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop145" />
</linearGradient>
<linearGradient
id="SVGID_11_"
gradientUnits="userSpaceOnUse"
x1="425.60641"
y1="203.1666"
x2="393.7475"
y2="239.4308">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop152" />
<stop
offset="0.3183"
style="stop-color:#77BF9C"
id="stop154" />
<stop
offset="0.6757"
style="stop-color:#6ABDA3"
id="stop156" />
<stop
offset="1"
style="stop-color:#57BAAE"
id="stop158" />
</linearGradient>
</defs>
<title
id="title71">Artboard 1 copy 5 Kopie 2</title>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none"
id="rect1322"
width="841.89941"
height="595.28094"
x="0"
y="0" />
<g
transform="matrix(1.0091946,0,0,1.0091946,-90.89009,57.058007)"
id="g41">
<g
id="g43">
<linearGradient
id="linearGradient3548"
gradientUnits="userSpaceOnUse"
x1="369.02579"
y1="171.88429"
x2="441.68719"
y2="262.58051">
<stop
offset="0.1296"
style="stop-color:#7CC099"
id="stop3550" />
<stop
offset="0.3785"
style="stop-color:#6FB594"
id="stop3552" />
<stop
offset="0.835"
style="stop-color:#4E9688"
id="stop3554" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop3556" />
</linearGradient>
<path
style="fill:url(#SVGID_1_)"
inkscape:connector-curvature="0"
d="m 433.7,212.6 c -5.9,-10.1 -19,-17.9 -27.5,-21 -8.5,-3.2 -18,-10.1 -18,-10.1 -7.5,-5 -9.7,-9 -13.7,-14 -1.2,2.6 -2.2,5.8 -3,9.6 1.8,3.1 8.7,13.4 28.1,21.5 1.7,0.7 6.9,2.8 7,2.9 l 6.5,2.6 -6.7,-1.9 c -0.2,-0.1 -5.5,-1.6 -7.3,-2.2 -17.3,-6.3 -25,-15.1 -28,-19.9 -0.8,4.9 -1.1,10.6 -0.7,16.5 5.2,4.7 14,11 26.9,15.4 0.9,0.3 3.6,1.3 3.6,1.3 l 3.4,1.2 -3.5,-0.5 c -0.1,0 -3,-0.4 -4,-0.6 -12.1,-2.9 -20.5,-8.4 -26.1,-13.3 0.5,4.3 1.4,8.6 2.8,13 0.3,1 0.7,2.1 1.1,3 4.4,2 9.6,3.9 15.4,5.2 1.1,0.2 4.3,1.1 4.3,1.1 l 3.8,1 -4,-0.2 c -0.1,0 -3.4,-0.2 -4.5,-0.4 -5.1,-0.7 -9.8,-2 -13.9,-3.6 6.6,13.7 18.8,21.4 35.2,27.5 18.7,7 19.4,25 19.4,25 0,0 5.1,-3.8 9.6,-18.4 5.1,-16.2 -0.3,-30.6 -6.2,-40.7 z"
id="path54" />
</g>
<g
id="g56">
<g
id="g58">
<linearGradient
id="linearGradient3561"
gradientUnits="userSpaceOnUse"
x1="936.13898"
y1="154.45329"
x2="918.56207"
y2="154.45329"
gradientTransform="matrix(0.9669,0.2553,-0.2553,0.9669,-399.6603,-163.1002)">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop3563" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop3565" />
</linearGradient>
<path
style="fill:url(#SVGID_2_)"
inkscape:connector-curvature="0"
d="m 458.6,233.8 c 4.9,-3.6 6.9,-7.8 8.5,-12.5 0.7,-2.1 1.3,-5 0.3,-8.1 -0.8,-2.5 -6.5,-6.2 -11.2,-4.7 -5.1,1.7 -6.1,8.1 -6.5,10.9 -0.6,4.3 0.4,10.9 2.8,17.6 -0.1,0 2.1,-0.2 6.1,-3.2 z"
id="path65" />
</g>
<g
id="g67">
<g
id="g69">
<linearGradient
id="linearGradient3570"
gradientUnits="userSpaceOnUse"
x1="451.01599"
y1="201.9489"
x2="442.73761"
y2="243.37801">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop3572" />
<stop
offset="0.2568"
style="stop-color:#78BC98"
id="stop3574" />
<stop
offset="0.5165"
style="stop-color:#6CB193"
id="stop3576" />
<stop
offset="0.7767"
style="stop-color:#589F8C"
id="stop3578" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop3580" />
</linearGradient>
<path
style="fill:url(#SVGID_3_)"
inkscape:connector-curvature="0"
d="m 449.7,219.4 c 0.4,-2.8 1.4,-9.2 6.5,-10.9 4.2,-1.4 9.3,1.5 10.8,3.9 -1.5,-3.9 -5.6,-6.6 -9,-8.3 -4.8,-2.5 -10.8,-2.9 -15.7,-1.7 -4.6,1.1 -7,3.6 -10.9,6.9 0.8,1.1 1.6,2.2 2.2,3.3 4.6,8 9,18.6 8.2,30.6 3,-5 9.7,-6.1 10.6,-6.2 -2.4,-6.6 -3.4,-13.3 -2.7,-17.6 z"
id="path82" />
</g>
<g
id="g84">
<linearGradient
id="linearGradient3584"
gradientUnits="userSpaceOnUse"
x1="457.62369"
y1="234.5722"
x2="457.47629"
y2="234.5722">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop3586" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop3588" />
</linearGradient>
<path
style="fill:url(#SVGID_4_)"
inkscape:connector-curvature="0"
d="m 457.6,234.5 c -0.1,0 -0.1,0.1 -0.1,0.1 0,0 0.1,0 0.1,-0.1 z"
id="path91-5" />
</g>
<g
id="g93">
<linearGradient
id="linearGradient3592"
gradientUnits="userSpaceOnUse"
x1="467.88159"
y1="223.4929"
x2="457.62369"
y2="223.4929">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop3594" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop3596" />
</linearGradient>
<path
style="fill:url(#SVGID_5_)"
inkscape:connector-curvature="0"
d="m 467.4,213.2 c -0.1,-0.2 -0.2,-0.5 -0.4,-0.8 0.7,1.7 0.8,3.7 0.1,5.9 -1.5,4.9 -1.8,7.1 -6.1,12.9 -1,1.3 -2.2,2.4 -3.4,3.2 0.3,-0.2 0.6,-0.4 1,-0.7 4.9,-3.6 6.9,-7.8 8.5,-12.5 0.7,-2 1.2,-4.9 0.3,-8 z"
id="path100" />
</g>
<g
id="g102">
<linearGradient
id="linearGradient3600"
gradientUnits="userSpaceOnUse"
x1="457.47629"
y1="235.823"
x2="452.43719"
y2="235.823">
<stop
offset="0"
style="stop-color:#DBE6E0"
id="stop3602" />
<stop
offset="1"
style="stop-color:#BCDED3"
id="stop3604" />
</linearGradient>
<path
style="fill:url(#SVGID_6_)"
inkscape:connector-curvature="0"
d="m 452.4,237 c 0,0 0,0 0,0 0,0 1.8,-0.2 5,-2.4 -2.5,1.7 -4.9,2.4 -4.9,2.4 0,0 0,0 -0.1,0 z"
id="path109" />
</g>
</g>
<linearGradient
id="linearGradient3607"
gradientUnits="userSpaceOnUse"
x1="452.19159"
y1="227.27921"
x2="460.47461"
y2="227.27921">
<stop
offset="0"
style="stop-color:#6AA583"
id="stop3609" />
<stop
offset="1"
style="stop-color:#4C9E96"
id="stop3611" />
</linearGradient>
<path
style="fill:url(#SVGID_7_)"
inkscape:connector-curvature="0"
d="m 458.2,217.6 c -1,-0.3 -2,0 -2.8,0.6 -0.2,0.3 -0.3,0.6 -0.4,0.9 -0.4,1.6 0.5,3.3 2.2,3.7 0.7,0.2 1.3,0.1 1.9,-0.1 -0.9,6.9 -5.9,12.4 -6.9,13.5 0.1,0.4 0.2,0.5 0.2,0.7 0.3,0 0.4,-0.1 0.9,-0.2 1.7,-1.9 6.7,-7.9 7,-15.5 0.5,-1.5 -0.5,-3.1 -2.1,-3.6 z"
id="path116" />
</g>
<linearGradient
id="linearGradient3614"
gradientUnits="userSpaceOnUse"
x1="473.17111"
y1="268.90411"
x2="455.23529"
y2="283.95389"
gradientTransform="matrix(0.9997,0.0227,-0.0227,0.9997,-36.4014,-7.9207)">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop3616" />
<stop
offset="1"
style="stop-color:#57BAAE"
id="stop3618" />
</linearGradient>
<path
style="fill:url(#SVGID_8_)"
inkscape:connector-curvature="0"
d="m 405.5,261.4 c 1.5,12.7 7.5,31.7 27.8,47.9 0,0 10.1,-15.4 0.4,-32.5 -9.7,-17.1 -23.8,-22.7 -28.8,-24.5 -0.2,3.6 0.4,6.8 0.6,9.1 z"
id="path123" />
<linearGradient
id="linearGradient3621"
gradientUnits="userSpaceOnUse"
x1="447.13129"
y1="274.66199"
x2="470.95151"
y2="274.66199"
gradientTransform="matrix(0.9997,0.0227,-0.0227,0.9997,-36.4014,-7.9207)">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop3623" />
<stop
offset="0.2327"
style="stop-color:#76BA97"
id="stop3625" />
<stop
offset="0.5485"
style="stop-color:#65AB90"
id="stop3627" />
<stop
offset="0.9106"
style="stop-color:#489186"
id="stop3629" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop3631" />
</linearGradient>
<path
style="fill:url(#SVGID_9_)"
inkscape:connector-curvature="0"
d="m 423.7,272.8 c -5.7,-10 -12.8,-16.8 -18.8,-20.5 -0.1,3.2 0.4,7 0.6,9.1 1.2,10.8 5.8,26.1 19.6,40.4 2.4,-5.5 5.5,-16.8 -1.4,-29 z"
id="path136" />
<g
id="g138">
<linearGradient
id="linearGradient3635"
gradientUnits="userSpaceOnUse"
x1="415.2153"
y1="260.93829"
x2="422.0509"
y2="252.7919">
<stop
offset="0"
style="stop-color:#4C9E96"
id="stop3637" />
<stop
offset="0.4859"
style="stop-color:#489790"
id="stop3639" />
<stop
offset="1"
style="stop-color:#408A83"
id="stop3641" />
</linearGradient>
<path
style="fill:url(#SVGID_10_)"
inkscape:connector-curvature="0"
d="m 411.9,246.7 c -2,-0.8 -4.9,-1.6 -6.8,-2.4 -0.3,2.5 -0.2,5.1 -0.2,8.1 4.4,1.6 16.1,6.2 25.5,19.3 0,-0.1 0,-0.2 0,-0.3 -0.2,-2.3 -1.1,-18.3 -18.5,-24.7 z"
id="path147" />
</g>
<g
id="g149">
<linearGradient
id="linearGradient3645"
gradientUnits="userSpaceOnUse"
x1="425.60641"
y1="203.1666"
x2="393.7475"
y2="239.4308">
<stop
offset="0"
style="stop-color:#7CC099"
id="stop3647" />
<stop
offset="0.3183"
style="stop-color:#77BF9C"
id="stop3649" />
<stop
offset="0.6757"
style="stop-color:#6ABDA3"
id="stop3651" />
<stop
offset="1"
style="stop-color:#57BAAE"
id="stop3653" />
</linearGradient>
<path
style="fill:url(#SVGID_11_)"
inkscape:connector-curvature="0"
d="m 433.7,212.6 c -5.9,-10.1 -19,-17.9 -27.5,-21 -8.5,-3.2 -18,-10.1 -18,-10.1 -2.1,-1.4 -3.8,-2.7 -5.2,-4 -0.4,3.6 -0.6,7.5 -0.4,11.6 4.2,3.2 9.7,6.5 16.9,9.5 1.7,0.7 6.9,2.8 7,2.9 l 6.5,2.6 -6.7,-1.9 c -0.2,-0.1 -5.5,-1.6 -7.3,-2.2 -6.8,-2.5 -12.1,-5.3 -16.2,-8.2 0.4,5 1.3,10.1 2.9,15.2 3.4,1.8 7.2,3.4 11.6,4.9 0.9,0.3 3.6,1.3 3.6,1.3 l 3.4,1.2 -3.5,-0.5 c -0.1,0 -3,-0.4 -4,-0.6 -3.7,-0.9 -7,-2 -10,-3.3 1.9,4.8 4.4,8.8 7.4,12.3 0.1,0 0.1,0 0.1,0 l 3.8,1 -3.2,-0.2 c 6.9,7.7 16.3,13.3 26.3,21.3 13.5,10.8 9.2,27.2 9.2,27.2 0,0 0.8,-0.6 1.5,-1.5 1.8,-2.1 5.1,-7 8.1,-16.9 5,-16.1 -0.4,-30.5 -6.3,-40.6 z"
id="path160" />
</g>
</g>
<path
class="cls-12"
d="m 401.22,307.11 c 1,-0.25 2.33,-0.52 4,-0.8 a 33.84,33.84 0 0 1 5.74,-0.43 12.37,12.37 0 0 1 4.84,0.83 7.52,7.52 0 0 1 3.08,2.3 8.85,8.85 0 0 1 1.62,3.55 20.81,20.81 0 0 1 0.47,4.56 v 13.72 h -4.37 v -12.78 a 20.35,20.35 0 0 0 -0.31,-3.86 6.48,6.48 0 0 0 -1,-2.58 4,4 0 0 0 -1.88,-1.44 8.41,8.41 0 0 0 -2.91,-0.44 c -0.47,0 -1,0 -1.46,0 l -1.43,0.12 c -0.46,0.05 -0.86,0.1 -1.22,0.17 l -0.78,0.14 v 20.63 h -4.37 z"
id="path95" />
<path
class="cls-12"
d="m 432.1,335.4 a 9,9 0 0 0 1.34,0.45 6.55,6.55 0 0 0 1.62,0.21 6.39,6.39 0 0 0 4,-1.15 11.7,11.7 0 0 0 2.78,-4.07 126.9,126.9 0 0 1 -5.67,-11.63 A 106.17,106.17 0 0 1 432,306.4 h 4.7 c 0.35,1.41 0.76,2.93 1.25,4.56 0.49,1.63 1,3.31 1.62,5 0.62,1.69 1.24,3.45 1.92,5.17 0.68,1.72 1.41,3.38 2.17,5 q 1.78,-4.93 3.1,-9.78 1.32,-4.85 2.49,-10 h 4.51 q -1.7,6.92 -3.76,13.28 c -1.38,4.24 -2.86,8.22 -4.46,11.91 a 26,26 0 0 1 -1.95,3.65 11.23,11.23 0 0 1 -2.24,2.51 8.18,8.18 0 0 1 -2.75,1.46 11.8,11.8 0 0 1 -3.45,0.47 10.11,10.11 0 0 1 -1.08,-0.07 c -0.38,-0.05 -0.75,-0.11 -1.11,-0.19 -0.36,-0.08 -0.69,-0.17 -1,-0.26 a 3.68,3.68 0 0 1 -0.64,-0.24 z"
id="path97" />
<path
class="cls-12"
d="m 463.92,307.11 c 1,-0.25 2.33,-0.52 4,-0.8 a 33.3,33.3 0 0 1 5.71,-0.43 10.78,10.78 0 0 1 3.95,0.64 6.9,6.9 0 0 1 2.68,1.85 c 0.22,-0.15 0.56,-0.37 1,-0.65 a 11.39,11.39 0 0 1 1.74,-0.83 18.69,18.69 0 0 1 2.31,-0.7 11.73,11.73 0 0 1 2.72,-0.31 11.05,11.05 0 0 1 4.61,0.83 6.61,6.61 0 0 1 2.8,2.32 9.27,9.27 0 0 1 1.36,3.57 27.56,27.56 0 0 1 0.35,4.52 v 13.72 h -4.37 v -12.78 a 28.36,28.36 0 0 0 -0.21,-3.72 7.19,7.19 0 0 0 -0.8,-2.58 3.63,3.63 0 0 0 -1.6,-1.53 6,6 0 0 0 -2.6,-0.45 8.42,8.42 0 0 0 -3.53,0.89 12,12 0 0 0 -2,1.09 11.57,11.57 0 0 1 0.45,2.3 23.06,23.06 0 0 1 0.19,3.06 v 13.72 h -4.37 v -12.78 a 26.42,26.42 0 0 0 -0.23,-3.72 7.6,7.6 0 0 0 -0.83,-2.58 3.66,3.66 0 0 0 -1.59,-1.53 5.86,5.86 0 0 0 -2.57,-0.49 c -0.44,0 -0.91,0 -1.41,0 l -1.43,0.12 c -0.45,0.05 -0.87,0.1 -1.25,0.17 l -0.75,0.14 v 20.63 h -4.37 z"
id="path99" />
<path
class="cls-12"
d="m 549.37,305.79 a 12.82,12.82 0 0 1 4.45,0.68 6.95,6.95 0 0 1 4.48,4.89 14,14 0 0 1 0.47,3.78 v 15.18 c -0.38,0.09 -1,0.25 -1.64,0.35 -0.64,0.1 -1.36,0.22 -2.21,0.31 -0.85,0.09 -1.76,0.18 -2.75,0.26 -0.99,0.08 -2,0.12 -2.94,0.12 a 15.56,15.56 0 0 1 -3.8,-0.43 8.44,8.44 0 0 1 -3,-1.33 6.15,6.15 0 0 1 -2,-2.43 8.42,8.42 0 0 1 -0.7,-3.61 6.94,6.94 0 0 1 0.82,-3.48 6.53,6.53 0 0 1 2.23,-2.35 10.22,10.22 0 0 1 3.29,-1.32 18.12,18.12 0 0 1 3.93,-0.41 12.78,12.78 0 0 1 1.36,0.07 c 0.47,0.05 0.92,0.11 1.34,0.19 l 1.11,0.21 0.66,0.14 v -1.22 a 9.62,9.62 0 0 0 -0.24,-2.14 5,5 0 0 0 -0.84,-1.88 4.35,4.35 0 0 0 -1.67,-1.32 6.54,6.54 0 0 0 -2.75,-0.49 19.17,19.17 0 0 0 -3.73,0.36 11,11 0 0 0 -2.42,0.81 l -0.71,-3.61 a 12.49,12.49 0 0 1 3,-1 24.77,24.77 0 0 1 4.26,-0.33 z m 0.38,21.9 c 1,0 2,0 2.75,-0.07 a 11.93,11.93 0 0 0 2,-0.26 v -7.28 a 5.63,5.63 0 0 0 -1.53,-0.4 16.92,16.92 0 0 0 -2.56,-0.17 15.46,15.46 0 0 0 -2.09,0.15 6.49,6.49 0 0 0 -2,0.58 4.29,4.29 0 0 0 -1.53,1.22 3.21,3.21 0 0 0 -0.61,2.05 3.53,3.53 0 0 0 1.5,3.27 7.85,7.85 0 0 0 4.07,0.91 z"
id="path101" />
<path
class="cls-12"
d="m 508.54,318.67 a 15.81,15.81 0 0 1 0.94,-5.67 11.75,11.75 0 0 1 2.5,-4 10,10 0 0 1 3.57,-2.4 11.15,11.15 0 0 1 4.13,-0.8 q 4.94,0 7.57,3.08 c 1.75,2.05 2.63,5.18 2.63,9.37 V 319 a 7.21,7.21 0 0 1 0,0.83 H 513.1 a 9,9 0 0 0 2.21,5.78 c 1.29,1.31 3.29,2 6,2 a 15.9,15.9 0 0 0 3.88,-0.4 15,15 0 0 0 2.65,-1 l 0.61,3.67 a 14,14 0 0 1 -3.08,1.12 19.58,19.58 0 0 1 -4.53,0.43 14.45,14.45 0 0 1 -5.52,-0.92 10.26,10.26 0 0 1 -3.83,-2.65 10.84,10.84 0 0 1 -2.24,-4 17.17,17.17 0 0 1 -0.71,-5.19 z m 16.78,-2.4 a 7.33,7.33 0 0 0 -1.48,-4.86 5.1,5.1 0 0 0 -4.2,-1.91 5.79,5.79 0 0 0 -2.66,0.59 6.14,6.14 0 0 0 -2,1.53 7.11,7.11 0 0 0 -1.25,2.16 10.73,10.73 0 0 0 -0.58,2.49 z"
id="path103" />
</svg>

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
export QT_IM_MODULE=qtvirtualkeyboard export QT_IM_MODULE=qtvirtualkeyboard
while [ true ]; do while [ true ]; do
/usr/bin/nymea-app --kiosk --connect nymeas://127.0.0.1:2222 /usr/bin/nymea-app --kiosk --splash --connect nymeas://127.0.0.1:2222
done done

View File

@ -6,15 +6,16 @@ After=systemd-user-sessions.service
Conflicts=plymouth-quit.service Conflicts=plymouth-quit.service
After=plymouth-quit.service After=plymouth-quit.service
# lightdm takes responsibility for stopping plymouth, so if it fails # nymea-app takes responsibility for stopping plymouth, so if it fails
# for any reason, make sure plymouth still stops # for any reason, make sure plymouth still stops
OnFailure=plymouth-quit.service OnFailure=plymouth-quit.service
[Service] [Service]
# temporary safety check until all DMs are converted to correct Environment=QT_QPA_EGLFS_ALWAYS_SET_MODE=1 QT_QPA_PLATFORM=eglfs QT_IM_MODULE=qtvirtualkeyboard
# display-manager.service symlink handling ExecStart=/usr/bin/nymea-app --kiosk --splash --connect nymeas://127.0.0.1:2222
Environment=QT_QPA_EGLFS_ALWAYS_SET_MODE=1 QT_QPA_PLATFORM=eglfs
ExecStart=/usr/bin/nymea-app-kiosk-wrapper
Restart=always Restart=always
User=nymea User=nymea
Group=nymea Group=nymea
[Install]
WantedBy=multi-user.target

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View File

@ -0,0 +1,13 @@
[Unit]
Description=nymea sSplash screen
DefaultDependencies=no
After=local-fs.target
[Service]
ExecStart=/usr/bin/fbi --noverbose -d /dev/fb0 -a /usr/share/nymea-splashscreen/nymea-splash-horizontal.jpg -fitwidth
StandardInput=tty
StandardOutput=tty
#TTYPath=/dev/tty1
[Install]
WantedBy=sysinit.target

View File

@ -65,6 +65,19 @@ Section: shells
Multi-Arch: same Multi-Arch: same
Depends: nymea-app, Depends: nymea-app,
qtvirtualkeyboard-plugin, qtvirtualkeyboard-plugin,
Conflicts: nymea-app-kiosk-x11 Conflicts: nymea-app-kiosk-x11,
lightdm
Replaces: nymea-app-kiosk
Provides: nymea-app-kiosk
Description: Run nymea:app in kiosk mode Description: Run nymea:app in kiosk mode
This package will install nymea:app in kiosk mode on your machine (using wayland). This package will install nymea:app in kiosk mode on your machine (using wayland).
Package: nymea-splashscreen
Architecture: any
Section: shells
Multi-Arch: same
Depends: plymouth,
Description: A nymea branded fbi splash theme
This package will install a nymea branded boot splash using fbi.

View File

@ -1 +1,2 @@
packaging/linux-common/nymea-app-kiosk.service /lib/systemd/system/ packaging/linux-common/nymea-app-kiosk.service /lib/systemd/system/
packaging/linux-common/udev/90-pi-backlight.rules /lib/udev/rules.d/

View File

@ -0,0 +1,2 @@
packaging/linux-common/nymea-splashscreen.service /lib/systemd/system/
packaging/linux-common/nymea-splash-horizontal.jpg /usr/share/nymea-splashscreen/

View File

@ -7,4 +7,4 @@ override_dh_missing:
dh_missing --fail-missing dh_missing --fail-missing
%: %:
dh $@ --buildsystem=qmake --parallel dh $@ --buildsystem=qmake --parallel --with systemd