Merge lp://qastaging/~azzar1/unity/fix-977817 into lp://qastaging/unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 2327
Proposed branch: lp://qastaging/~azzar1/unity/fix-977817
Merge into: lp://qastaging/unity
Diff against target: 11 lines (+1/-1)
1 file modified
plugins/unityshell/src/ResultViewGrid.cpp (+1/-1)
To merge this branch: bzr merge lp://qastaging/~azzar1/unity/fix-977817
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Marco Trevisan (Treviño) Approve
Andrea Cimitan (community) design Approve
Review via email: mp+102869@code.qastaging.launchpad.net

Commit message

Use 2 columns in the card view in desktop mode when filters are opened.

Description of the change

== Problem ==
[card view] Only one column of cards being displayed in desktop mode when filters are opened.

== Fix ==
Fix ResultViewGrid::GetItemsPerRow(). The correct math equation is:
    width * x + spacing + (x-1) + R(x) = geo_width
and not
    width * x + spacing * x + R(x) = geo_width
So we can find x:
   x = (geo_width + spacing) / (width + spacing)

To post a comment you must log in.
Revision history for this message
Andrea Cimitan (cimi) wrote :

Works here

review: Approve (design)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Good.

review: Approve
Revision history for this message
Mirco Müller (macslow) wrote :

While this does fix the issue with the missing column when the filters are expanded, it does not stick to the padding-requirement from Design for the horizontal space between different tiles/cards. But that's a larger and more general shortcoming of the mixture between fixed pixel-sizes and dynamically adapting UIs. Certainly something we can't fix within the scope of an SRU.

So approved for now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.