Merge lp://staging/~azzar1/unity/fix-bug-955158 into lp://staging/unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 2493
Proposed branch: lp://staging/~azzar1/unity/fix-bug-955158
Merge into: lp://staging/unity
Diff against target: 103 lines (+25/-18)
2 files modified
launcher/QuicklistView.cpp (+25/-16)
launcher/QuicklistView.h (+0/-2)
To merge this branch: bzr merge lp://staging/~azzar1/unity/fix-bug-955158
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Daniel van Vugt Pending
Tim Penhey Pending
jenkins continuous-integration Pending
Review via email: mp+114334@code.staging.launchpad.net

This proposal supersedes a proposal from 2012-06-26.

Commit message

Fix padding issues in quicklist view.

Description of the change

== Problem ==
padding between last quicklist item and bottom edge is non-deterministic (changes randomly)

== Test ==
Not applicable: visual change.

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2445
http://s-jenkins:8080/job/unity-ci/25/

review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

There are a lot of identical expressions:

38 + _top_space->SetMinimumHeight((_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius + _offset_correction);
39 + _top_space->SetMaximumHeight((_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius + _offset_correction);
40 +
41 + _bottom_space->SetMinimumHeight((_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius);
42 + _bottom_space->SetMaximumHeight((_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius);

Please only compute each different expression once. Like...

int b = (_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius;
int t = b + _offset_correction;
_top_space->SetMinimumHeight(t);
_top_space->SetMaximumHeight(t);
_bottom_space->SetMinimumHeight(b);
_bottom_space->SetMaximumHeight(b);

review: Needs Fixing
Revision history for this message
Andrea Azzarone (azzar1) wrote : Posted in a previous version of this proposal

> There are a lot of identical expressions:
>
> 38 + _top_space->SetMinimumHeight((_anchor_height - TotalItemHeight) /
> 2 + _padding + _corner_radius + _offset_correction);
> 39 + _top_space->SetMaximumHeight((_anchor_height - TotalItemHeight) /
> 2 + _padding + _corner_radius + _offset_correction);
> 40 +
> 41 + _bottom_space->SetMinimumHeight((_anchor_height -
> TotalItemHeight) / 2 + _padding + _corner_radius);
> 42 + _bottom_space->SetMaximumHeight((_anchor_height -
> TotalItemHeight) / 2 + _padding + _corner_radius);
>
> Please only compute each different expression once. Like...
>
> int b = (_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius;
> int t = b + _offset_correction;
> _top_space->SetMinimumHeight(t);
> _top_space->SetMaximumHeight(t);
> _bottom_space->SetMinimumHeight(b);
> _bottom_space->SetMaximumHeight(b);

Done.

review: Needs Resubmitting
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2446
http://s-jenkins:8080/job/unity-ci/32/

review: Approve (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Tim Penhey (thumper) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote : Posted in a previous version of this proposal

No proposals found for merge of lp:~andyrock/unity/ql-c++11-for into lp:unity.

Revision history for this message
Unity Merger (unity-merger) wrote : Posted in a previous version of this proposal

No proposals found for merge of lp:~andyrock/unity/ql-c++11-for into lp:unity.

Revision history for this message
Unity Merger (unity-merger) wrote : Posted in a previous version of this proposal

No proposals found for merge of lp:~andyrock/unity/ql-c++11-for into lp:unity.

Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

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.