Merge lp:~sladen/unity/unity-drunken-spinner-lp943656 into lp:unity

Proposed by Paul Sladen
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: no longer in the source branch.
Merged at revision: 2099
Proposed branch: lp:~sladen/unity/unity-drunken-spinner-lp943656
Merge into: lp:unity
Diff against target: 17 lines (+5/-2)
1 file modified
plugins/unityshell/src/SearchBarSpinner.cpp (+5/-2)
To merge this branch: bzr merge lp:~sladen/unity/unity-drunken-spinner-lp943656
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Andrea Cimitan (community) Approve
Review via email: mp+95297@code.launchpad.net

Description of the change

Dash/HUD: logic inversion in spinner rotation offset (LP: #943656)

To post a comment you must log in.
Revision history for this message
Andrea Cimitan (cimi) :
review: Approve
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/424/console reported an error when processing this lp:~sladen/unity/unity-drunken-spinner-lp943656 branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/436/console reported an error when processing this lp:~sladen/unity/unity-drunken-spinner-lp943656 branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/SearchBarSpinner.cpp'
2--- plugins/unityshell/src/SearchBarSpinner.cpp 2012-02-24 10:41:38 +0000
3+++ plugins/unityshell/src/SearchBarSpinner.cpp 2012-03-01 01:50:22 +0000
4@@ -86,8 +86,11 @@
5 geo.y + ((geo.height - _spin->GetHeight()) / 2),
6 _spin->GetWidth(),
7 _spin->GetHeight());
8- int spin_offset_w = (geo.width % 2) ? 0 : 1;
9- int spin_offset_h = (geo.height % 2) ? 0 : 1;
10+ // Geometry (== Rect) uses integers which were rounded above,
11+ // hence an extra 0.5 offset for odd sizes is needed
12+ // because pure floating point is not being used.
13+ int spin_offset_w = !(geo.width % 2) ? 0 : 1;
14+ int spin_offset_h = !(geo.height % 2) ? 0 : 1;
15
16 GfxContext.PushModelViewMatrix(nux::Matrix4::TRANSLATE(-spin_geo.x - (spin_geo.width + spin_offset_w) / 2.0f,
17 -spin_geo.y - (spin_geo.height + spin_offset_h) / 2.0f, 0));