Merge lp:~azzar1/unity/fix-1008603-5.0 into lp:unity/5.0

Proposed by Andrea Azzarone on 2012-06-06
Status: Merged
Approved by: Łukasz Zemczak on 2012-06-06
Approved revision: 2360
Merged at revision: 2360
Proposed branch: lp:~azzar1/unity/fix-1008603-5.0
Merge into: lp:unity/5.0
Diff against target: 62 lines (+17/-5)
2 files modified
plugins/unityshell/src/DashStyle.cpp (+3/-3)
plugins/unityshell/src/HudView.cpp (+14/-2)
To merge this branch: bzr merge lp:~azzar1/unity/fix-1008603-5.0
Reviewer Review Type Date Requested Status
Łukasz Zemczak 2012-06-06 Approve on 2012-06-06
Review via email: mp+108939@code.launchpad.net

Commit message

Draw the result grid in proximity of the search entry. Backport lp:~andyrock/unity/fix-1008603

Description of the change

== Problem ==
The result grid is not drawn in proximity of the search entry.

== Fix ==
Use nux::GetPainter().Draw2DLine to draw the grid behind the search entry.

== Test ==
Not applicable

== Screenshot ==
http://ubuntuone.com/5YADnxYrLKWYgQ32XUgrOZ

To post a comment you must log in.
Łukasz Zemczak (sil2100) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/DashStyle.cpp'
2--- plugins/unityshell/src/DashStyle.cpp 2012-04-17 07:28:31 +0000
3+++ plugins/unityshell/src/DashStyle.cpp 2012-06-06 13:26:19 +0000
4@@ -1640,7 +1640,7 @@
5 // draw the grid background
6 {
7 cairo_set_line_width(cr, 1);
8- cairo_move_to(cr, _align(x + width, odd), _align(y, odd));
9+ cairo_move_to(cr, _align(x + width, odd), y);
10 if (curve_bottom)
11 {
12 LOG_DEBUG(logger) << "curve: " << _align(x + width, odd) << " - " << _align(y + height - radius, odd);
13@@ -1672,8 +1672,8 @@
14 else
15 {
16 cairo_line_to(cr, _align(x + width, odd), _align(y + height, odd));
17- cairo_line_to(cr, _align(x, odd), _align(x + height, odd));
18- cairo_line_to(cr, _align(x, odd), _align(y, odd));
19+ cairo_line_to(cr, _align(x, odd), _align(y + height, odd));
20+ cairo_line_to(cr, _align(x, odd), y);
21 }
22
23 cairo_set_source_rgba(cr, pimpl->button_label_border_color_[nux::ButtonVisualState::VISUAL_STATE_NORMAL]);
24
25=== modified file 'plugins/unityshell/src/HudView.cpp'
26--- plugins/unityshell/src/HudView.cpp 2012-04-24 11:37:05 +0000
27+++ plugins/unityshell/src/HudView.cpp 2012-06-06 13:26:19 +0000
28@@ -44,10 +44,10 @@
29
30 const int default_width = 960;
31 const int default_height = 276;
32-const int content_width = 941;
33+const int content_width = 939;
34
35 const int top_padding = 11;
36-const int bottom_padding = 9;
37+const int bottom_padding = 10;
38 const int left_padding = 11;
39 const int right_padding = 0;
40 }
41@@ -443,9 +443,21 @@
42 renderer_.DrawInner(gfx_context, draw_content_geo, absolute_window_geometry_, window_geometry_);
43
44 gfx_context.PushClippingRectangle(draw_content_geo);
45+
46 if (IsFullRedraw())
47 {
48 nux::GetPainter().PushBackgroundStack();
49+
50+ if (!buttons_.empty()) // See bug #1008603.
51+ {
52+ int height = 3;
53+ int x = search_bar_->GetBaseX() + 1;
54+ int y = search_bar_->GetBaseY() + search_bar_->GetBaseHeight() - height;
55+ nux::GetPainter().Draw2DLine(gfx_context, x, y, x, y + height, nux::color::White * 0.13);
56+ x += content_width - 1;
57+ nux::GetPainter().Draw2DLine(gfx_context, x, y, x, y + height, nux::color::White * 0.13);
58+ }
59+
60 GetLayout()->ProcessDraw(gfx_context, force_draw);
61 nux::GetPainter().PopBackgroundStack();
62 }

Subscribers

People subscribed via source and target branches

to all changes: