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
1=== modified file 'launcher/QuicklistView.cpp'
2--- launcher/QuicklistView.cpp 2013-01-09 13:59:58 +0000
3+++ launcher/QuicklistView.cpp 2013-09-04 12:53:10 +0000
4@@ -51,6 +51,7 @@
5 namespace
6 {
7 const int ANCHOR_WIDTH = 10.0f;
8+ const int TOP_SIZE = 4;
9 }
10
11 NUX_IMPLEMENT_OBJECT_TYPE(QuicklistView);
12@@ -59,7 +60,7 @@
13 : _anchorX(0)
14 , _anchorY(0)
15 , _labelText("QuicklistView 1234567890")
16- , _top_size(4)
17+ , _top_size(TOP_SIZE)
18 , _mouse_down(false)
19 , _enable_quicklist_for_testing(false)
20 , _anchor_width(10)
21@@ -337,9 +338,9 @@
22 nux::GetWindowThread()->GetGraphicsDisplay().GetWindowHeight();
23
24 if (offscreen_size > 0)
25- _top_size = offscreen_size;
26+ _top_size = offscreen_size + TOP_SIZE;
27 else
28- _top_size = 4;
29+ _top_size = TOP_SIZE;
30
31 int x = _anchorX - _padding;
32 int y = _anchorY - _anchor_height / 2 - _top_size - _corner_radius - _padding;
33@@ -1182,9 +1183,9 @@
34 nux::GetWindowThread()->GetGraphicsDisplay().GetWindowHeight();
35
36 if (offscreen_size > 0)
37- _top_size = offscreen_size;
38+ _top_size = offscreen_size + TOP_SIZE;
39 else
40- _top_size = 4;
41+ _top_size = TOP_SIZE;
42
43 size_above_anchor = _top_size;
44 int x = _anchorX - _padding;