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
=== modified file 'launcher/SwitcherView.cpp'
--- launcher/SwitcherView.cpp 2012-11-14 02:21:36 +0000
+++ launcher/SwitcherView.cpp 2012-11-22 19:09:20 +0000
@@ -32,16 +32,21 @@
32namespace switcher32namespace switcher
33{33{
3434
35namespace
36{
37 const unsigned int VERTICAL_PADDING = 45;
38}
39
35NUX_IMPLEMENT_OBJECT_TYPE(SwitcherView);40NUX_IMPLEMENT_OBJECT_TYPE(SwitcherView);
3641
37SwitcherView::SwitcherView()42SwitcherView::SwitcherView()
38 : render_boxes(false)43 : render_boxes(false)
39 , border_size(50)44 , border_size(50)
40 , flat_spacing(10)45 , flat_spacing(20)
41 , icon_size(128)46 , icon_size(128)
42 , minimum_spacing(10)47 , minimum_spacing(10)
43 , tile_size(150)48 , tile_size(150)
44 , vertical_size(tile_size + 80)49 , vertical_size(tile_size + VERTICAL_PADDING * 2)
45 , text_size(15)50 , text_size(15)
46 , animation_length(250)51 , animation_length(250)
47 , monitor(-1)52 , monitor(-1)
@@ -117,7 +122,7 @@
117void SwitcherView::OnTileSizeChanged (int size)122void SwitcherView::OnTileSizeChanged (int size)
118{123{
119 icon_renderer_->SetTargetSize(tile_size, icon_size, 10);124 icon_renderer_->SetTargetSize(tile_size, icon_size, 10);
120 vertical_size = tile_size + 80;125 vertical_size = tile_size + VERTICAL_PADDING * 2;
121}126}
122127
123void SwitcherView::SaveLast ()128void SwitcherView::SaveLast ()
@@ -581,8 +586,10 @@
581586
582 if (text_view_->IsVisible())587 if (text_view_->IsVisible())
583 {588 {
589 nux::GetPainter().PushPaintLayerStack();
584 text_view_->SetBaseY(last_background_.y + last_background_.height - 45);590 text_view_->SetBaseY(last_background_.y + last_background_.height - 45);
585 text_view_->Draw(GfxContext, force_draw);591 text_view_->Draw(GfxContext, force_draw);
592 nux::GetPainter().PopPaintLayerStack();
586 }593 }
587594
588 int ms_since_change = TimeUtil::TimeDelta(&current_, &save_time_);595 int ms_since_change = TimeUtil::TimeDelta(&current_, &save_time_);
589596
=== modified file 'resources/launcher_bfb.png'
590Binary files resources/launcher_bfb.png 2012-03-14 06:24:18 +0000 and resources/launcher_bfb.png 2012-11-22 19:09:20 +0000 differ597Binary 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
=== modified file 'resources/launcher_icon_back_54.png'
591Binary 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 differ598Binary 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
=== modified file 'resources/launcher_icon_edge_150.png'
592Binary 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 differ599Binary 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
=== modified file 'resources/launcher_icon_edge_54.png'
593Binary 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 differ600Binary 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
=== modified file 'resources/launcher_icon_glow_200.png'
594Binary 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 differ601Binary 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
=== modified file 'resources/launcher_icon_glow_62.png'
595Binary 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 differ602Binary 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
=== modified file 'resources/launcher_icon_selected_back_150.png'
596Binary 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 differ603Binary 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
=== modified file 'resources/launcher_icon_shadow_200.png'
597Binary 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 differ604Binary 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
=== modified file 'resources/launcher_icon_shadow_62.png'
598Binary 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 differ605Binary 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
=== modified file 'resources/launcher_icon_shine_150.png'
599Binary 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 differ606Binary 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
=== modified file 'resources/launcher_icon_shine_54.png'
600Binary 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 differ607Binary 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
=== modified file 'unity-shared/IconRenderer.cpp'
--- unity-shared/IconRenderer.cpp 2012-11-15 20:03:17 +0000
+++ unity-shared/IconRenderer.cpp 2012-11-22 19:09:20 +0000
@@ -68,7 +68,7 @@
68#define LUMIN_GREEN "0.59"68#define LUMIN_GREEN "0.59"
69#define LUMIN_BLUE "0.11"69#define LUMIN_BLUE "0.11"
7070
71std::string gPerspectiveCorrectShader = TEXT(71const std::string gPerspectiveCorrectShader = TEXT(
72"[Vertex Shader] \n"72"[Vertex Shader] \n"
73VertexShaderHeader73VertexShaderHeader
74"uniform mat4 ViewProjectionMatrix; \n\74"uniform mat4 ViewProjectionMatrix; \n\
@@ -113,7 +113,7 @@
113} \n\113} \n\
114");114");
115115
116std::string PerspectiveCorrectVtx = TEXT(116const std::string PerspectiveCorrectVtx = TEXT(
117"!!ARBvp1.0 \n\117"!!ARBvp1.0 \n\
118ATTRIB iPos = vertex.position; \n\118ATTRIB iPos = vertex.position; \n\
119ATTRIB iColor = vertex.attrib[3]; \n\119ATTRIB iColor = vertex.attrib[3]; \n\
@@ -130,7 +130,7 @@
130MOV oTexCoord0, vertex.attrib[8]; \n\130MOV oTexCoord0, vertex.attrib[8]; \n\
131END");131END");
132132
133std::string PerspectiveCorrectTexFrg = TEXT(133const std::string PerspectiveCorrectTexFrg = TEXT(
134"!!ARBfp1.0 \n\134"!!ARBfp1.0 \n\
135PARAM color0 = program.local[0]; \n\135PARAM color0 = program.local[0]; \n\
136PARAM factor = program.local[1]; \n\136PARAM factor = program.local[1]; \n\
@@ -152,7 +152,7 @@
152MOV result.color.a, color; \n\152MOV result.color.a, color; \n\
153END");153END");
154154
155std::string PerspectiveCorrectTexRectFrg = TEXT(155const std::string PerspectiveCorrectTexRectFrg = TEXT(
156"!!ARBfp1.0 \n\156"!!ARBfp1.0 \n\
157PARAM color0 = program.local[0]; \n\157PARAM color0 = program.local[0]; \n\
158PARAM factor = program.local[1]; \n\158PARAM factor = program.local[1]; \n\
@@ -194,12 +194,12 @@
194nux::BaseTexture* arrow_empty_ltr = 0;194nux::BaseTexture* arrow_empty_ltr = 0;
195nux::BaseTexture* arrow_empty_rtl = 0;195nux::BaseTexture* arrow_empty_rtl = 0;
196196
197nux::BaseTexture* squircle_base = 0;197// nux::BaseTexture* squircle_base = 0;
198nux::BaseTexture* squircle_base_selected = 0;198// nux::BaseTexture* squircle_base_selected = 0;
199nux::BaseTexture* squircle_edge = 0;199// nux::BaseTexture* squircle_edge = 0;
200nux::BaseTexture* squircle_glow = 0;200// nux::BaseTexture* squircle_glow = 0;
201nux::BaseTexture* squircle_shadow = 0;201// nux::BaseTexture* squircle_shadow = 0;
202nux::BaseTexture* squircle_shine = 0;202// nux::BaseTexture* squircle_shine = 0;
203203
204std::vector<nux::BaseTexture*> icon_background;204std::vector<nux::BaseTexture*> icon_background;
205std::vector<nux::BaseTexture*> icon_selected_background;205std::vector<nux::BaseTexture*> icon_selected_background;
@@ -470,12 +470,6 @@
470 // 0.9f is BACKLIGHT_STRENGTH in Launcher.cpp470 // 0.9f is BACKLIGHT_STRENGTH in Launcher.cpp
471 backlight_intensity = (arg.keyboard_nav_hl) ? 0.95f : 0.9f;471 backlight_intensity = (arg.keyboard_nav_hl) ? 0.95f : 0.9f;
472 glow_intensity = (arg.keyboard_nav_hl) ? 1.0f : 0.0f ;472 glow_intensity = (arg.keyboard_nav_hl) ? 1.0f : 0.0f ;
473
474 background = local::squircle_base_selected;
475 edge = local::squircle_edge;
476 glow = local::squircle_glow;
477 shine = local::squircle_shine;
478 shadow = local::squircle_shadow;
479 }473 }
480474
481 // draw shadow475 // draw shadow
@@ -1224,12 +1218,12 @@
1224 PKGDATADIR"/launcher_icon_shine_150.png",1218 PKGDATADIR"/launcher_icon_shine_150.png",
1225 PKGDATADIR"/launcher_icon_shine_54.png");1219 PKGDATADIR"/launcher_icon_shine_54.png");
12261220
1227 squircle_base = load_texture(PKGDATADIR"/squircle_base_54.png");1221 // squircle_base = load_texture(PKGDATADIR"/squircle_base_54.png");
1228 squircle_base_selected = load_texture(PKGDATADIR"/squircle_base_selected_54.png");1222 // squircle_base_selected = load_texture(PKGDATADIR"/squircle_base_selected_54.png");
1229 squircle_edge = load_texture(PKGDATADIR"/squircle_edge_54.png");1223 // squircle_edge = load_texture(PKGDATADIR"/squircle_edge_54.png");
1230 squircle_glow = load_texture(PKGDATADIR"/squircle_glow_62.png");1224 // squircle_glow = load_texture(PKGDATADIR"/squircle_glow_62.png");
1231 squircle_shadow = load_texture(PKGDATADIR"/squircle_shadow_62.png");1225 // squircle_shadow = load_texture(PKGDATADIR"/squircle_shadow_62.png");
1232 squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");1226 // squircle_shine = load_texture(PKGDATADIR"/squircle_shine_54.png");
12331227
1234 pip_ltr = load_texture(PKGDATADIR"/launcher_pip_ltr.png");1228 pip_ltr = load_texture(PKGDATADIR"/launcher_pip_ltr.png");
1235 arrow_ltr = load_texture(PKGDATADIR"/launcher_arrow_ltr.png");1229 arrow_ltr = load_texture(PKGDATADIR"/launcher_arrow_ltr.png");
@@ -1274,12 +1268,12 @@
1274 destroy_textures(icon_shadow);1268 destroy_textures(icon_shadow);
1275 destroy_textures(icon_shine);1269 destroy_textures(icon_shine);
12761270
1277 squircle_base->UnReference();1271 // squircle_base->UnReference();
1278 squircle_base_selected->UnReference();1272 // squircle_base_selected->UnReference();
1279 squircle_edge->UnReference();1273 // squircle_edge->UnReference();
1280 squircle_glow->UnReference();1274 // squircle_glow->UnReference();
1281 squircle_shadow->UnReference();1275 // squircle_shadow->UnReference();
1282 squircle_shine->UnReference();1276 // squircle_shine->UnReference();
12831277
1284 IconRenderer::DestroyShortcutTextures();1278 IconRenderer::DestroyShortcutTextures();
12851279