Merge lp:~azzar1/unity/fix-1055455 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2756
Proposed branch: lp:~azzar1/unity/fix-1055455
Merge into: lp:unity
Diff against target: 37 lines (+2/-7)
2 files modified
dash/previews/ActionButton.cpp (+0/-5)
unity-shared/CoverArt.cpp (+2/-2)
To merge this branch: bzr merge lp:~azzar1/unity/fix-1055455
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+126106@code.launchpad.net

Commit message

Fix redrawing of preview cover art.

Description of the change

== Problem ==
Redrawing update for previews cover art. See: http://www.youtube.com/watch?v=LJjPP0lqouA

== Fix ==
Use IsFullRedraw.

Note that there is no need to call QueueDraw when key_nav_focus_change is emitted/received. Nux will do it for you.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

== Problem ==
Redrawing update for previews cover art. See: http://www.youtube.com/watch?v=LJjPP0lqouA

== Fix ==
Use IsFullRedraw.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Nice

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dash/previews/ActionButton.cpp'
--- dash/previews/ActionButton.cpp 2012-09-19 17:21:06 +0000
+++ dash/previews/ActionButton.cpp 2012-09-24 21:25:31 +0000
@@ -77,11 +77,6 @@
77{77{
78 InitTheme();78 InitTheme();
7979
80 key_nav_focus_change.connect([&] (nux::Area*, bool, nux::KeyNavDirection)
81 {
82 QueueDraw();
83 });
84
85 key_nav_focus_activate.connect([&](nux::Area*)80 key_nav_focus_activate.connect([&](nux::Area*)
86 {81 {
87 if (GetInputEventSensitivity())82 if (GetInputEventSensitivity())
8883
=== modified file 'unity-shared/CoverArt.cpp'
--- unity-shared/CoverArt.cpp 2012-09-14 23:28:40 +0000
+++ unity-shared/CoverArt.cpp 2012-09-24 21:25:31 +0000
@@ -334,7 +334,7 @@
334 gfx_engine.GetRenderStates().GetBlend(alpha, src, dest);334 gfx_engine.GetRenderStates().GetBlend(alpha, src, dest);
335 gfx_engine.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);335 gfx_engine.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
336336
337 if (texture_screenshot_)337 if (IsFullRedraw() && texture_screenshot_)
338 {338 {
339 nux::Geometry imageDest = base;339 nux::Geometry imageDest = base;
340 nux::TexCoordXForm texxform;340 nux::TexCoordXForm texxform;
@@ -376,7 +376,7 @@
376 texxform,376 texxform,
377 nux::color::White);377 nux::color::White);
378 }378 }
379 else379 else if (IsFullRedraw())
380 {380 {
381 if (waiting_)381 if (waiting_)
382 { 382 {