Commit 1bcad156 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Add webapp-container mode

if --webapp-container is enabled, no ui but the loading animation will be displayed.
parent ba370565
......@@ -147,8 +147,14 @@ Kirigami.ApplicationWindow {
Navigation {
id: navigation
visible: !webappcontainer
height: Kirigami.Units.gridUnit * 3
height: {
if (!webappcontainer)
return Kirigami.Units.gridUnit * 3
else
return 0
}
anchors {
top: parent.top
......
......@@ -22,6 +22,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
QCommandLineParser parser;
QCommandLineOption helpOption = parser.addHelpOption();
parser.addPositionalArgument("url", "An url to open", "[url]");
parser.addOption({"webapp-container", "Start without ui"});
parser.parse(QGuiApplication::arguments());
// QML loading
......@@ -34,6 +35,8 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
initialUrl = QUrl::fromUserInput(parser.positionalArguments()[0].toUtf8()).toEncoded();
engine.rootContext()->setContextProperty("initialUrl", initialUrl);
engine.rootContext()->setContextProperty("webappcontainer", parser.isSet("webapp-container"));
// Browser managger
AngelFish::BrowserManager *browserManager = new AngelFish::BrowserManager(engine.rootContext());
engine.rootContext()->setContextProperty("browserManager", browserManager);
......
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