on xenial help sign in
fix tablet stage app visiblitiy
commit97d369930cb1cda36001d8d5921c426cfbec8fca authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 14 Sep 2016, 16:33 (10 years ago) parent5ec16b7
3 files changed+6−6
qml/Stage/Stage.qml+1 tests/qmltests/CMakeLists.txt+1−1 tests/qmltests/Stage/tst_PhoneStage.qml+4−5
qml/Stage/Stage.qml+1
@@ -1097,6 +1097,7 @@ AbstractStage {
10971097 requestedWidth: stageMaths.itemWidth
10981098 requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
10991099 visuallyMaximized: true
1100+ visible: appDelegate.x < root.width
11001101 }
11011102 PropertyChanges {
11021103 target: decoratedWindow
tests/qmltests/CMakeLists.txt+1−1
@@ -88,7 +88,7 @@ add_unity8_qmltest(Panel/Indicators MenuItemFactory)
8888add_unity8_qmltest(Panel/Indicators MessageMenuItemFactory)
8989add_unity8_qmltest(Stage ApplicationWindow)
9090add_unity8_qmltest(Stage DesktopStage)
91−add_unity8_qmltest(Stages PhoneStage)
91+add_unity8_qmltest(Stage PhoneStage)
9292add_unity8_qmltest(Stages SpreadDelegate)
9393add_unity8_qmltest(Stages SurfaceContainer)
9494add_unity8_qmltest(Stages TabletStage)
tests/qmltests/Stage/tst_PhoneStage.qml+4−5
@@ -19,7 +19,7 @@ import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
2121import "../../../qml/Components"
22−import "../../../qml/Stages"
22+import "../../../qml/Stage"
2323import Ubuntu.Components 1.3
2424import Unity.Application 0.1
2525import WindowManager 0.1
@@ -31,7 +31,7 @@ Item {
3131
3232 property var greeter: { fullyShown: true }
3333
34− PhoneStage {
34+ Stage {
3535 id: phoneStage
3636 anchors { fill: parent; rightMargin: units.gu(30) }
3737 focus: true
@@ -41,6 +41,7 @@ Item {
4141 shellOrientation: Qt.PortraitOrientation
4242 orientations: Orientations {}
4343 applicationManager: ApplicationManager
44+ mode: "staged"
4445 topLevelSurfaceList: TopLevelSurfaceList {
4546 id: topLevelSurfaceList
4647 applicationsModel: ApplicationManager
@@ -85,7 +86,7 @@ Item {
8586 when: windowShown
8687
8788 function findAppWindowForSurfaceId(surfaceId) {
88− var delegateObjectName = "spreadDelegate_" + surfaceId;
89+ var delegateObjectName = "appDelegate_" + surfaceId;
8990 var spreadDelegate = findChild(phoneStage, delegateObjectName);
9091 if (!spreadDelegate) {
9192 console.warn("Failed to find " + delegateObjectName + " in phoneStage ("+phoneStage+")");
@@ -111,8 +112,6 @@ Item {
111112 var appSurfaceId = topLevelSurfaceList.nextId;
112113 var app = ApplicationManager.startApplication(ApplicationManager.availableApplications[ApplicationManager.count])
113114 tryCompare(app, "state", ApplicationInfoInterface.Running)
114− var spreadView = findChild(phoneStage, "spreadView");
115− tryCompare(spreadView, "contentX", -spreadView.shift);
116115 waitUntilAppSurfaceShowsUp(appSurfaceId);
117116 waitForRendering(phoneStage)
118117 }