Merge lp:~fboucault/unity-2d/fix_dash_width_always_visible_launcher into lp:~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Florian Boucault
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 976
Merge reported by: Albert Astals Cid
Merged at revision: not available
Proposed branch: lp:~fboucault/unity-2d/fix_dash_width_always_visible_launcher
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 25 lines (+6/-3)
1 file modified
shell/Shell.qml (+6/-3)
To merge this branch: bzr merge lp:~fboucault/unity-2d/fix_dash_width_always_visible_launcher
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Review via email: mp+91968@code.launchpad.net

Description of the change

[dash] Compute appropriate width when launcher's hide mode is set to never hide, ie 0

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

ShellDeclarativeView::updateShellPosition already has some code that does this, it'd be cool if we could have it only in our place, tried using declarativeView.height and declarativeView.width ?

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

> ShellDeclarativeView::updateShellPosition already has some code that does
> this, it'd be cool if we could have it only in our place, tried using
> declarativeView.height and declarativeView.width ?

updateShellPosition only sets the position of the shell window, not the size. Also updateShellPosition is fishy code that I would love to verify and move to QML.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Right, i see, what a about the other availableGeometry used in that very same file?

Revision history for this message
Albert Astals Cid (aacid) wrote :

Florian wants to fix things step by step, fair enough

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/Shell.qml'
2--- shell/Shell.qml 2012-02-07 11:57:10 +0000
3+++ shell/Shell.qml 2012-02-08 02:37:21 +0000
4@@ -23,8 +23,11 @@
5
6 Item {
7 id: shell
8- height: declarativeView.screen.availableGeometry.height
9- width: declarativeView.screen.availableGeometry.width
10+ /* Space reserved by strutManager is taken off screen.availableGeometry but
11+ we want the shell to take all the available space, including the one we
12+ reserved ourselves via strutManager. */
13+ height: declarativeView.screen.availableGeometry.height + (strutManager.enabled ? strutManager.height : 0)
14+ width: declarativeView.screen.availableGeometry.width + (strutManager.enabled ? strutManager.width : 0)
15
16 Accessible.name: "shell"
17
18@@ -92,7 +95,7 @@
19 Binding {
20 target: dashLoader.item
21 property: "fullscreenWidth"
22- value: declarativeView.screen.availableGeometry.width - launcherLoader.width
23+ value: shell.width - launcherLoader.width
24 }
25 }
26

Subscribers

People subscribed via source and target branches