on xenial help sign in
Merge pull request #319 from ubports/xenial_-_centerednoappshint

Shell & Stage: Use margin to place the 'No running apps' hint beside the launcher

commite2c28d65c4cdcac76ef487192fadb1947b7134be authorMarius Gripsgard <marius@ubports.com> dateTue 28 Jul 2020, 16:56 (6 years ago) parent98881cb8bc07af
2 files changed+5−1
qml/Shell.qml+1 qml/Stage/Stage.qml+4−1
qml/Shell.qml+1
@@ -311,6 +311,7 @@ StyledItem {
311311 inputMethodRect: inputMethod.visibleRect
312312 rightEdgePushProgress: rightEdgeBarrier.progress
313313 availableDesktopArea: availableDesktopAreaItem
314+ launcherLeftMargin: launcher.visibleWidth
314315
315316 property string usageScenario: shell.usageScenario === "phone" || greeter.hasLockedApp
316317 ? "phone"
qml/Stage/Stage.qml+4−1
@@ -94,6 +94,8 @@ FocusScope {
9494 Qt.InvertedLandscapeOrientation;
9595 }
9696
97+ property int launcherLeftMargin : 0
98+
9799 Binding {
98100 target: topLevelSurfaceList
99101 property: "rootFocus"
@@ -660,9 +662,10 @@ FocusScope {
660662 visible: false
661663 anchors.horizontalCenter: parent.horizontalCenter
662664 anchors.verticalCenter: parent.verticalCenter
665+ anchors.fill: parent
663666 horizontalAlignment: Qt.AlignHCenter
664667 verticalAlignment: Qt.AlignVCenter
665− width: parent.width
668+ anchors.leftMargin: root.launcherLeftMargin
666669 wrapMode: Label.WordWrap
667670 fontSize: "large"
668671 text: i18n.tr("No running apps")