From 92aa42107d2a981a81b1e1850cd495575e133cd9 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 15 Sep 2016 19:44:37 +0200 Subject: [PATCH 1/2] adjust items size and spacing adjust the layout of items in the splash in order to match plymouth look, according feedback from the VDG --- lookandfeel/contents/splash/Splash.qml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lookandfeel/contents/splash/Splash.qml b/lookandfeel/contents/splash/Splash.qml index efdbac448..f03d0ae32 100644 --- a/lookandfeel/contents/splash/Splash.qml +++ b/lookandfeel/contents/splash/Splash.qml @@ -49,13 +49,11 @@ Rectangle { } Image { + id: logo //match SDDM/lockscreen avatar positioning - property real offset: units.height + units.largeSpacing - property real size: units.gridUnit * 8 - offset + property real size: units.gridUnit * 8 - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottomMargin: offset - anchors.bottom: parent.verticalCenter + anchors.centerIn: parent source: "images/kde.svgz" @@ -66,12 +64,12 @@ Rectangle { Image { id: busyIndicator //again sync from SDDM theme - anchors.top: parent.verticalCenter - anchors.topMargin: units.gridUnit * 10 + units.smallSpacing + anchors.top: logo.bottom + anchors.topMargin: units.largeSpacing anchors.horizontalCenter: parent.horizontalCenter source: "images/busywidget.svgz" - sourceSize.height: units.gridUnit * 3 - sourceSize.width: units.gridUnit * 3 + sourceSize.height: units.gridUnit * 2 + sourceSize.width: units.gridUnit * 2 RotationAnimator on rotation { id: rotationAnimator from: 0 From b2d91a39740b003f4440e1e7df0a26a43fbb51a4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 21 Sep 2016 19:15:02 +0200 Subject: [PATCH 2/2] ensure newly created panels have a screen when a panel is created it doesn't have a view immediately, so we have to work around by writing its config instead. we have to force lastScreen of the newly created containment, or it won't have a screen yet at that point, breaking JS code that relies on it NOTE: if we'll allow setting a panel screen from JS, it will have to use the following lines as well --- shell/scripting/scriptengine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp index 4ac193a82..6a7e979d4 100644 --- a/shell/scripting/scriptengine.cpp +++ b/shell/scripting/scriptengine.cpp @@ -376,6 +376,13 @@ Containment *ScriptEngine::createContainment(const QString &type, const QString // some defaults c->setFormFactor(Plasma::Types::Horizontal); c->setLocation(Plasma::Types::TopEdge); + //we have to force lastScreen of the newly created containment, + //or it won't have a screen yet at that point, breaking JS code + //that relies on it + //NOTE: if we'll allow setting a panel screen from JS, it will have to use the following lines as well + KConfigGroup cg=c->config(); + cg.writeEntry(QStringLiteral("lastScreen"), 0); + c->restore(cg); } c->updateConstraints(Plasma::Types::AllConstraints | Plasma::Types::StartupCompletedConstraint); c->flushPendingConstraintsEvents();