Merge lp:~saviq/unity-2d/i18n-dynamic-button-width into lp:unity-2d

Proposed by Michał Sawicz
Status: Merged
Approved by: Gerry Boland
Approved revision: 742
Merged at revision: 746
Proposed branch: lp:~saviq/unity-2d/i18n-dynamic-button-width
Merge into: lp:unity-2d
Diff against target: 16 lines (+3/-3)
1 file modified
places/FilterLoader.qml (+3/-3)
To merge this branch: bzr merge lp:~saviq/unity-2d/i18n-dynamic-button-width
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+77501@code.launchpad.net

Commit message

[places] dynamically calculate width for the "All" button

To post a comment you must log in.
742. By Michał Sawicz

[places] add a FIXME

Revision history for this message
Gerry Boland (gerboland) wrote :

Necessary right now, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'places/FilterLoader.qml'
2--- places/FilterLoader.qml 2011-08-25 13:10:22 +0000
3+++ places/FilterLoader.qml 2011-09-29 13:27:23 +0000
4@@ -79,9 +79,9 @@
5
6 focus: true
7
8- /* FIXME: should be 48px wide in English but made bigger to
9- accomodate for more verbose languages */
10- width: 55
11+ // FIXME: that will probably break with non-latin LANG
12+ // dynamically calculate button width, but limit to 100
13+ width: Math.min(100, (10 * u2d.tr("All").length) + 18)
14 height: 30
15 anchors.top: parent.top
16 anchors.topMargin: isFirst ? 0 : 13

Subscribers

People subscribed via source and target branches