on xenial help sign in
Added ability to change indicator profile in shell (env UNITY_INDICATOR_PROFILE)
commitab8853187ba5689b6eaefa7730ea24bd96b3129c authorNick Dedekind <nicholas.dedekind@gmail.com> dateFri 28 Feb 2014, 10:47 (13 years ago) parent92f1da8bcfe0ce
2 files changed+7−1
qml/Panel/Indicators.qml+1−1 src/main.cpp+6
qml/Panel/Indicators.qml+1−1
@@ -32,7 +32,7 @@ Showable {
3232 property alias overFlowWidth: indicatorRow.overFlowWidth
3333 property alias showAll: indicatorRow.showAll
3434 // TODO: This should be sourced by device type (eg "desktop", "tablet", "phone"...)
35− property string profile: "phone"
35+ property string profile: indicatorProfile
3636
3737 readonly property real hintValue: panelHeight + menuContent.headerHeight
3838 readonly property int lockThreshold: openedHeight / 2
src/main.cpp+6
@@ -59,6 +59,11 @@ int startShell(int argc, const char** argv, void* server)
5959 application = new QGuiApplication(argc, (char**)argv);
6060 }
6161
62+ QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
63+ if (indicatorProfile.isEmpty()) {
64+ indicatorProfile = "phone";
65+ }
66+
6267 resolveIconTheme();
6368
6469 QStringList args = application->arguments();
@@ -88,6 +93,7 @@ int startShell(int argc, const char** argv, void* server)
8893 view->setTitle("Qml Phone Shell");
8994 view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
9095 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
96+ view->rootContext()->setContextProperty("indicatorProfile", indicatorProfile);
9197 if (args.contains(QLatin1String("-frameless"))) {
9298 view->setFlags(Qt::FramelessWindowHint);
9399 }