Merge lp:~macslow/unity/unity.fix-863246-2 into lp:unity

Proposed by Mirco Müller
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 1872
Proposed branch: lp:~macslow/unity/unity.fix-863246-2
Merge into: lp:unity
Diff against target: 406 lines (+105/-50)
10 files modified
plugins/unityshell/resources/dash-widgets.json (+2/-2)
plugins/unityshell/src/DashSearchBar.cpp (+8/-4)
plugins/unityshell/src/FilterBar.cpp (+30/-2)
plugins/unityshell/src/FilterBasicButton.cpp (+10/-3)
plugins/unityshell/src/FilterExpanderLabel.cpp (+39/-14)
plugins/unityshell/src/FilterExpanderLabel.h (+5/-1)
plugins/unityshell/src/FilterGenreWidget.cpp (+2/-10)
plugins/unityshell/src/FilterMultiRangeWidget.cpp (+1/-9)
plugins/unityshell/src/FilterRatingsWidget.cpp (+1/-1)
plugins/unityshell/src/PlacesGroup.cpp (+7/-4)
To merge this branch: bzr merge lp:~macslow/unity/unity.fix-863246-2
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Andrea Cimitan (community) design Approve
Review via email: mp+90247@code.launchpad.net

Description of the change

Remaining issues for LP: #863246 (and also LP: #863240) fixed.

See example screenshots of the after-state here:
http://people.canonical.com/~mmueller/fix-863246-863240-1.png
http://people.canonical.com/~mmueller/fix-863246-863240-2.png
http://people.canonical.com/~mmueller/fix-863246-863240-3.png
http://people.canonical.com/~mmueller/fix-863246-863240-4.png

Alignments, margins, colors, opacities, artwork fixed for buttons, separators, outlines, text and expander-arrows.

One glitch remaining is the separator-rendering being too thick/missing occasionally (on some systems). A solution for fixing this, is available. It's reverted in this branch, as some blending issues with this remain. But that can be added afterwards, to avoid all the other fixes being blocked on just that.

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

I would:
- slightly reduce the opacity of the flter border (really subtly, from 0.15 to something like 0.13-0.14)
- make the corners of the linked button selected items rounded (in your screenshot they are squared at the corners)
- the shape of all buttons is not like this https://launchpadlibrarian.net/81538790/file_lens_filters.png (bezier curves) but of a normal rounded rectangle, don't know if design is ok with that

Revision history for this message
Mirco Müller (macslow) wrote :

* filter-opacity can be further tweaked

* "linked button selected items" I really don't know what you mean

* Regarding the button-outline shape... don't "file bugs" on a merge-request comment, but really file a new bug... this LP: 863246 is already a meta-bug much too big

Revision history for this message
Andrea Cimitan (cimi) wrote :

* 0.15 is the value from design, but maybe their dash color is more vibrant and less dark, resulting in less contrast giving the impression of being less opaque. Leave 0.15 by now if we're going to make the dash less dark after gord's fixes, otherwise 0.14

* another issue

* another issue

review: Approve (design)
Revision history for this message
Andrea Azzarone (azzar1) wrote :

54 + for (iter = layout_list.begin(); iter != layout_list.end(); iter++)
55 + {
56 + if (i != num_separators)
57 + {
58 + nux::Area* filter_view = (*iter);
59 + nux::Geometry const& geom = filter_view->GetGeometry();
60 +
61 + unsigned int alpha = 0, src = 0, dest = 0;
62 + GfxContext.GetRenderStates().GetBlend(alpha, src, dest);
63 +
64 + GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
65 + GfxContext.GetRenderStates().SetColorMask(true, true, true, false);
66 + nux::GetPainter().Draw2DLine(GfxContext,
67 + geom.x , geom.y + geom.height - 1,
68 + geom.x + geom.width, geom.y + geom.height - 1,
69 + col);
70 + GfxContext.GetRenderStates().SetBlend(alpha, src, dest);
71 + }
72 + i++;
73 + }

Why not to use the for (auto iter : layout_list) statement?

Please use ++bla intead of bla++ too :)

91 + SetMinimumHeight(30);
92 + SetMinimumWidth(48);

Can we use const variables instead of magic numbers for the moment?

+static const float kExpandDefaultIconOpacity = 1.0f;

Don't make it static, put it in an anonymouse namespace.

review: Needs Fixing
Revision history for this message
Mirco Müller (macslow) wrote :

> 54 + for (iter = layout_list.begin(); iter != layout_list.end(); iter++)
> 55 + {
> 56 + if (i != num_separators)
> 57 + {
> 58 + nux::Area* filter_view = (*iter);
> 59 + nux::Geometry const& geom = filter_view->GetGeometry();
> 60 +
> 61 + unsigned int alpha = 0, src = 0, dest = 0;
> 62 + GfxContext.GetRenderStates().GetBlend(alpha, src, dest);
> 63 +
> 64 + GfxContext.GetRenderStates().SetBlend(true, GL_ONE,
> GL_ONE_MINUS_SRC_ALPHA);
> 65 + GfxContext.GetRenderStates().SetColorMask(true, true, true,
> false);
> 66 + nux::GetPainter().Draw2DLine(GfxContext,
> 67 + geom.x , geom.y +
> geom.height - 1,
> 68 + geom.x + geom.width, geom.y +
> geom.height - 1,
> 69 + col);
> 70 + GfxContext.GetRenderStates().SetBlend(alpha, src, dest);
> 71 + }
> 72 + i++;
> 73 + }
>
> Why not to use the for (auto iter : layout_list) statement?

Using the auto-statement doesn't guarentee one gets the correct (spatial order). Only walking the list with an iter and a common for-statement does that. I'm not sure if that's a bug or feature of the new C++-standard.

>
> Please use ++bla intead of bla++ too :)
>
> 91 + SetMinimumHeight(30);
> 92 + SetMinimumWidth(48);
>
> Can we use const variables instead of magic numbers for the moment?

Fixed.

> +static const float kExpandDefaultIconOpacity = 1.0f;
>
> Don't make it static, put it in an anonymouse namespace.

Fixed.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

Approve!!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/resources/dash-widgets.json'
2--- plugins/unityshell/resources/dash-widgets.json 2012-01-13 15:13:30 +0000
3+++ plugins/unityshell/resources/dash-widgets.json 2012-01-26 15:09:29 +0000
4@@ -40,14 +40,14 @@
5 "icon-gap" : 40},
6
7 "button-label": {
8- "border-opacity" : [ 1.0, 0.15, 0.15, 0.15, 0.15],
9+ "border-opacity" : [ 0.8, 0.13, 0.13, 0.13, 0.13],
10 "border-color" : ["#ffffff", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF"],
11 "border-size" : [ 2.0, 1.0, 1.0, 0.5, 0.5],
12 "text-size" : 1.0,
13 "text-color" : ["#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff"],
14 "text-opacity" : [ 1.0, 1.0, 1.0, 1.0, 1.0],
15 "fill-color" : ["#FFFFFF", "#000000", "#000000", "#000000", "#000000"],
16- "fill-opacity" : [ 0.15, 0.0, 0.0, 0.0, 0.0],
17+ "fill-opacity" : [ 0.13, 0.0, 0.0, 0.0, 0.0],
18 "overlay-opacity": [ 0.1, 0.1, 0.1, 0.0, 0.0],
19 "overlay-mode" : [ "normal", "normal", "normal", "normal", "normal"],
20 "blur-size" : [ 1, 1, 1, 0, 0]},
21
22=== modified file 'plugins/unityshell/src/DashSearchBar.cpp'
23--- plugins/unityshell/src/DashSearchBar.cpp 2012-01-17 15:39:16 +0000
24+++ plugins/unityshell/src/DashSearchBar.cpp 2012-01-26 15:09:29 +0000
25@@ -45,7 +45,10 @@
26 #define LIVE_SEARCH_TIMEOUT 40
27 #define SPINNER_TIMEOUT 100
28
29-static const float kExpandDefaultIconOpacity = 1.0f;
30+namespace
31+{
32+const float kExpandDefaultIconOpacity = 1.0f;
33+}
34
35 namespace unity
36 {
37@@ -99,9 +102,10 @@
38 layered_layout_->SetMaximumWidth(search_bar_width_);
39 layout_->AddView(layered_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
40
41- std::string filter_str = _("<b>Filter results</b>");
42+ std::string filter_str = _("<small><b>Filter results</b></small>");
43 show_filters_ = new nux::StaticCairoText(filter_str.c_str());
44 show_filters_->SetVisible(false);
45+ show_filters_->SetFont("Ubuntu 10");
46 show_filters_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 1.0f));
47 show_filters_->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);
48 show_filters_->mouse_click.connect([&] (int x, int y, unsigned long b, unsigned long k) { showing_filters = !showing_filters; });
49@@ -469,5 +473,5 @@
50 g_variant_builder_add (builder, "{sv}", "search_string", g_variant_new_string (pango_entry_->GetText().c_str()) );
51 }
52
53-}
54-}
55+} // namespace dash
56+} // namespace unity
57\ No newline at end of file
58
59=== modified file 'plugins/unityshell/src/FilterBar.cpp'
60--- plugins/unityshell/src/FilterBar.cpp 2011-12-20 14:25:28 +0000
61+++ plugins/unityshell/src/FilterBar.cpp 2012-01-26 15:09:29 +0000
62@@ -56,7 +56,7 @@
63 void FilterBar::Init()
64 {
65 nux::LinearLayout* layout = new nux::VLayout(NUX_TRACKER_LOCATION);
66- layout->SetSpaceBetweenChildren(12);
67+ layout->SetSpaceBetweenChildren(10);
68 SetLayout(layout);
69 }
70
71@@ -105,10 +105,38 @@
72 {
73 GfxContext.PushClippingRectangle(GetGeometry());
74 GetLayout()->ProcessDraw(GfxContext, force_draw);
75+
76+ nux::Color col(0.13f, 0.13f, 0.13f, 0.13f);
77+
78+ std::list<Area *>& layout_list = GetLayout()->GetChildren();
79+ std::list<Area*>::iterator iter;
80+ int i = 0;
81+ int num_separators = layout_list.size() - 1;
82+
83+ for (iter = layout_list.begin(); iter != layout_list.end(); iter++)
84+ {
85+ if (i != num_separators)
86+ {
87+ nux::Area* filter_view = (*iter);
88+ nux::Geometry const& geom = filter_view->GetGeometry();
89+
90+ unsigned int alpha = 0, src = 0, dest = 0;
91+ GfxContext.GetRenderStates().GetBlend(alpha, src, dest);
92+
93+ GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
94+ GfxContext.GetRenderStates().SetColorMask(true, true, true, false);
95+ nux::GetPainter().Draw2DLine(GfxContext,
96+ geom.x , geom.y + geom.height - 1,
97+ geom.x + geom.width, geom.y + geom.height - 1,
98+ col);
99+ GfxContext.GetRenderStates().SetBlend(alpha, src, dest);
100+ }
101+ i++;
102+ }
103+
104 GfxContext.PopClippingRectangle();
105 }
106
107-
108 } // namespace dash
109 } // namespace unity
110
111
112=== modified file 'plugins/unityshell/src/FilterBasicButton.cpp'
113--- plugins/unityshell/src/FilterBasicButton.cpp 2012-01-10 14:09:12 +0000
114+++ plugins/unityshell/src/FilterBasicButton.cpp 2012-01-26 15:09:29 +0000
115@@ -22,6 +22,12 @@
116 #include "DashStyle.h"
117 #include "FilterBasicButton.h"
118
119+namespace
120+{
121+const int kMinButtonHeight = 30;
122+const int kMinButtonWidth = 48;
123+}
124+
125 namespace unity
126 {
127 namespace dash
128@@ -68,7 +74,8 @@
129 normal_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &FilterBasicButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL)));
130 }
131
132- // SetMinimumHeight(32);
133+ SetMinimumHeight(kMinButtonHeight);
134+ SetMinimumWidth(kMinButtonWidth);
135 }
136
137 void FilterBasicButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state)
138@@ -79,6 +86,7 @@
139 long FilterBasicButton::ComputeContentSize()
140 {
141 long ret = nux::Button::ComputeContentSize();
142+
143 nux::Geometry const& geo = GetGeometry();
144
145 if (cached_geometry_ != geo)
146@@ -136,5 +144,4 @@
147 }
148
149 } // namespace dash
150-} // namespace unity
151-
152+} // namespace unity
153\ No newline at end of file
154
155=== modified file 'plugins/unityshell/src/FilterExpanderLabel.cpp'
156--- plugins/unityshell/src/FilterExpanderLabel.cpp 2012-01-10 14:09:12 +0000
157+++ plugins/unityshell/src/FilterExpanderLabel.cpp 2012-01-26 15:09:29 +0000
158@@ -24,11 +24,18 @@
159 #include "FilterBasicButton.h"
160 #include "FilterExpanderLabel.h"
161
162+namespace
163+{
164+const float kExpandDefaultIconOpacity = 1.0f;
165+}
166+
167 namespace unity
168 {
169 namespace dash
170 {
171
172+
173+
174 NUX_IMPLEMENT_OBJECT_TYPE(FilterExpanderLabel);
175
176 FilterExpanderLabel::FilterExpanderLabel(std::string const& label, NUX_FILE_LINE_DECL)
177@@ -37,10 +44,9 @@
178 , layout_(nullptr)
179 , top_bar_layout_(nullptr)
180 , right_hand_contents_(nullptr)
181- , expander_graphic_(nullptr)
182 , cairo_label_(nullptr)
183 , raw_label_(label)
184- , label_("<span size='larger' weight='bold'>" + label + "</span>" + " ▾")
185+ , label_("<span size='larger' weight='bold'>" + label + "</span>")
186 {
187 expanded.changed.connect(sigc::mem_fun(this, &FilterExpanderLabel::DoExpandChange));
188 BuildLayout();
189@@ -57,7 +63,6 @@
190 label_ = "<span size='larger' weight='bold'>";
191 label_ += raw_label_;
192 label_ += "</span>";
193- label_ += expanded ? " ▾" : " ▸";
194 cairo_label_->SetText(label_.c_str());
195 }
196
197@@ -66,7 +71,7 @@
198 view->SetMaximumHeight(30);
199
200 right_hand_contents_ = view;
201- top_bar_layout_->AddView(right_hand_contents_, 0, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL);
202+ top_bar_layout_->AddView(right_hand_contents_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
203 }
204
205 void FilterExpanderLabel::SetContents(nux::Layout* contents)
206@@ -83,6 +88,7 @@
207 {
208 layout_ = new nux::VLayout(NUX_TRACKER_LOCATION);
209 top_bar_layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);
210+ top_bar_layout_->SetHorizontalInternalMargin(8);
211
212 cairo_label_ = new nux::StaticText(label_.c_str(), NUX_TRACKER_LOCATION);
213 cairo_label_->SetFontName("Ubuntu 10");
214@@ -93,10 +99,31 @@
215 expanded = !expanded;
216 });
217
218- top_bar_layout_->AddView(cairo_label_, 1, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL);
219+ nux::BaseTexture* arrow;
220+ arrow = dash::Style::Instance().GetGroupUnexpandIcon();
221+ expand_icon_ = new IconTexture(arrow,
222+ arrow->GetWidth(),
223+ arrow->GetHeight());
224+ expand_icon_->SetOpacity(kExpandDefaultIconOpacity);
225+ expand_icon_->SetMinimumSize(arrow->GetWidth(), arrow->GetHeight());
226+ expand_icon_->SetVisible(true);
227+ expand_icon_->mouse_click.connect(
228+ [&] (int x, int y, unsigned long b, unsigned long k)
229+ {
230+ expanded = !expanded;
231+ });
232+ arrow_layout_ = new nux::VLayout();
233+ arrow_top_space_ = new nux::SpaceLayout(2, 2, 11, 11);
234+ arrow_bottom_space_ = new nux::SpaceLayout(2, 2, 9, 9);
235+ arrow_layout_->AddView(arrow_top_space_, 0, nux::MINOR_POSITION_CENTER);
236+ arrow_layout_->AddView(expand_icon_, 0, nux::MINOR_POSITION_CENTER);
237+ arrow_layout_->AddView(arrow_bottom_space_, 0, nux::MINOR_POSITION_CENTER);
238+
239+ top_bar_layout_->AddView(cairo_label_, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
240+ top_bar_layout_->AddView(arrow_layout_, 0, nux::MINOR_POSITION_CENTER);
241 top_bar_layout_->AddSpace(1, 1);
242
243- top_bar_layout_->SetMaximumWidth((Style::Instance().GetTileWidth() - 12) * 2 + 10);
244+ top_bar_layout_->SetMaximumWidth((Style::Instance().GetTileWidth() - 12) * 2 + 20);
245
246 layout_->AddLayout(top_bar_layout_, 0, nux::MINOR_POSITION_LEFT);
247 layout_->SetVerticalInternalMargin(0);
248@@ -109,13 +136,11 @@
249
250 void FilterExpanderLabel::DoExpandChange(bool change)
251 {
252- label_ = "<span size='larger' weight='bold'>";
253- label_ += raw_label_;
254- label_ += "</span>";
255- label_ += expanded ? " ▾" : " ▸";
256-
257- if (cairo_label_)
258- cairo_label_->SetText(label_);
259+ dash::Style& style = dash::Style::Instance();
260+ if (expanded)
261+ expand_icon_->SetTexture(style.GetGroupUnexpandIcon());
262+ else
263+ expand_icon_->SetTexture(style.GetGroupExpandIcon());
264
265 if (change and contents_ and !contents_->IsChildOf(layout_))
266 {
267@@ -149,4 +174,4 @@
268 }
269
270 } // namespace dash
271-} // namespace unity
272+} // namespace unity
273\ No newline at end of file
274
275=== modified file 'plugins/unityshell/src/FilterExpanderLabel.h'
276--- plugins/unityshell/src/FilterExpanderLabel.h 2012-01-10 14:09:12 +0000
277+++ plugins/unityshell/src/FilterExpanderLabel.h 2012-01-26 15:09:29 +0000
278@@ -30,6 +30,7 @@
279 #include <Nux/StaticText.h>
280
281 #include "FilterWidget.h"
282+#include "IconTexture.h"
283
284 namespace unity
285 {
286@@ -60,10 +61,13 @@
287 nux::LinearLayout* layout_;
288 nux::LinearLayout* top_bar_layout_;
289 nux::View* right_hand_contents_;
290- nux::View* expander_graphic_;
291 nux::StaticText* cairo_label_;
292 std::string raw_label_;
293 std::string label_;
294+ nux::VLayout* arrow_layout_;
295+ nux::SpaceLayout* arrow_top_space_;
296+ nux::SpaceLayout* arrow_bottom_space_;
297+ IconTexture* expand_icon_;
298
299 nux::ObjectPtr<nux::Layout> contents_;
300 };
301
302=== modified file 'plugins/unityshell/src/FilterGenreWidget.cpp'
303--- plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-18 10:28:45 +0000
304+++ plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-26 15:09:29 +0000
305@@ -47,7 +47,7 @@
306 genre_layout_->ForceChildrenSize(true);
307 genre_layout_->MatchContentSize(true);
308 genre_layout_->SetSpaceBetweenChildren (9, 9);
309- genre_layout_->SetTopAndBottomPadding(12);
310+ genre_layout_->SetTopAndBottomPadding(9, 12);
311 genre_layout_->EnablePartialVisibility(false);
312 if (columns == 3)
313 {
314@@ -55,7 +55,7 @@
315 }
316 else
317 {
318- genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 12, 33);
319+ genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 7, 33);
320 }
321
322 SetRightHandView(all_button_);
323@@ -122,17 +122,9 @@
324 void FilterGenre::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
325 {
326 nux::Geometry const& geo = GetGeometry();
327- nux::Color col(0.2f, 0.2f, 0.2f, 0.2f);
328
329 GfxContext.PushClippingRectangle(geo);
330 nux::GetPainter().PaintBackground(GfxContext, geo);
331-
332- nux::GetPainter().Draw2DLine(GfxContext,
333- geo.x, geo.y + geo.height - 1,
334- geo.x + geo.width, geo.y + geo.height - 1,
335- col,
336- col);
337-
338 GfxContext.PopClippingRectangle();
339 }
340
341
342=== modified file 'plugins/unityshell/src/FilterMultiRangeWidget.cpp'
343--- plugins/unityshell/src/FilterMultiRangeWidget.cpp 2012-01-11 09:32:22 +0000
344+++ plugins/unityshell/src/FilterMultiRangeWidget.cpp 2012-01-26 15:09:29 +0000
345@@ -44,7 +44,7 @@
346 all_button_ = new FilterAllButton(NUX_TRACKER_LOCATION);
347
348 layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);
349- layout_->SetVerticalExternalMargin(12);
350+ layout_->SetTopAndBottomPadding(9, 12);
351
352 SetRightHandView(all_button_);
353 SetContents(layout_);
354@@ -158,17 +158,9 @@
355 void FilterMultiRange::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
356 {
357 nux::Geometry const& geo = GetGeometry();
358- nux::Color col(0.2f, 0.2f, 0.2f, 0.2f);
359
360 GfxContext.PushClippingRectangle(geo);
361 nux::GetPainter().PaintBackground(GfxContext, geo);
362-
363- nux::GetPainter().Draw2DLine(GfxContext,
364- geo.x, geo.y + geo.height - 1,
365- geo.x + geo.width, geo.y + geo.height - 1,
366- col,
367- col);
368-
369 GfxContext.PopClippingRectangle();
370 }
371
372
373=== modified file 'plugins/unityshell/src/FilterRatingsWidget.cpp'
374--- plugins/unityshell/src/FilterRatingsWidget.cpp 2012-01-11 09:32:22 +0000
375+++ plugins/unityshell/src/FilterRatingsWidget.cpp 2012-01-26 15:09:29 +0000
376@@ -43,7 +43,7 @@
377 all_button_ = new FilterAllButton(NUX_TRACKER_LOCATION);
378
379 nux::VLayout* layout = new nux::VLayout(NUX_TRACKER_LOCATION);
380- layout->SetTopAndBottomPadding(10, 0);
381+ layout->SetTopAndBottomPadding(11, 12);
382 ratings_ = new FilterRatingsButton(NUX_TRACKER_LOCATION);
383
384 layout->AddView(ratings_);
385
386=== modified file 'plugins/unityshell/src/PlacesGroup.cpp'
387--- plugins/unityshell/src/PlacesGroup.cpp 2011-12-21 16:49:59 +0000
388+++ plugins/unityshell/src/PlacesGroup.cpp 2012-01-26 15:09:29 +0000
389@@ -44,10 +44,13 @@
390
391 #include "DashStyle.h"
392
393-static const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 0.5f);
394-static const nux::Color kExpandHoverTextColor(1.0f, 1.0f, 1.0f, 1.0f);
395-static const float kExpandDefaultIconOpacity = 0.5f;
396-static const float kExpandHoverIconOpacity = 1.0f;
397+namespace
398+{
399+const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 0.5f);
400+const nux::Color kExpandHoverTextColor(1.0f, 1.0f, 1.0f, 1.0f);
401+const float kExpandDefaultIconOpacity = 0.5f;
402+const float kExpandHoverIconOpacity = 1.0f;
403+}
404
405 namespace unity
406 {