@@ -204,10 +204,22 @@ FocusScope {
204204 }
205205
206206 states: [
207+ // A base state containing bindings common to others
208+ // Ensures appWindowWithShadow fills the root area.
209+ State {
210+ name: "fillRootArea"
211+ PropertyChanges {
212+ target: appWindowWithShadow
213+ restoreEntryValues: false
214+ width: appWindowWithShadow.rotation == 0 || appWindowWithShadow.rotation == 180 ? root.width : root.height
215+ height: appWindowWithShadow.rotation == 0 || appWindowWithShadow.rotation == 180 ? root.height : root.width
216+ }
217+ },
207218 // In this state we stick to our currently set orientationAngle, which may change only due
208219 // to calls made to matchShellOrientation() or animateToShellOrientation()
209220 State {
210221 name: "keepSceneRotation"
222+ extend: "fillRootArea"
211223 PropertyChanges {
212224 target: appWindowWithShadow
213225 restoreEntryValues: false
@@ -219,6 +231,7 @@ FocusScope {
219231 // But the splash screen should still obey the set orientationAngle set by shell
220232 State {
221233 name: "counterRotate"
234+ extend: "fillRootArea"
222235 PropertyChanges {
223236 target: appWindowWithShadow
224237 rotation: normalizeAngle(-root.shellOrientationAngle)
@@ -229,14 +242,15 @@ FocusScope {
229242 splashRotation: appWindowWithShadow.orientationAngle
230243 }
231244 },
245+ // Dummy state.
246+ // The animation may indiscriminately break any bindings assigned to appWindowWithShadow rotation,
247+ // width or height.
232248 State {
233249 name: "animatingRotation"
234250 }
235251 ]
236252
237253 anchors.centerIn: parent
238− width: rotation == 0 || rotation == 180 ? root.width : root.height
239− height: rotation == 0 || rotation == 180 ? root.height : root.width
240254
241255 BorderImage {
242256 anchors {