Merge lp:~townsend/unity/fix-quicklist-blur into lp:unity

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 3493
Proposed branch: lp:~townsend/unity/fix-quicklist-blur
Merge into: lp:unity
Diff against target: 44 lines (+6/-5)
1 file modified
launcher/QuicklistView.cpp (+6/-5)
To merge this branch: bzr merge lp:~townsend/unity/fix-quicklist-blur
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+183865@code.launchpad.net

Commit message

The logic to detect when a Quicklist may be off the screen did not take into account the default top size of 4, so any Quicklists near the bottom would have blur that was shifted down 4 pixels.

Description of the change

When a Quicklist was detected as being off the screen, the assignment of the variable that handles the top size did not also have the default offset of 4 pixels taken into account. This led to the Quicklist blur being shifted down 4 pixels when opening a Quicklist near the bottom of the screen.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/QuicklistView.cpp'
--- launcher/QuicklistView.cpp 2013-01-09 13:59:58 +0000
+++ launcher/QuicklistView.cpp 2013-09-04 12:53:10 +0000
@@ -51,6 +51,7 @@
51namespace51namespace
52{52{
53 const int ANCHOR_WIDTH = 10.0f;53 const int ANCHOR_WIDTH = 10.0f;
54 const int TOP_SIZE = 4;
54}55}
5556
56NUX_IMPLEMENT_OBJECT_TYPE(QuicklistView);57NUX_IMPLEMENT_OBJECT_TYPE(QuicklistView);
@@ -59,7 +60,7 @@
59 : _anchorX(0)60 : _anchorX(0)
60 , _anchorY(0)61 , _anchorY(0)
61 , _labelText("QuicklistView 1234567890")62 , _labelText("QuicklistView 1234567890")
62 , _top_size(4)63 , _top_size(TOP_SIZE)
63 , _mouse_down(false)64 , _mouse_down(false)
64 , _enable_quicklist_for_testing(false)65 , _enable_quicklist_for_testing(false)
65 , _anchor_width(10)66 , _anchor_width(10)
@@ -337,9 +338,9 @@
337 nux::GetWindowThread()->GetGraphicsDisplay().GetWindowHeight();338 nux::GetWindowThread()->GetGraphicsDisplay().GetWindowHeight();
338339
339 if (offscreen_size > 0)340 if (offscreen_size > 0)
340 _top_size = offscreen_size;341 _top_size = offscreen_size + TOP_SIZE;
341 else342 else
342 _top_size = 4;343 _top_size = TOP_SIZE;
343344
344 int x = _anchorX - _padding;345 int x = _anchorX - _padding;
345 int y = _anchorY - _anchor_height / 2 - _top_size - _corner_radius - _padding;346 int y = _anchorY - _anchor_height / 2 - _top_size - _corner_radius - _padding;
@@ -1182,9 +1183,9 @@
1182 nux::GetWindowThread()->GetGraphicsDisplay().GetWindowHeight();1183 nux::GetWindowThread()->GetGraphicsDisplay().GetWindowHeight();
11831184
1184 if (offscreen_size > 0)1185 if (offscreen_size > 0)
1185 _top_size = offscreen_size;1186 _top_size = offscreen_size + TOP_SIZE;
1186 else1187 else
1187 _top_size = 4;1188 _top_size = TOP_SIZE;
11881189
1189 size_above_anchor = _top_size;1190 size_above_anchor = _top_size;
1190 int x = _anchorX - _padding;1191 int x = _anchorX - _padding;