Merge lp:~3v1n0/unity/panel-gradient-scaling into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 4188
Proposed branch: lp:~3v1n0/unity/panel-gradient-scaling
Merge into: lp:unity
Prerequisite: lp:~3v1n0/unity/input-monitor-menus-scrubbing-triangolation
Diff against target: 29 lines (+3/-3)
1 file modified
panel/PanelView.cpp (+3/-3)
To merge this branch: bzr merge lp:~3v1n0/unity/panel-gradient-scaling
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Review via email: mp+304385@code.launchpad.net

This proposal supersedes a proposal from 2016-08-30.

Commit message

PanelView: scale gradient refinement properly

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

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/PanelView.cpp'
2--- panel/PanelView.cpp 2016-09-01 22:36:54 +0000
3+++ panel/PanelView.cpp 2016-09-01 22:36:55 +0000
4@@ -43,7 +43,7 @@
5 {
6 const RawPixel TRIANGLE_THRESHOLD = 5_em;
7 const double SCRUB_VELOCITY_THRESHOLD = 0.05;
8-const int refine_gradient_midpoint = 959;
9+const RawPixel REFINE_GRADIENT_MIDPOINT = 959;
10 }
11
12
13@@ -374,7 +374,7 @@
14 GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
15 nux::TexCoordXForm refine_texxform;
16
17- int refine_x_pos = geo.x + (stored_dash_width_ - refine_gradient_midpoint);
18+ int refine_x_pos = geo.x + (stored_dash_width_ - REFINE_GRADIENT_MIDPOINT.CP(Settings::Instance().em(monitor_)));
19
20 if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
21 refine_x_pos += unity::Settings::Instance().LauncherSize(monitor_);
22@@ -473,7 +473,7 @@
23
24 nux::Geometry refine_geo = geo;
25
26- int refine_x_pos = geo.x + (stored_dash_width_ - refine_gradient_midpoint);
27+ int refine_x_pos = geo.x + (stored_dash_width_ - REFINE_GRADIENT_MIDPOINT.CP(Settings::Instance().em(monitor_)));
28 if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
29 refine_x_pos += unity::Settings::Instance().LauncherSize(monitor_);
30