@@ -24,6 +24,7 @@ FocusScope {
24 property string context: ""
24 property string context: ""
25 property list<Action> actions
25 property list<Action> actions
26 property Item rootItem: QuickUtils.rootItem(root)
26 property Item rootItem: QuickUtils.rootItem(root)
27+ property var maximumEmbeddedHeight
28 property alias header: headerContent.item
29 property alias header: headerContent.item
29 property alias content: contentLoader.item
30 property alias content: contentLoader.item
@@ -32,39 +33,47 @@ FocusScope {
33 signal close();
34 signal close();
36− if (fullscreen && parent) {
37− return parent.height;
39− return content ? content.implicitHeight : parent.height
42 onFullscreenChanged: {
36 onFullscreenChanged: {
43 if (!fullscreen) rotationAction.checked = false;
37 if (!fullscreen) rotationAction.checked = false;
46 OrientationHelper {
40 OrientationHelper {
47 id: orientationHelper
41 id: orientationHelper
48− automaticOrientation: fullscreen && !rotationAction.checked
42+ automaticOrientation: fullscreen
50− states: [
47+ states: [
52− name: "portrait"
49+ name: "portrait"
53− when: !orientationHelper.automaticOrientation && !rotationAction.checked
50+ when: !rotationAction.checked
54− PropertyChanges {
51+ },
55− target: orientationHelper
52+ State {
56− orientationAngle: 0
53+ name: "landscape"
54+ when: rotationAction.checked
60− name: "landscape"
60+ to: "landscape"
61+ SequentialAnimation {
61− when: !orientationHelper.automaticOrientation && rotationAction.checked
62+ PropertyAction { target: orientationHelper; property: "automaticOrientation"; value: false }
63− target: orientationHelper
63+ PropertyAction { target: orientationHelper; property: "orientationAngle"; value: 90 }
64− orientationAngle: orientationHelper.orientationAngle == 270 ? 270 : 90
64+ PropertyAction { target: orientationHelper; property: "automaticOrientation"; value: false }
69+ SequentialAnimation {
70+ PropertyAction { target: orientationHelper; property: "automaticOrientation"; value: false }
71+ PropertyAction { target: orientationHelper; property: "orientationAngle"; value: 0 }
72+ PropertyAction { target: orientationHelper; property: "automaticOrientation"; value: fullscreen }
70 id: contentLoader
79 id: contentLoader
@@ -91,9 +100,9 @@ FocusScope {
92 width: orientationHelper.width
101 width: orientationHelper.width
93 height: orientationHelper.height
102 height: orientationHelper.height
94−
103+ maximumEmbeddedHeight: root.maximumEmbeddedHeight
95 fixedHeight: fullscreen
104 fixedHeight: fullscreen
96− orientation: orientationHelper.state == "portrait" ? Qt.PortraitOrientation : Qt.LandscapeOrientation
105+ orientation: orientationState.state == "landscape" ? Qt.LandscapeOrientation : Qt.PortraitOrientation
98 screenshot: {
107 screenshot: {
99 var screenshot = root.sourceData["screenshot"];
108 var screenshot = root.sourceData["screenshot"];
@@ -323,21 +332,22 @@ FocusScope {
324 name: "minimized"
333 name: "minimized"
325 when: !priv.fullscreen
334 when: !priv.fullscreen
335+ PropertyChanges { target: root; implicitHeight: content ? content.implicitHeight : 0; }
328 name: "fullscreen"
338 name: "fullscreen"
329 when: priv.fullscreen
339 when: priv.fullscreen
330− ParentChange { target: root; parent: rootItem; x: 0; y: 0; width: parent.width; height: parent.height }
340+ ParentChange { target: root; parent: rootItem; x: 0; y: 0; width: parent.width; }
341+ PropertyChanges { target: root; implicitHeight: root.parent ? root.parent.height : 0; }
331 PropertyChanges { target: fullscreenAction; iconName: "view-restore" }
342 PropertyChanges { target: fullscreenAction; iconName: "view-restore" }
335 transitions: Transition {
346 transitions: Transition {
336 ParentAnimation {
347 ParentAnimation {
337− UbuntuNumberAnimation { properties: "x,y,width,height"; duration: UbuntuAnimation.FastDuration }
348+ UbuntuNumberAnimation { properties: "x,y,width,implicitHeight"; duration: UbuntuAnimation.FastDuration }
343 QtObject {
353 QtObject {