Merge lp:~3v1n0/unity/new-launcher-assets into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: John Lea
Approved revision: no longer in the source branch.
Merged at revision: 3047
Proposed branch: lp:~3v1n0/unity/new-launcher-assets
Merge into: lp:unity
Diff against target: 178 lines (+32/-31)
2 files modified
launcher/SwitcherView.cpp (+10/-3)
unity-shared/IconRenderer.cpp (+22/-28)
To merge this branch: bzr merge lp:~3v1n0/unity/new-launcher-assets
Reviewer Review Type Date Requested Status
John Lea (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+135522@code.launchpad.net

Commit message

Launcher/Switcher: update icon assets to match new designs, fix spacing and shapes.

Description of the change

Updated the unity assets, using the ones provided by design. Spacing values updated in switcher and fixed drawing issue (now we draw the text in a new layer).

BFB and HUD icons moved to squared shape.

Screenshot for reference: http://i.imgur.com/OsLQN.jpg

To post a comment you must log in.
Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

The borders in Launcher tiles seem to be missing after comparing with https://launchpadlibrarian.net/123625130/preview-new-launcher-icons.png

Of course, I'm no John :-P

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

> The borders in Launcher tiles seem to be missing after comparing with https://launchpadlibrarian.net/123625130/preview-new-launcher-icons.png

Yeah, I've noticed... But I'm just using the assets they gave, so
probably they should be tuned a little...

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

> The borders in Launcher tiles seem to be missing after comparing with
> https://launchpadlibrarian.net/12362513

Yeah, I've noticed... But I'm just using the assets they gave, so
probably they should be tuned a little...

For example, increasing the opacity of the assets resources/launcher_icon_edge_* I can get this result http://i.imgur.com/uP4vD.png
http://i.imgur.com/uP4vD.png

Revision history for this message
John Lea (johnlea) :
review: Approve
Revision history for this message
John Lea (johnlea) wrote :

One thing to note didrocks says "that some assets can might need to be in unity asset pool, please check that all assets are also in this pool if needed"

Also as soon as this has landed and I am back in the office I will do another review with the visual designers and report back.

Revision history for this message
Marco Biscaro (marcobiscaro2112) wrote :

114 -nux::BaseTexture* squircle_base = 0;
115 -nux::BaseTexture* squircle_base_selected = 0;
116 -nux::BaseTexture* squircle_edge = 0;
117 -nux::BaseTexture* squircle_glow = 0;
118 -nux::BaseTexture* squircle_shadow = 0;
119 -nux::BaseTexture* squircle_shine = 0;
120 +// nux::BaseTexture* squircle_base = 0;
121 +// nux::BaseTexture* squircle_base_selected = 0;
122 +// nux::BaseTexture* squircle_edge = 0;
123 +// nux::BaseTexture* squircle_glow = 0;
124 +// nux::BaseTexture* squircle_shadow = 0;
125 +// nux::BaseTexture* squircle_shine = 0;

146 - squircle_base = load_texture(PKGDATADIR"/squircle_base_54.png");
147 - squircle_base_selected = load_texture(PKGDATADIR"/squircle_base_selected_54.png");
148 - squircle_edge = load_texture(PKGDATADIR"/squircle_edge_54.png");
149 - squircle_glow = load_texture(PKGDATADIR"/squircle_glow_62.png");
150 - squircle_shadow = load_texture(PKGDATADIR"/squircle_shadow_62.png");
151 - squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");
152 + // squircle_base = load_texture(PKGDATADIR"/squircle_base_54.png");
153 + // squircle_base_selected = load_texture(PKGDATADIR"/squircle_base_selected_54.png");
154 + // squircle_edge = load_texture(PKGDATADIR"/squircle_edge_54.png");
155 + // squircle_glow = load_texture(PKGDATADIR"/squircle_glow_62.png");
156 + // squircle_shadow = load_texture(PKGDATADIR"/squircle_shadow_62.png");
157 + // squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");

165 - squircle_base->UnReference();
166 - squircle_base_selected->UnReference();
167 - squircle_edge->UnReference();
168 - squircle_glow->UnReference();
169 - squircle_shadow->UnReference();
170 - squircle_shine->UnReference();
171 + // squircle_base->UnReference();
172 + // squircle_base_selected->UnReference();
173 + // squircle_edge->UnReference();
174 + // squircle_glow->UnReference();
175 + // squircle_shadow->UnReference();
176 + // squircle_shine->UnReference();

Why are these lines commented instead of removed?

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

@JohnLea: Ok, I was in contact with Matthieu to improve the rendering of these (since this is not fine yet)... I already did some experiments with it, so once you'll be back I'll be happy to continue this work.

@Marco: yeah, I know, I removed them locally, but this branch was still somewhat in WIP. I'll fix them on upcoming versions.

Revision history for this message
John Lea (johnlea) wrote :

@Treviño: cool, iterate with Matthieu, and when ready ask Matthieu to approve the merge (if Matthieu is happy I am happy ;-) Ping me if this gets blocked for any reason. Thanks, John

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/SwitcherView.cpp'
2--- launcher/SwitcherView.cpp 2012-11-14 02:21:36 +0000
3+++ launcher/SwitcherView.cpp 2012-11-22 19:09:20 +0000
4@@ -32,16 +32,21 @@
5 namespace switcher
6 {
7
8+namespace
9+{
10+ const unsigned int VERTICAL_PADDING = 45;
11+}
12+
13 NUX_IMPLEMENT_OBJECT_TYPE(SwitcherView);
14
15 SwitcherView::SwitcherView()
16 : render_boxes(false)
17 , border_size(50)
18- , flat_spacing(10)
19+ , flat_spacing(20)
20 , icon_size(128)
21 , minimum_spacing(10)
22 , tile_size(150)
23- , vertical_size(tile_size + 80)
24+ , vertical_size(tile_size + VERTICAL_PADDING * 2)
25 , text_size(15)
26 , animation_length(250)
27 , monitor(-1)
28@@ -117,7 +122,7 @@
29 void SwitcherView::OnTileSizeChanged (int size)
30 {
31 icon_renderer_->SetTargetSize(tile_size, icon_size, 10);
32- vertical_size = tile_size + 80;
33+ vertical_size = tile_size + VERTICAL_PADDING * 2;
34 }
35
36 void SwitcherView::SaveLast ()
37@@ -581,8 +586,10 @@
38
39 if (text_view_->IsVisible())
40 {
41+ nux::GetPainter().PushPaintLayerStack();
42 text_view_->SetBaseY(last_background_.y + last_background_.height - 45);
43 text_view_->Draw(GfxContext, force_draw);
44+ nux::GetPainter().PopPaintLayerStack();
45 }
46
47 int ms_since_change = TimeUtil::TimeDelta(&current_, &save_time_);
48
49=== modified file 'resources/launcher_bfb.png'
50Binary files resources/launcher_bfb.png 2012-03-14 06:24:18 +0000 and resources/launcher_bfb.png 2012-11-22 19:09:20 +0000 differ
51=== modified file 'resources/launcher_icon_back_54.png'
52Binary files resources/launcher_icon_back_54.png 2011-07-15 04:44:07 +0000 and resources/launcher_icon_back_54.png 2012-11-22 19:09:20 +0000 differ
53=== modified file 'resources/launcher_icon_edge_150.png'
54Binary files resources/launcher_icon_edge_150.png 2011-07-19 18:53:14 +0000 and resources/launcher_icon_edge_150.png 2012-11-22 19:09:20 +0000 differ
55=== modified file 'resources/launcher_icon_edge_54.png'
56Binary files resources/launcher_icon_edge_54.png 2011-07-15 04:44:07 +0000 and resources/launcher_icon_edge_54.png 2012-11-22 19:09:20 +0000 differ
57=== modified file 'resources/launcher_icon_glow_200.png'
58Binary files resources/launcher_icon_glow_200.png 2012-03-14 06:24:18 +0000 and resources/launcher_icon_glow_200.png 2012-11-22 19:09:20 +0000 differ
59=== modified file 'resources/launcher_icon_glow_62.png'
60Binary files resources/launcher_icon_glow_62.png 2011-07-15 04:44:07 +0000 and resources/launcher_icon_glow_62.png 2012-11-22 19:09:20 +0000 differ
61=== modified file 'resources/launcher_icon_selected_back_150.png'
62Binary files resources/launcher_icon_selected_back_150.png 2011-07-19 18:53:14 +0000 and resources/launcher_icon_selected_back_150.png 2012-11-22 19:09:20 +0000 differ
63=== modified file 'resources/launcher_icon_shadow_200.png'
64Binary files resources/launcher_icon_shadow_200.png 2012-02-13 16:29:59 +0000 and resources/launcher_icon_shadow_200.png 2012-11-22 19:09:20 +0000 differ
65=== modified file 'resources/launcher_icon_shadow_62.png'
66Binary files resources/launcher_icon_shadow_62.png 2012-02-13 16:29:59 +0000 and resources/launcher_icon_shadow_62.png 2012-11-22 19:09:20 +0000 differ
67=== modified file 'resources/launcher_icon_shine_150.png'
68Binary files resources/launcher_icon_shine_150.png 2011-07-19 18:53:14 +0000 and resources/launcher_icon_shine_150.png 2012-11-22 19:09:20 +0000 differ
69=== modified file 'resources/launcher_icon_shine_54.png'
70Binary files resources/launcher_icon_shine_54.png 2011-07-15 04:44:07 +0000 and resources/launcher_icon_shine_54.png 2012-11-22 19:09:20 +0000 differ
71=== modified file 'unity-shared/IconRenderer.cpp'
72--- unity-shared/IconRenderer.cpp 2012-11-15 20:03:17 +0000
73+++ unity-shared/IconRenderer.cpp 2012-11-22 19:09:20 +0000
74@@ -68,7 +68,7 @@
75 #define LUMIN_GREEN "0.59"
76 #define LUMIN_BLUE "0.11"
77
78-std::string gPerspectiveCorrectShader = TEXT(
79+const std::string gPerspectiveCorrectShader = TEXT(
80 "[Vertex Shader] \n"
81 VertexShaderHeader
82 "uniform mat4 ViewProjectionMatrix; \n\
83@@ -113,7 +113,7 @@
84 } \n\
85 ");
86
87-std::string PerspectiveCorrectVtx = TEXT(
88+const std::string PerspectiveCorrectVtx = TEXT(
89 "!!ARBvp1.0 \n\
90 ATTRIB iPos = vertex.position; \n\
91 ATTRIB iColor = vertex.attrib[3]; \n\
92@@ -130,7 +130,7 @@
93 MOV oTexCoord0, vertex.attrib[8]; \n\
94 END");
95
96-std::string PerspectiveCorrectTexFrg = TEXT(
97+const std::string PerspectiveCorrectTexFrg = TEXT(
98 "!!ARBfp1.0 \n\
99 PARAM color0 = program.local[0]; \n\
100 PARAM factor = program.local[1]; \n\
101@@ -152,7 +152,7 @@
102 MOV result.color.a, color; \n\
103 END");
104
105-std::string PerspectiveCorrectTexRectFrg = TEXT(
106+const std::string PerspectiveCorrectTexRectFrg = TEXT(
107 "!!ARBfp1.0 \n\
108 PARAM color0 = program.local[0]; \n\
109 PARAM factor = program.local[1]; \n\
110@@ -194,12 +194,12 @@
111 nux::BaseTexture* arrow_empty_ltr = 0;
112 nux::BaseTexture* arrow_empty_rtl = 0;
113
114-nux::BaseTexture* squircle_base = 0;
115-nux::BaseTexture* squircle_base_selected = 0;
116-nux::BaseTexture* squircle_edge = 0;
117-nux::BaseTexture* squircle_glow = 0;
118-nux::BaseTexture* squircle_shadow = 0;
119-nux::BaseTexture* squircle_shine = 0;
120+// nux::BaseTexture* squircle_base = 0;
121+// nux::BaseTexture* squircle_base_selected = 0;
122+// nux::BaseTexture* squircle_edge = 0;
123+// nux::BaseTexture* squircle_glow = 0;
124+// nux::BaseTexture* squircle_shadow = 0;
125+// nux::BaseTexture* squircle_shine = 0;
126
127 std::vector<nux::BaseTexture*> icon_background;
128 std::vector<nux::BaseTexture*> icon_selected_background;
129@@ -470,12 +470,6 @@
130 // 0.9f is BACKLIGHT_STRENGTH in Launcher.cpp
131 backlight_intensity = (arg.keyboard_nav_hl) ? 0.95f : 0.9f;
132 glow_intensity = (arg.keyboard_nav_hl) ? 1.0f : 0.0f ;
133-
134- background = local::squircle_base_selected;
135- edge = local::squircle_edge;
136- glow = local::squircle_glow;
137- shine = local::squircle_shine;
138- shadow = local::squircle_shadow;
139 }
140
141 // draw shadow
142@@ -1224,12 +1218,12 @@
143 PKGDATADIR"/launcher_icon_shine_150.png",
144 PKGDATADIR"/launcher_icon_shine_54.png");
145
146- squircle_base = load_texture(PKGDATADIR"/squircle_base_54.png");
147- squircle_base_selected = load_texture(PKGDATADIR"/squircle_base_selected_54.png");
148- squircle_edge = load_texture(PKGDATADIR"/squircle_edge_54.png");
149- squircle_glow = load_texture(PKGDATADIR"/squircle_glow_62.png");
150- squircle_shadow = load_texture(PKGDATADIR"/squircle_shadow_62.png");
151- squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");
152+ // squircle_base = load_texture(PKGDATADIR"/squircle_base_54.png");
153+ // squircle_base_selected = load_texture(PKGDATADIR"/squircle_base_selected_54.png");
154+ // squircle_edge = load_texture(PKGDATADIR"/squircle_edge_54.png");
155+ // squircle_glow = load_texture(PKGDATADIR"/squircle_glow_62.png");
156+ // squircle_shadow = load_texture(PKGDATADIR"/squircle_shadow_62.png");
157+ // squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");
158
159 pip_ltr = load_texture(PKGDATADIR"/launcher_pip_ltr.png");
160 arrow_ltr = load_texture(PKGDATADIR"/launcher_arrow_ltr.png");
161@@ -1274,12 +1268,12 @@
162 destroy_textures(icon_shadow);
163 destroy_textures(icon_shine);
164
165- squircle_base->UnReference();
166- squircle_base_selected->UnReference();
167- squircle_edge->UnReference();
168- squircle_glow->UnReference();
169- squircle_shadow->UnReference();
170- squircle_shine->UnReference();
171+ // squircle_base->UnReference();
172+ // squircle_base_selected->UnReference();
173+ // squircle_edge->UnReference();
174+ // squircle_glow->UnReference();
175+ // squircle_shadow->UnReference();
176+ // squircle_shine->UnReference();
177
178 IconRenderer::DestroyShortcutTextures();
179