Merge lp:~nick-dedekind/unity/lp1064969.preview-focus-opacity into lp:unity

Proposed by Nick Dedekind
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2824
Proposed branch: lp:~nick-dedekind/unity/lp1064969.preview-focus-opacity
Merge into: lp:unity
Diff against target: 47 lines (+4/-4)
3 files modified
dash/previews/ActionButton.cpp (+1/-1)
unity-shared/DashStyle.cpp (+2/-2)
unity-shared/DashStyle.h (+1/-1)
To merge this branch: bzr merge lp:~nick-dedekind/unity/lp1064969.preview-focus-opacity
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
jenkins continuous-integration Pending
Review via email: mp+128957@code.launchpad.net

Commit message

Updated preview action button focus fill (white 20% opacity, LP: #1064969)

Description of the change

Updated preview action button focus fill (white 20% opacity, LP: #1064969)
Design approved by JohnLea.

To post a comment you must log in.
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks good +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/previews/ActionButton.cpp'
2--- dash/previews/ActionButton.cpp 2012-09-24 20:45:42 +0000
3+++ dash/previews/ActionButton.cpp 2012-10-10 14:52:28 +0000
4@@ -199,7 +199,7 @@
5
6 void ActionButton::RedrawFocusOverlay(nux::Geometry const& geom, cairo_t* cr)
7 {
8- Style::Instance().ButtonFocusOverlay(cr);
9+ Style::Instance().ButtonFocusOverlay(cr, 0.20f);
10 }
11
12 long ActionButton::ComputeContentSize()
13
14=== modified file 'unity-shared/DashStyle.cpp'
15--- unity-shared/DashStyle.cpp 2012-10-01 13:59:54 +0000
16+++ unity-shared/DashStyle.cpp 2012-10-10 14:52:28 +0000
17@@ -1760,7 +1760,7 @@
18 return true;
19 }
20
21-bool Style::ButtonFocusOverlay(cairo_t* cr)
22+bool Style::ButtonFocusOverlay(cairo_t* cr, float alpha)
23 {
24 // sanity checks
25 if (cairo_status(cr) != CAIRO_STATUS_SUCCESS)
26@@ -1773,7 +1773,7 @@
27 double h = cairo_image_surface_get_height(cairo_get_target(cr));
28
29 nux::Color color(nux::color::White);
30- color.alpha = 0.50f;
31+ color.alpha = alpha;
32 cairo_set_line_width(cr, pimpl->button_label_border_size_[nux::VISUAL_STATE_NORMAL]);
33
34 RoundedRect(cr,
35
36=== modified file 'unity-shared/DashStyle.h'
37--- unity-shared/DashStyle.h 2012-10-08 06:36:17 +0000
38+++ unity-shared/DashStyle.h 2012-10-10 14:52:28 +0000
39@@ -106,7 +106,7 @@
40
41 virtual nux::AbstractPaintLayer* FocusOverlay(int width, int height);
42
43- virtual bool ButtonFocusOverlay(cairo_t* cr);
44+ virtual bool ButtonFocusOverlay(cairo_t* cr, float alpha = 0.50f);
45
46 virtual bool MultiRangeSegment(cairo_t* cr,
47 nux::ButtonVisualState state,