Merge lp:~aacid/unity-2d/unity-2d-shell_limit_shell_width into lp:~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Albert Astals Cid
Status: Merged
Approved by: Florian Boucault
Approved revision: 1005
Merged at revision: 1006
Proposed branch: lp:~aacid/unity-2d/unity-2d-shell_limit_shell_width
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 14 lines (+4/-1)
1 file modified
shell/Shell.qml (+4/-1)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d-shell_limit_shell_width
Reviewer Review Type Date Requested Status
Florian Boucault Pending
Review via email:

Description of the change

Do not try to be wider than the total screen geometry

Happens sometimes on startup when the enabled and availableGeometry are still in flux and it might end up meaning a badly sized shell view

To post a comment you must log in.
1005. By Albert Astals Cid

Add comment as to why the min is needed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'shell/Shell.qml'
--- shell/Shell.qml 2012-02-10 16:39:03 +0000
+++ shell/Shell.qml 2012-02-10 17:01:29 +0000
@@ -27,7 +27,10 @@
27 we want the shell to take all the available space, including the one we27 we want the shell to take all the available space, including the one we
28 reserved ourselves via strutManager. */28 reserved ourselves via strutManager. */
29 height: declarativeView.screen.availableGeometry.height29 height: declarativeView.screen.availableGeometry.height
30 width: declarativeView.screen.availableGeometry.width + (strutManager.enabled ? strutManager.width : 0)30 // We need the min because X is async thus it can happen that even if strutManager.enabled is true
31 // declarativeView.screen.availableGeometry.width still has not been updated and thus the sum might be bigger than declarativeView.screen.geometry.width.
32 // The real nice and proper solution would be strutManager having a hasTheChangeBeenApplied property
33 width: Math.min(declarativeView.screen.geometry.width, declarativeView.screen.availableGeometry.width + (strutManager.enabled ? strutManager.width : 0))
32 "shell"35 "shell"


People subscribed via source and target branches