Merge lp:~gordallott/unity/newbg into lp:~gordallott/unity/fix-overlay-race-condition
- newbg
- Merge into fix-overlay-race-condition
Proposed by
Gord Allott
Status: | Superseded |
---|---|
Proposed branch: | lp:~gordallott/unity/newbg |
Merge into: | lp:~gordallott/unity/fix-overlay-race-condition |
Diff against target: |
2019 lines (+761/-246) 37 files modified
dash/CoverflowResultView.cpp (+4/-7) dash/DashController.cpp (+8/-10) dash/DashController.h (+2/-1) dash/FilterBar.cpp (+0/-22) dash/FilterBar.h (+0/-1) dash/LensBar.cpp (+3/-1) dash/LensView.cpp (+30/-2) dash/LensView.h (+1/-0) dash/PlacesGroup.cpp (+84/-24) dash/PlacesGroup.h (+5/-3) dash/previews/ActionButton.cpp (+1/-1) dash/previews/PreviewContainer.cpp (+45/-30) launcher/LauncherController.cpp (+1/-1) manual-tests/Dash.txt (+13/-0) manual-tests/Preview.txt (+27/-6) panel/PanelController.cpp (+14/-0) panel/PanelController.h (+2/-0) panel/PanelView.cpp (+147/-2) panel/PanelView.h (+11/-0) panel/StandalonePanel.cpp (+8/-6) plugins/unityshell/resources/lens-nav-app.svg (+12/-12) plugins/unityshell/resources/lens-nav-file.svg (+3/-8) plugins/unityshell/resources/lens-nav-gwibber.svg (+14/-0) plugins/unityshell/resources/lens-nav-home.svg (+4/-4) plugins/unityshell/resources/lens-nav-music.svg (+6/-11) plugins/unityshell/resources/lens-nav-photo.svg (+6/-11) plugins/unityshell/resources/lens-nav-video.svg (+8/-9) plugins/unityshell/src/unityshell.cpp (+31/-27) plugins/unityshell/src/unityshell.h (+1/-4) tests/autopilot/unity/tests/test_dash.py (+55/-17) tests/autopilot/unity/tests/test_hud.py (+51/-16) unity-shared/DashStyle.cpp (+37/-0) unity-shared/DashStyle.h (+8/-1) unity-shared/OverlayRenderer.cpp (+112/-7) unity-shared/PreviewStyle.cpp (+1/-1) unity-shared/UBusMessages.h (+3/-0) unity-standalone/StandaloneUnity.cpp (+3/-1) |
To merge this branch: | bzr merge lp:~gordallott/unity/newbg |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gord Allott | Pending | ||
Review via email: mp+124239@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-09-13.
Commit message
Description of the change
Adds a new background gradient to the dash and panel, as well as removes some separator lines
Design request, visual changes, no tests
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'dash/CoverflowResultView.cpp' |
2 | --- dash/CoverflowResultView.cpp 2012-08-23 14:23:08 +0000 |
3 | +++ dash/CoverflowResultView.cpp 2012-09-13 15:55:51 +0000 |
4 | @@ -161,11 +161,12 @@ |
5 | |
6 | ubus_.RegisterInterest(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, [&] (GVariant* data) { |
7 | int nav_mode = 0; |
8 | - gchar* uri = NULL; |
9 | - gchar* proposed_unique_id = NULL; |
10 | + glib::String uri; |
11 | + glib::String proposed_unique_id; |
12 | + |
13 | g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id); |
14 | |
15 | - if (std::string(proposed_unique_id) != parent_->unique_id()) |
16 | + if (proposed_unique_id.Str() != parent_->unique_id()) |
17 | return; |
18 | |
19 | unsigned num_results = coverflow_->model()->Items().size(); |
20 | @@ -192,10 +193,6 @@ |
21 | ubus_.SendMessage(UBUS_DASH_PREVIEW_INFO_PAYLOAD, |
22 | g_variant_new("(iii)", 0, left_results, right_results)); |
23 | } |
24 | - |
25 | - g_free(uri); |
26 | - g_free(proposed_unique_id); |
27 | - |
28 | }); |
29 | } |
30 | |
31 | |
32 | === modified file 'dash/DashController.cpp' |
33 | --- dash/DashController.cpp 2012-09-12 08:36:06 +0000 |
34 | +++ dash/DashController.cpp 2012-09-13 15:55:51 +0000 |
35 | @@ -284,17 +284,8 @@ |
36 | return; |
37 | } |
38 | |
39 | - /* GetIdealMonitor must get called before visible_ is set */ |
40 | monitor_ = GetIdealMonitor(); |
41 | |
42 | - // The launcher must receive UBUS_OVERLAY_SHOW before window_->EnableInputWindow(). |
43 | - // Other wise the Launcher gets focus for X, which causes XIM to fail. |
44 | - sources_.AddTimeout(0, [this] { |
45 | - GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_); |
46 | - ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info); |
47 | - return false; |
48 | - }); |
49 | - |
50 | view_->AboutToShow(); |
51 | |
52 | window_->ShowWindow(true); |
53 | @@ -311,6 +302,9 @@ |
54 | visible_ = true; |
55 | |
56 | StartShowHideTimeline(); |
57 | + |
58 | + GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_); |
59 | + ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info); |
60 | } |
61 | |
62 | void Controller::HideDash(bool restore) |
63 | @@ -400,6 +394,11 @@ |
64 | .add("monitor", monitor_); |
65 | } |
66 | |
67 | +bool Controller::IsVisible() const |
68 | +{ |
69 | + return visible_; |
70 | +} |
71 | + |
72 | void Controller::OnBusAcquired(GObject *obj, GAsyncResult *result, gpointer user_data) |
73 | { |
74 | glib::Error error; |
75 | @@ -447,6 +446,5 @@ |
76 | } |
77 | |
78 | |
79 | - |
80 | } |
81 | } |
82 | |
83 | === modified file 'dash/DashController.h' |
84 | --- dash/DashController.h 2012-09-11 10:47:15 +0000 |
85 | +++ dash/DashController.h 2012-09-13 15:55:51 +0000 |
86 | @@ -59,6 +59,8 @@ |
87 | |
88 | void HideDash(bool restore_focus = true); |
89 | |
90 | + bool IsVisible() const; |
91 | + |
92 | protected: |
93 | std::string GetName() const; |
94 | void AddProperties(GVariantBuilder* builder); |
95 | @@ -104,7 +106,6 @@ |
96 | sigc::connection screen_ungrabbed_slot_; |
97 | glib::SignalManager sig_manager_; |
98 | glib::TimeoutSeconds ensure_timeout_; |
99 | - glib::SourceManager sources_; |
100 | Animator timeline_animator_; |
101 | UBusManager ubus_manager_; |
102 | unsigned int dbus_owner_; |
103 | |
104 | === modified file 'dash/FilterBar.cpp' |
105 | --- dash/FilterBar.cpp 2012-05-06 23:48:38 +0000 |
106 | +++ dash/FilterBar.cpp 2012-09-13 15:55:51 +0000 |
107 | @@ -82,8 +82,6 @@ |
108 | AddChild(filter_view); |
109 | filter_map_[filter] = filter_view; |
110 | GetLayout()->AddView(filter_view, 0, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL); |
111 | - |
112 | - UpdateDrawSeparators(); |
113 | } |
114 | |
115 | void FilterBar::RemoveFilter(Filter::Ptr const& filter) |
116 | @@ -99,8 +97,6 @@ |
117 | break; |
118 | } |
119 | } |
120 | - |
121 | - UpdateDrawSeparators(); |
122 | } |
123 | |
124 | void FilterBar::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) |
125 | @@ -120,24 +116,6 @@ |
126 | GfxContext.PopClippingRectangle(); |
127 | } |
128 | |
129 | -void FilterBar::UpdateDrawSeparators() |
130 | -{ |
131 | - std::list<Area*> children = GetLayout()->GetChildren(); |
132 | - std::list<Area*>::reverse_iterator rit; |
133 | - bool found_one = false; |
134 | - |
135 | - for (rit = children.rbegin(); rit != children.rend(); ++rit) |
136 | - { |
137 | - FilterExpanderLabel* widget = dynamic_cast<FilterExpanderLabel*>(*rit); |
138 | - |
139 | - if (!widget) |
140 | - continue; |
141 | - |
142 | - widget->draw_separator = found_one; |
143 | - found_one = true; |
144 | - } |
145 | -} |
146 | - |
147 | // |
148 | // Key navigation |
149 | // |
150 | |
151 | === modified file 'dash/FilterBar.h' |
152 | --- dash/FilterBar.h 2012-05-06 23:48:38 +0000 |
153 | +++ dash/FilterBar.h 2012-09-13 15:55:51 +0000 |
154 | @@ -60,7 +60,6 @@ |
155 | |
156 | private: |
157 | void Init(); |
158 | - void UpdateDrawSeparators(); |
159 | |
160 | FilterFactory factory_; |
161 | Filters::Ptr filters_; |
162 | |
163 | === modified file 'dash/LensBar.cpp' |
164 | --- dash/LensBar.cpp 2012-08-09 14:28:50 +0000 |
165 | +++ dash/LensBar.cpp 2012-09-13 15:55:51 +0000 |
166 | @@ -31,7 +31,9 @@ |
167 | |
168 | nux::logging::Logger logger("unity.dash.lensbar"); |
169 | |
170 | -const int LENSBAR_HEIGHT = 44; |
171 | +// according to Q design the inner area of the lensbar should be 40px |
172 | +// (without any borders) |
173 | +const int LENSBAR_HEIGHT = 41; |
174 | |
175 | } |
176 | |
177 | |
178 | === modified file 'dash/LensView.cpp' |
179 | --- dash/LensView.cpp 2012-08-31 15:46:18 +0000 |
180 | +++ dash/LensView.cpp 2012-09-13 15:55:51 +0000 |
181 | @@ -147,7 +147,14 @@ |
182 | lens_->connected.changed.connect([&](bool is_connected) { if (is_connected) initial_activation_ = true; }); |
183 | lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged)); |
184 | search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string)); |
185 | - filters_expanded.changed.connect([&](bool expanded) { fscroll_view_->SetVisible(expanded); QueueRelayout(); OnColumnsChanged(); }); |
186 | + filters_expanded.changed.connect([&](bool expanded) |
187 | + { |
188 | + fscroll_view_->SetVisible(expanded); |
189 | + QueueRelayout(); |
190 | + OnColumnsChanged(); |
191 | + ubus_manager_.SendMessage(UBUS_REFINE_STATUS, |
192 | + g_variant_new(UBUS_REFINE_STATUS_FORMAT_STRING, expanded ? TRUE : FALSE)); |
193 | + }); |
194 | view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged)); |
195 | |
196 | ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [&] (GVariant* data) { |
197 | @@ -189,10 +196,15 @@ |
198 | |
199 | scroll_view_ = new LensScrollView(new PlacesVScrollBar(NUX_TRACKER_LOCATION), |
200 | NUX_TRACKER_LOCATION); |
201 | - scroll_view_->EnableVerticalScrollBar(true); |
202 | + scroll_view_->EnableVerticalScrollBar(false); |
203 | scroll_view_->EnableHorizontalScrollBar(false); |
204 | layout_->AddView(scroll_view_); |
205 | |
206 | + scroll_view_->OnGeometryChanged.connect([this] (nux::Area *area, nux::Geometry& geo) |
207 | + { |
208 | + CheckScrollBarState(); |
209 | + }); |
210 | + |
211 | scroll_layout_ = new nux::VLayout(NUX_TRACKER_LOCATION); |
212 | scroll_view_->SetLayout(scroll_layout_); |
213 | scroll_view_->SetRightArea(show_filters); |
214 | @@ -385,6 +397,8 @@ |
215 | scroll_layout_->AddView(group, 0, nux::MinorDimensionPosition::eAbove, |
216 | nux::MinorDimensionSize::eFull, 100.0f, |
217 | (nux::LayoutPosition)index); |
218 | + |
219 | + group->SetMinimumWidth(GetGeometry().width+20); |
220 | } |
221 | |
222 | void LensView::OnCategoryOrderChanged() |
223 | @@ -612,6 +626,20 @@ |
224 | ResultViewGrid* grid = static_cast<ResultViewGrid*>(group->GetChildView()); |
225 | grid->expanded = group->GetExpanded(); |
226 | ubus_manager_.SendMessage(UBUS_PLACE_VIEW_QUEUE_DRAW); |
227 | + |
228 | + CheckScrollBarState(); |
229 | +} |
230 | + |
231 | +void LensView::CheckScrollBarState() |
232 | +{ |
233 | + if (scroll_layout_->GetGeometry().height > scroll_view_->GetGeometry().height) |
234 | + { |
235 | + scroll_view_->EnableVerticalScrollBar(true); |
236 | + } |
237 | + else |
238 | + { |
239 | + scroll_view_->EnableVerticalScrollBar(false); |
240 | + } |
241 | } |
242 | |
243 | void LensView::OnColumnsChanged() |
244 | |
245 | === modified file 'dash/LensView.h' |
246 | --- dash/LensView.h 2012-08-29 14:50:19 +0000 |
247 | +++ dash/LensView.h 2012-09-13 15:55:51 +0000 |
248 | @@ -88,6 +88,7 @@ |
249 | void OnResultRemoved(Result const& result); |
250 | void UpdateCounts(PlacesGroup* group); |
251 | void OnGroupExpanded(PlacesGroup* group); |
252 | + void CheckScrollBarState(); |
253 | void OnColumnsChanged(); |
254 | void OnFilterAdded(Filter::Ptr filter); |
255 | void OnFilterRemoved(Filter::Ptr filter); |
256 | |
257 | === modified file 'dash/PlacesGroup.cpp' |
258 | --- dash/PlacesGroup.cpp 2012-08-20 16:49:10 +0000 |
259 | +++ dash/PlacesGroup.cpp 2012-09-13 15:55:51 +0000 |
260 | @@ -58,6 +58,7 @@ |
261 | const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 0.5f); |
262 | const float kExpandDefaultIconOpacity = 0.5f; |
263 | |
264 | +const int kCategoryIconSize = 22; |
265 | // Category highlight |
266 | const int kHighlightHeight = 24; |
267 | const int kHighlightRightPadding = 10 - 3; // -3 because the scrollbar is not a real overlay scrollbar! |
268 | @@ -114,7 +115,7 @@ |
269 | PlacesGroup::PlacesGroup() |
270 | : AbstractPlacesGroup(), |
271 | _child_view(nullptr), |
272 | - _is_expanded(true), |
273 | + _is_expanded(false), |
274 | _n_visible_items_in_unexpand_mode(0), |
275 | _n_total_items(0), |
276 | _category_index(0), |
277 | @@ -127,6 +128,21 @@ |
278 | SetAcceptKeyNavFocusOnMouseEnter(false); |
279 | |
280 | nux::BaseTexture* arrow = style.GetGroupUnexpandIcon(); |
281 | + |
282 | + _background = style.GetCategoryBackground(); |
283 | + _background_nofilters = style.GetCategoryBackgroundNoFilters(); |
284 | + |
285 | + nux::ROPConfig rop; |
286 | + rop.Blend = true; |
287 | + rop.SrcBlend = GL_ONE; |
288 | + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
289 | + |
290 | + nux::TexCoordXForm texxform; |
291 | + _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(), |
292 | + texxform, |
293 | + nux::color::White, |
294 | + false, |
295 | + rop)); |
296 | |
297 | _group_layout = new nux::VLayout("", NUX_TRACKER_LOCATION); |
298 | |
299 | @@ -142,8 +158,8 @@ |
300 | _header_layout->SetSpaceBetweenChildren(10); |
301 | _header_view->SetLayout(_header_layout); |
302 | |
303 | - _icon = new IconTexture("", 24); |
304 | - _icon->SetMinMaxSize(24, 24); |
305 | + _icon = new IconTexture("", kCategoryIconSize); |
306 | + _icon->SetMinMaxSize(kCategoryIconSize, kCategoryIconSize); |
307 | _header_layout->AddView(_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); |
308 | |
309 | _text_layout = new nux::HLayout(NUX_TRACKER_LOCATION); |
310 | @@ -176,15 +192,6 @@ |
311 | _expand_icon->SetVisible(false); |
312 | _expand_layout->AddView(_expand_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX); |
313 | |
314 | - separator_layout_ = new nux::HLayout(); |
315 | - separator_layout_->SetLeftAndRightPadding(style.GetCategorySeparatorLeftPadding(), |
316 | - style.GetCategorySeparatorRightPadding() - style.GetScrollbarWidth()); |
317 | - |
318 | - separator_ = new HSeparator; |
319 | - separator_layout_->AddView(separator_, 1); |
320 | - |
321 | - draw_separator.changed.connect(sigc::mem_fun(this, &PlacesGroup::DrawSeparatorChanged)); |
322 | - |
323 | SetLayout(_group_layout); |
324 | |
325 | // don't need to disconnect these signals as they are disconnected when this object destroys the contents |
326 | @@ -206,15 +213,8 @@ |
327 | else |
328 | nux::GetWindowCompositor().SetKeyFocusArea(GetHeaderFocusableView(), direction); |
329 | }); |
330 | -} |
331 | |
332 | -void PlacesGroup::DrawSeparatorChanged(bool draw) |
333 | -{ |
334 | - if (draw and !separator_layout_->IsChildOf(_group_layout)) |
335 | - _group_layout->AddView(separator_layout_.GetPointer(), 0); |
336 | - else if (!draw and separator_layout_->IsChildOf(_group_layout)) |
337 | - _group_layout->RemoveChildObject(separator_layout_.GetPointer()); |
338 | - QueueDraw(); |
339 | + SetMinimumWidth(2000); |
340 | } |
341 | |
342 | void |
343 | @@ -252,7 +252,7 @@ |
344 | |
345 | if (g_strcmp0(renderer_name, "tile-horizontal") == 0) |
346 | (static_cast<dash::ResultView*>(_child_view))->SetModelRenderer(new dash::ResultRendererHorizontalTile(NUX_TRACKER_LOCATION)); |
347 | - else |
348 | + else if (g_strcmp0(renderer_name, "tile-vertical")) |
349 | (static_cast<dash::ResultView*>(_child_view))->SetModelRenderer(new dash::ResultRendererTile(NUX_TRACKER_LOCATION)); |
350 | } |
351 | |
352 | @@ -277,7 +277,7 @@ |
353 | void |
354 | PlacesGroup::SetIcon(std::string const& path_to_emblem) |
355 | { |
356 | - _icon->SetByIconName(path_to_emblem, 24); |
357 | + _icon->SetByIconName(path_to_emblem, kCategoryIconSize); |
358 | } |
359 | |
360 | void |
361 | @@ -395,6 +395,35 @@ |
362 | { |
363 | if (GetChildView()) |
364 | { |
365 | + |
366 | + nux::ROPConfig rop; |
367 | + rop.Blend = true; |
368 | + rop.SrcBlend = GL_ONE; |
369 | + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
370 | + |
371 | + nux::TexCoordXForm texxform; |
372 | + if (_n_visible_items_in_unexpand_mode < 6 && _using_nofilters_background) |
373 | + { |
374 | + LOG_DEBUG(logger) << "drawing unexpanded texture"; |
375 | + _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(), |
376 | + texxform, |
377 | + nux::color::White, |
378 | + false, |
379 | + rop)); |
380 | + _using_nofilters_background = false; |
381 | + } |
382 | + else if (_n_visible_items_in_unexpand_mode >= 6 && !_using_nofilters_background) |
383 | + { |
384 | + LOG_DEBUG(logger) << "drawing expanded texture"; |
385 | + _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(), |
386 | + texxform, |
387 | + nux::color::White, |
388 | + false, |
389 | + rop)); |
390 | + |
391 | + _using_nofilters_background = true; |
392 | + } |
393 | + |
394 | Refresh(); |
395 | QueueDraw(); |
396 | _group_layout->QueueDraw(); |
397 | @@ -416,10 +445,8 @@ |
398 | if (_cached_geometry.GetWidth() != geo.GetWidth()) |
399 | { |
400 | _focus_layer.reset(dash::Style::Instance().FocusOverlay(geo.width - kHighlightLeftPadding - kHighlightRightPadding, kHighlightHeight)); |
401 | - |
402 | _cached_geometry = geo; |
403 | } |
404 | - |
405 | return ret; |
406 | } |
407 | |
408 | @@ -429,6 +456,8 @@ |
409 | nux::Geometry const& base = GetGeometry(); |
410 | graphics_engine.PushClippingRectangle(base); |
411 | |
412 | + LOG_DEBUG(logger) << "places group geo: " << base.width; |
413 | + |
414 | if (ShouldBeHighlighted()) |
415 | { |
416 | nux::Geometry geo(_header_layout->GetGeometry()); |
417 | @@ -439,6 +468,20 @@ |
418 | _focus_layer->Renderlayer(graphics_engine); |
419 | } |
420 | |
421 | + nux::Geometry bg_geo = GetGeometry(); |
422 | + int bg_width = 0; |
423 | + if (_using_nofilters_background) |
424 | + bg_width = _background_nofilters->GetWidth(); |
425 | + else |
426 | + bg_width = _background->GetWidth(); |
427 | + |
428 | + bg_geo.x = std::max(bg_geo.width - bg_width,0); |
429 | + |
430 | + bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 10; |
431 | + bg_geo.height = _background->GetHeight(); |
432 | + |
433 | + _background_layer->SetGeometry(bg_geo); |
434 | + _background_layer->Renderlayer(graphics_engine); |
435 | graphics_engine.PopClippingRectangle(); |
436 | } |
437 | |
438 | @@ -448,7 +491,24 @@ |
439 | nux::Geometry const& base = GetGeometry(); |
440 | |
441 | graphics_engine.PushClippingRectangle(base); |
442 | + nux::Geometry bg_geo = GetGeometry(); |
443 | + |
444 | + int bg_width = 0; |
445 | + if (_using_nofilters_background) |
446 | + bg_width = _background_nofilters->GetWidth(); |
447 | + else |
448 | + bg_width = _background->GetWidth(); |
449 | + |
450 | + // if the dash is smaller, resize to fit, otherwise move to the right edge |
451 | + bg_geo.x = std::max(bg_geo.width - bg_width, 0); |
452 | + bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 10; |
453 | + |
454 | + bg_geo.height = _background->GetHeight(); |
455 | |
456 | + if (!IsFullRedraw()) |
457 | + { |
458 | + nux::GetPainter().PushLayer(graphics_engine, bg_geo, _background_layer.get()); |
459 | + } |
460 | if (ShouldBeHighlighted() && !IsFullRedraw() && _focus_layer) |
461 | { |
462 | nux::GetPainter().PushLayer(graphics_engine, _focus_layer->GetGeometry(), _focus_layer.get()); |
463 | |
464 | === modified file 'dash/PlacesGroup.h' |
465 | --- dash/PlacesGroup.h 2012-08-20 16:49:10 +0000 |
466 | +++ dash/PlacesGroup.h 2012-09-13 15:55:51 +0000 |
467 | @@ -123,8 +123,6 @@ |
468 | nux::HLayout* _expand_label_layout; |
469 | nux::HLayout* _expand_layout; |
470 | nux::View* _child_view; |
471 | - nux::ObjectPtr<nux::HLayout> separator_layout_; |
472 | - HSeparator* separator_; |
473 | std::unique_ptr<nux::AbstractPaintLayer> _focus_layer; |
474 | |
475 | IconTexture* _icon; |
476 | @@ -132,12 +130,16 @@ |
477 | nux::StaticCairoText* _expand_label; |
478 | IconTexture* _expand_icon; |
479 | |
480 | + nux::BaseTexture* _background; |
481 | + nux::BaseTexture* _background_nofilters; |
482 | + bool _using_nofilters_background; |
483 | + std::unique_ptr<nux::AbstractPaintLayer> _background_layer; |
484 | + |
485 | bool _is_expanded; |
486 | unsigned _n_visible_items_in_unexpand_mode; |
487 | unsigned _n_total_items; |
488 | unsigned _category_index; |
489 | std::string _cached_name; |
490 | - bool _draw_sep; |
491 | nux::Geometry _cached_geometry; |
492 | |
493 | std::string _renderer_name; |
494 | |
495 | === modified file 'dash/previews/ActionButton.cpp' |
496 | --- dash/previews/ActionButton.cpp 2012-08-28 08:30:00 +0000 |
497 | +++ dash/previews/ActionButton.cpp 2012-09-13 15:55:51 +0000 |
498 | @@ -29,7 +29,7 @@ |
499 | |
500 | namespace |
501 | { |
502 | -const int kMinButtonHeight = 36; |
503 | +const int kMinButtonHeight = 34; |
504 | const int kMinButtonWidth = 48; |
505 | |
506 | const int icon_size = 24; |
507 | |
508 | === modified file 'dash/previews/PreviewContainer.cpp' |
509 | --- dash/previews/PreviewContainer.cpp 2012-09-04 10:45:31 +0000 |
510 | +++ dash/previews/PreviewContainer.cpp 2012-09-13 15:55:51 +0000 |
511 | @@ -62,6 +62,7 @@ |
512 | PreviewContent(PreviewContainer*const parent) |
513 | : parent_(parent) |
514 | , progress_(0.0) |
515 | + , curve_progress_(0.0) |
516 | , animating_(false) |
517 | , waiting_preview_(false) |
518 | , rotation_(0.0) |
519 | @@ -69,6 +70,11 @@ |
520 | , nav_complete_(0) |
521 | , relative_nav_index_(0) |
522 | { |
523 | + OnGeometryChanged.connect([&](nux::Area*, nux::Geometry& geo) |
524 | + { |
525 | + // Need to update the preview geometries when updating the container geo. |
526 | + UpdateAnimationProgress(progress_, curve_progress_); |
527 | + }); |
528 | Style& style = previews::Style::Instance(); |
529 | |
530 | spin_= style.GetSearchSpinIcon(256); |
531 | @@ -98,6 +104,9 @@ |
532 | |
533 | if (preview) |
534 | { |
535 | + // the parents layout will not change based on the previews. |
536 | + preview->SetReconfigureParentLayoutOnGeometryChange(false); |
537 | + |
538 | AddChild(preview.GetPointer()); |
539 | AddView(preview.GetPointer()); |
540 | preview->SetVisible(false); |
541 | @@ -123,6 +132,7 @@ |
542 | void UpdateAnimationProgress(float progress, float curve_progress) |
543 | { |
544 | progress_ = progress; |
545 | + curve_progress_ = curve_progress; |
546 | |
547 | if (!animating_) |
548 | { |
549 | @@ -171,39 +181,43 @@ |
550 | |
551 | if (progress >= 1.0) |
552 | { |
553 | - animating_ = false; |
554 | - if (current_preview_) |
555 | - { |
556 | - RemoveChild(current_preview_.GetPointer()); |
557 | - RemoveChildObject(current_preview_.GetPointer()); |
558 | - current_preview_.Release(); |
559 | - } |
560 | - if (swipe_.preview) |
561 | - { |
562 | - if (swipe_.direction == Navigation::RIGHT) |
563 | - relative_nav_index_++; |
564 | - else if (swipe_.direction == Navigation::LEFT) |
565 | - relative_nav_index_--; |
566 | - |
567 | - current_preview_ = swipe_.preview; |
568 | - swipe_.preview.Release(); |
569 | + // if we were animating, we need to remove the old preview, and replace it with the new. |
570 | + if (animating_) |
571 | + { |
572 | + animating_ = false; |
573 | if (current_preview_) |
574 | - current_preview_->OnNavigateInComplete(); |
575 | - } |
576 | - |
577 | - // another swipe? |
578 | - if (!push_preview_.empty()) |
579 | - { |
580 | - progress_ = 0; |
581 | - continue_navigation.emit(); |
582 | - } |
583 | - else |
584 | - { |
585 | - end_navigation.emit(); |
586 | + { |
587 | + RemoveChild(current_preview_.GetPointer()); |
588 | + RemoveChildObject(current_preview_.GetPointer()); |
589 | + current_preview_.Release(); |
590 | + } |
591 | + if (swipe_.preview) |
592 | + { |
593 | + if (swipe_.direction == Navigation::RIGHT) |
594 | + relative_nav_index_++; |
595 | + else if (swipe_.direction == Navigation::LEFT) |
596 | + relative_nav_index_--; |
597 | + |
598 | + current_preview_ = swipe_.preview; |
599 | + swipe_.preview.Release(); |
600 | + if (current_preview_) |
601 | + current_preview_->OnNavigateInComplete(); |
602 | + } |
603 | + |
604 | + // another swipe? |
605 | + if (!push_preview_.empty()) |
606 | + { |
607 | + progress_ = 0; |
608 | + continue_navigation.emit(); |
609 | + } |
610 | + else |
611 | + { |
612 | + end_navigation.emit(); |
613 | + } |
614 | } |
615 | |
616 | // set the geometry to the whole layout. |
617 | - if (current_preview_ && current_preview_->GetGeometry() != geometry) |
618 | + if (current_preview_) |
619 | { |
620 | current_preview_->SetGeometry(geometry); |
621 | } |
622 | @@ -309,7 +323,7 @@ |
623 | } |
624 | } |
625 | |
626 | - _queued_draw = false; |
627 | + //_queued_draw = false; |
628 | } |
629 | |
630 | sigc::signal<void> start_navigation; |
631 | @@ -332,6 +346,7 @@ |
632 | PreviewSwipe swipe_; |
633 | |
634 | float progress_; |
635 | + float curve_progress_; |
636 | bool animating_; |
637 | // wait animation |
638 | glib::Source::UniquePtr preview_wait_timer_; |
639 | |
640 | === modified file 'launcher/LauncherController.cpp' |
641 | --- launcher/LauncherController.cpp 2012-09-04 16:40:30 +0000 |
642 | +++ launcher/LauncherController.cpp 2012-09-13 15:55:51 +0000 |
643 | @@ -244,7 +244,7 @@ |
644 | { |
645 | static bool keynav_first_focus = false; |
646 | |
647 | - if (parent_->IsOverlayOpen()) |
648 | + if (parent_->IsOverlayOpen() || launcher_->GetParent()->GetInputWindowId() == xid) |
649 | keynav_first_focus = false; |
650 | |
651 | if (keynav_first_focus) |
652 | |
653 | === modified file 'manual-tests/Dash.txt' |
654 | --- manual-tests/Dash.txt 2012-08-28 12:23:15 +0000 |
655 | +++ manual-tests/Dash.txt 2012-09-13 15:55:51 +0000 |
656 | @@ -100,6 +100,19 @@ |
657 | * When a single row of results isn't enough to contain all returned search results, and there are no other category headers, the displayed category |
658 | header expands automatically |
659 | |
660 | + |
661 | +Test the Panel does not lose track of when the Dash is opened then closed. |
662 | +-------------------------------------------------------------------------- |
663 | +This tests shows the panel will not think the Dash is opened when it is closed. |
664 | +(see lp:1044086) |
665 | + |
666 | +Actions: |
667 | +#. Press Super twice (Quickly) |
668 | + |
669 | +Expected Result: |
670 | + The screen should look the same as if you had never opened the dash. |
671 | + |
672 | + |
673 | Filter Results Tests |
674 | ======================== |
675 | These tests show that the dash "All" button works well. |
676 | |
677 | === modified file 'manual-tests/Preview.txt' |
678 | --- manual-tests/Preview.txt 2012-08-31 14:10:27 +0000 |
679 | +++ manual-tests/Preview.txt 2012-09-13 15:55:51 +0000 |
680 | @@ -5,7 +5,7 @@ |
681 | |
682 | Setup: |
683 | #. Open dash super |
684 | -#. Open a lens which supports previeing (eg Application, Music, File) |
685 | +#. Open a lens which supports previewing (e.g. Application, Music, File) |
686 | #. Enter arbitrary search string and ensure a result is available. |
687 | |
688 | Actions: |
689 | @@ -23,7 +23,7 @@ |
690 | |
691 | Setup: |
692 | #. Open dash super |
693 | -#. Open a lens which supports previeing (eg Application, Music, File) |
694 | +#. Open a lens which supports previewing (e.g. Application, Music, File) |
695 | #. Enter arbitrary search string and ensure at least 2 results are available. |
696 | #. Right-click the mouse on at least the second result. |
697 | #. Wait for the preview window to open and finish animating. |
698 | @@ -32,7 +32,7 @@ |
699 | #. Click the 'navigate left' icon. |
700 | |
701 | Expected Result: |
702 | - The current preview will swipe out and the new prevew result will swipe from right |
703 | + The current preview will swipe out and the new preview result will swipe from right |
704 | to left using an ease in-out curve progression. |
705 | |
706 | |
707 | @@ -43,7 +43,7 @@ |
708 | |
709 | Setup: |
710 | #. Open dash super |
711 | -#. Open a lens which supports previeing (eg Application, Music, File) |
712 | +#. Open a lens which supports previewing (e.g. Application, Music, File) |
713 | #. Enter arbitrary search string and ensure at least 2 results are available. |
714 | #. Right-click the mouse on at most the second last result. |
715 | #. Wait for the preview window to open and finish animating. |
716 | @@ -52,7 +52,7 @@ |
717 | #. Click the navigate right icon. |
718 | |
719 | Expected Result: |
720 | - The current preview will swipe out and the new prevew result will swipe from right |
721 | + The current preview will swipe out and the new preview result will swipe from right |
722 | to left using an ease in-out curve progression. |
723 | |
724 | |
725 | @@ -111,7 +111,7 @@ |
726 | Expected Result: |
727 | When hovering on play icon, it will change to a pause icon. |
728 | Music Player daemon will pause the playing track and update it's status |
729 | - to paused. Progress will stop incresing. |
730 | + to paused. Progress will stop increasing. |
731 | |
732 | |
733 | Preview Application Launch |
734 | @@ -130,3 +130,24 @@ |
735 | |
736 | Expected Result: |
737 | Preview should close and launch the gedit application. |
738 | + |
739 | + |
740 | +Preview Open Geometry |
741 | +------------ |
742 | +This tests the dash preview opens with the correct size and |
743 | +its geometry is updated when changing between form factor (desktop & netbook) |
744 | + |
745 | +Setup: |
746 | +#. Open dash super |
747 | +#. Ensure dash is in windowed mode (not full screen) |
748 | +#. Open a lens which supports previewing (e.g. Application, Music, File) |
749 | +#. Enter arbitrary search string and ensure a result is available. |
750 | + |
751 | +Actions: |
752 | +#. Open preview for result. |
753 | +#. Resize dash to full screen. |
754 | +#. Resize dash back to windowed mode. |
755 | + |
756 | +Expected Result: |
757 | + A preview will open with the correct size initially (no size flicker). |
758 | + When the dash is resized, the preview will center its geometry and stay the correct size. |
759 | |
760 | === modified file 'panel/PanelController.cpp' |
761 | --- panel/PanelController.cpp 2012-07-23 21:50:30 +0000 |
762 | +++ panel/PanelController.cpp 2012-09-13 15:55:51 +0000 |
763 | @@ -53,6 +53,7 @@ |
764 | std::vector<nux::Geometry> GetGeometries() const; |
765 | |
766 | // NOTE: nux::Property maybe? |
767 | + void SetLauncherWidth(int width); |
768 | void SetOpacity(float opacity); |
769 | void SetOpacityMaximizedToggle(bool enabled); |
770 | |
771 | @@ -147,6 +148,14 @@ |
772 | } |
773 | } |
774 | |
775 | +void Controller::Impl::SetLauncherWidth(int width) |
776 | +{ |
777 | + for (auto window: windows_) |
778 | + { |
779 | + ViewForWindow(window)->SetLauncherWidth(width); |
780 | + } |
781 | +} |
782 | + |
783 | void Controller::Impl::SetOpacityMaximizedToggle(bool enabled) |
784 | { |
785 | opacity_maximized_toggle_ = enabled; |
786 | @@ -297,6 +306,11 @@ |
787 | UScreen* screen = UScreen::GetDefault(); |
788 | screen->changed.connect(sigc::mem_fun(this, &Controller::OnScreenChanged)); |
789 | OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors()); |
790 | + |
791 | + launcher_width.changed.connect([&] (int width) |
792 | + { |
793 | + pimpl->SetLauncherWidth(width); |
794 | + }); |
795 | } |
796 | |
797 | Controller::~Controller() |
798 | |
799 | === modified file 'panel/PanelController.h' |
800 | --- panel/PanelController.h 2012-06-19 08:52:39 +0000 |
801 | +++ panel/PanelController.h 2012-09-13 15:55:51 +0000 |
802 | @@ -44,6 +44,8 @@ |
803 | std::vector<nux::View*> GetPanelViews() const; |
804 | std::vector<nux::Geometry> GetGeometries() const; |
805 | |
806 | + nux::Property<int> launcher_width; |
807 | + |
808 | // NOTE: nux::Property maybe? |
809 | void SetOpacity(float opacity); |
810 | void SetOpacityMaximizedToggle(bool enabled); |
811 | |
812 | === modified file 'panel/PanelView.cpp' |
813 | --- panel/PanelView.cpp 2012-07-26 09:56:17 +0000 |
814 | +++ panel/PanelView.cpp 2012-09-13 15:55:51 +0000 |
815 | @@ -44,7 +44,8 @@ |
816 | |
817 | namespace |
818 | { |
819 | -nux::logging::Logger logger("unity.PanelView"); |
820 | +nux::logging::Logger logger("unity.panel.view"); |
821 | +const int refine_gradient_midpoint = 959; |
822 | } |
823 | |
824 | namespace unity |
825 | @@ -61,6 +62,8 @@ |
826 | , _overlay_is_open(false) |
827 | , _opacity(1.0f) |
828 | , _monitor(0) |
829 | + , _stored_dash_width(0) |
830 | + , _launcher_width(0) |
831 | { |
832 | panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground)); |
833 | |
834 | @@ -98,7 +101,47 @@ |
835 | _ubus_manager.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED, sigc::mem_fun(this, &PanelView::OnBackgroundUpdate)); |
836 | _ubus_manager.RegisterInterest(UBUS_OVERLAY_HIDDEN, sigc::mem_fun(this, &PanelView::OnOverlayHidden)); |
837 | _ubus_manager.RegisterInterest(UBUS_OVERLAY_SHOWN, sigc::mem_fun(this, &PanelView::OnOverlayShown)); |
838 | - |
839 | + _ubus_manager.RegisterInterest(UBUS_DASH_SIZE_CHANGED, [&] (GVariant *data) |
840 | + { |
841 | + int width, height; |
842 | + g_variant_get(data, "(ii)", &width, &height); |
843 | + _stored_dash_width = width; |
844 | + QueueDraw(); |
845 | + }); |
846 | + |
847 | + _ubus_manager.RegisterInterest(UBUS_REFINE_STATUS, [this] (GVariant *data) |
848 | + { |
849 | + gboolean status; |
850 | + g_variant_get(data, UBUS_REFINE_STATUS_FORMAT_STRING, &status); |
851 | + |
852 | + _refine_is_open = status; |
853 | + |
854 | + nux::ROPConfig rop; |
855 | + rop.Blend = true; |
856 | + rop.SrcBlend = GL_ONE; |
857 | + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
858 | + |
859 | + nux::TexCoordXForm texxform; |
860 | + if (_refine_is_open) |
861 | + { |
862 | + _bg_refine_layer.reset(new nux::TextureLayer(_bg_refine_tex->GetDeviceTexture(), |
863 | + texxform, |
864 | + nux::color::White, |
865 | + false, |
866 | + rop)); |
867 | + } |
868 | + else |
869 | + { |
870 | + _bg_refine_layer.reset(new nux::TextureLayer(_bg_refine_no_refine_tex->GetDeviceTexture(), |
871 | + texxform, |
872 | + nux::color::White, |
873 | + false, |
874 | + rop)); |
875 | + |
876 | + } |
877 | + QueueDraw(); |
878 | + }); |
879 | + |
880 | // request the latest colour from bghash |
881 | _ubus_manager.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT); |
882 | |
883 | @@ -116,6 +159,61 @@ |
884 | { |
885 | _panel_sheen.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true)); |
886 | } |
887 | + |
888 | + //FIXME (gord) like 12 months later, still not async loading! |
889 | + pixbuf = gdk_pixbuf_new_from_file(PKGDATADIR "/refine_gradient_panel.png", &error); |
890 | + if (error) |
891 | + { |
892 | + LOG_WARN(logger) << "Unable to texture " << PKGDATADIR << "/refine_gradient_panel.png"; |
893 | + } |
894 | + else |
895 | + { |
896 | + _bg_refine_tex.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true)); |
897 | + } |
898 | + |
899 | + //FIXME (gord) like 12 months later, still not async loading! |
900 | + pixbuf = gdk_pixbuf_new_from_file(PKGDATADIR "/refine_gradient_panel_no_refine.png", &error); |
901 | + if (error) |
902 | + { |
903 | + LOG_WARN(logger) << "Unable to texture " << PKGDATADIR << "/refine_gradient_panel_no_refine.png"; |
904 | + } |
905 | + else |
906 | + { |
907 | + _bg_refine_no_refine_tex.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true)); |
908 | + } |
909 | + |
910 | + rop.Blend = true; |
911 | + rop.SrcBlend = GL_ONE; |
912 | + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
913 | + |
914 | + nux::TexCoordXForm texxform; |
915 | + _bg_refine_layer.reset(new nux::TextureLayer(_bg_refine_tex->GetDeviceTexture(), |
916 | + texxform, |
917 | + nux::color::White, |
918 | + false, |
919 | + rop)); |
920 | + |
921 | + //FIXME (gord) like 12 months later, still not async loading! |
922 | + pixbuf = gdk_pixbuf_new_from_file(PKGDATADIR "/refine_gradient_panel_single_column.png", &error); |
923 | + if (error) |
924 | + { |
925 | + LOG_WARN(logger) << "Unable to texture " << PKGDATADIR << "/refine_gradient_panel_single_column.png"; |
926 | + } |
927 | + else |
928 | + { |
929 | + _bg_refine_single_column_tex.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true)); |
930 | + } |
931 | + |
932 | + rop.Blend = true; |
933 | + rop.SrcBlend = GL_ONE; |
934 | + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
935 | + |
936 | + _bg_refine_single_column_layer.reset(new nux::TextureLayer(_bg_refine_single_column_tex->GetDeviceTexture(), |
937 | + texxform, |
938 | + nux::color::White, |
939 | + false, |
940 | + rop)); |
941 | + |
942 | } |
943 | |
944 | PanelView::~PanelView() |
945 | @@ -138,6 +236,12 @@ |
946 | return _tray->xid(); |
947 | } |
948 | |
949 | +void PanelView::SetLauncherWidth(int width) |
950 | +{ |
951 | + _launcher_width = width; |
952 | + QueueDraw(); |
953 | +} |
954 | + |
955 | void PanelView::OnBackgroundUpdate(GVariant *data) |
956 | { |
957 | gdouble red, green, blue, alpha; |
958 | @@ -219,6 +323,7 @@ |
959 | void |
960 | PanelView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) |
961 | { |
962 | + LOG_DEBUG(logger) << "test"; |
963 | nux::Geometry const& geo = GetGeometry(); |
964 | UpdateBackground(); |
965 | |
966 | @@ -285,6 +390,28 @@ |
967 | if (_overlay_is_open) |
968 | { |
969 | nux::GetPainter().RenderSinglePaintLayer(GfxContext, geo, _bg_darken_layer.get()); |
970 | + |
971 | + GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |
972 | + nux::TexCoordXForm refine_texxform; |
973 | + |
974 | + int refine_x_pos = geo.x + (_stored_dash_width - refine_gradient_midpoint); |
975 | + |
976 | + refine_x_pos += _launcher_width; |
977 | + GfxContext.QRP_1Tex(refine_x_pos, |
978 | + geo.y, |
979 | + _bg_refine_tex->GetWidth(), |
980 | + _bg_refine_tex->GetHeight(), |
981 | + _bg_refine_tex->GetDeviceTexture(), |
982 | + refine_texxform, |
983 | + nux::color::White); |
984 | + |
985 | + GfxContext.QRP_1Tex(refine_x_pos + _bg_refine_tex->GetWidth(), |
986 | + geo.y, |
987 | + geo.width, |
988 | + geo.height, |
989 | + _bg_refine_single_column_tex->GetDeviceTexture(), |
990 | + refine_texxform, |
991 | + nux::color::White); |
992 | } |
993 | } |
994 | |
995 | @@ -360,6 +487,24 @@ |
996 | { |
997 | nux::GetPainter().PushLayer(GfxContext, geo, _bg_darken_layer.get()); |
998 | bgs++; |
999 | + |
1000 | + nux::Geometry refine_geo = geo; |
1001 | + |
1002 | + int refine_x_pos = geo.x + (_stored_dash_width - refine_gradient_midpoint); |
1003 | + refine_x_pos += _launcher_width; |
1004 | + |
1005 | + refine_geo.x = refine_x_pos; |
1006 | + refine_geo.width = _bg_refine_tex->GetWidth(); |
1007 | + refine_geo.height = _bg_refine_tex->GetHeight(); |
1008 | + |
1009 | + nux::GetPainter().PushLayer(GfxContext, refine_geo, _bg_refine_layer.get()); |
1010 | + bgs++; |
1011 | + |
1012 | + refine_geo.x += refine_geo.width; |
1013 | + refine_geo.width = geo.width; |
1014 | + refine_geo.height = geo.height; |
1015 | + nux::GetPainter().PushLayer(GfxContext, refine_geo, _bg_refine_single_column_layer.get()); |
1016 | + bgs++; |
1017 | } |
1018 | } |
1019 | |
1020 | |
1021 | === modified file 'panel/PanelView.h' |
1022 | --- panel/PanelView.h 2012-07-04 02:37:23 +0000 |
1023 | +++ panel/PanelView.h 2012-09-13 15:55:51 +0000 |
1024 | @@ -64,6 +64,8 @@ |
1025 | |
1026 | Window GetTrayXid() const; |
1027 | |
1028 | + void SetLauncherWidth(int width); |
1029 | + |
1030 | protected: |
1031 | void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); |
1032 | void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw); |
1033 | @@ -105,6 +107,12 @@ |
1034 | nux::ObjectPtr<nux::BaseTexture> _panel_sheen; |
1035 | nux::HLayout* _layout; |
1036 | |
1037 | + nux::ObjectPtr <nux::BaseTexture> _bg_refine_tex; |
1038 | + nux::ObjectPtr <nux::BaseTexture> _bg_refine_no_refine_tex; |
1039 | + |
1040 | + std::unique_ptr<nux::AbstractPaintLayer> _bg_refine_layer; |
1041 | + nux::ObjectPtr <nux::BaseTexture> _bg_refine_single_column_tex; |
1042 | + std::unique_ptr<nux::AbstractPaintLayer> _bg_refine_single_column_layer; |
1043 | nux::Geometry _last_geo; |
1044 | |
1045 | nux::Color _bg_color; |
1046 | @@ -115,6 +123,9 @@ |
1047 | bool _overlay_is_open; |
1048 | float _opacity; |
1049 | int _monitor; |
1050 | + int _stored_dash_width; |
1051 | + int _launcher_width; |
1052 | + bool _refine_is_open; |
1053 | |
1054 | std::string _active_overlay; |
1055 | |
1056 | |
1057 | === modified file 'panel/StandalonePanel.cpp' |
1058 | --- panel/StandalonePanel.cpp 2012-08-15 02:51:33 +0000 |
1059 | +++ panel/StandalonePanel.cpp 2012-09-13 15:55:51 +0000 |
1060 | @@ -18,11 +18,12 @@ |
1061 | * |
1062 | */ |
1063 | |
1064 | -#include "Nux/Nux.h" |
1065 | -#include "Nux/VLayout.h" |
1066 | -#include "Nux/HLayout.h" |
1067 | -#include "Nux/WindowThread.h" |
1068 | -#include "NuxGraphics/GraphicsEngine.h" |
1069 | +#include <Nux/Nux.h> |
1070 | +#include <Nux/VLayout.h> |
1071 | +#include <Nux/HLayout.h> |
1072 | +#include <Nux/WindowThread.h> |
1073 | +#include <NuxGraphics/GraphicsEngine.h> |
1074 | +#include <NuxCore/Logger.h> |
1075 | #include <gtk/gtk.h> |
1076 | |
1077 | #include "unity-shared/UnitySettings.h" |
1078 | @@ -47,7 +48,8 @@ |
1079 | g_type_init(); |
1080 | gtk_init(&argc, &argv); |
1081 | nux::NuxInitialize(0); |
1082 | - |
1083 | + nux::logging::configure_logging(::getenv("UNITY_LOG_SEVERITY")); |
1084 | + |
1085 | // The instances for the pseudo-singletons. |
1086 | unity::Settings settings; |
1087 | unity::panel::Style panel_style; |
1088 | |
1089 | === added file 'plugins/unityshell/resources/category_gradient.png' |
1090 | Binary files plugins/unityshell/resources/category_gradient.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/category_gradient.png 2012-09-13 15:55:51 +0000 differ |
1091 | === added file 'plugins/unityshell/resources/category_gradient_no_refine.png' |
1092 | Binary files plugins/unityshell/resources/category_gradient_no_refine.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/category_gradient_no_refine.png 2012-09-13 15:55:51 +0000 differ |
1093 | === modified file 'plugins/unityshell/resources/lens-nav-app.svg' |
1094 | --- plugins/unityshell/resources/lens-nav-app.svg 2011-06-30 17:24:25 +0000 |
1095 | +++ plugins/unityshell/resources/lens-nav-app.svg 2012-09-13 15:55:51 +0000 |
1096 | @@ -1,17 +1,17 @@ |
1097 | <?xml version="1.0" encoding="utf-8"?> |
1098 | -<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> |
1099 | +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
1100 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
1101 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
1102 | width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> |
1103 | -<g> |
1104 | - <g> |
1105 | - <path fill="#FFFFFF" d="M9.5,21c0,0.55,0.45,1,1,1h3c0.55,0,1-0.45,1-1V8h-5V21z M6.5,2H3.501c-0.55,0-1,0.45-1,1L2.5,21 |
1106 | - c0,0.55,0.45,1,1,1h2.999c0.55,0,1-0.45,1-1v-2.969H5.5v-1h1.999V14H5.5v-1h2v-3h-2V9h2V6h-2V5h2V3C7.5,2.45,7.05,2,6.5,2z |
1107 | - M7.5,10V9V10L7.5,10z M7.5,14v-1h0L7.5,14L7.5,14z M7.5,18.031v-1H7.499L7.5,18.031L7.5,18.031z M19,8.015 |
1108 | - c1.104,0,2.5-1.119,2.5-2.5c0-0.933-1.408-2.79-2-3.515v1.515c0.293,0.174,0.5,0.48,0.5,0.847c0,0.553-0.447,1-1,1s-1-0.447-1-1 |
1109 | - c0-0.366,0.207-0.673,0.5-0.847V2c-0.592,0.725-2,2.582-2,3.515C16.5,6.896,17.896,8.015,19,8.015z M9.438,7H14.5l-2.531-5 |
1110 | - L9.438,7z M16.5,21c0,0.55,0.45,1,1,1h3c0.55,0,1-0.45,1-1V9h-5V21z"/> |
1111 | - </g> |
1112 | -</g> |
1113 | +<path fill="#FFFFFF" d="M14,8v12c0,0.55-0.45,1-1,1h-2c-0.55,0-1-0.45-1-1V8H14z"/> |
1114 | +<path fill="#FFFFFF" d="M8,11H6v-1h2V8H6V7h2V4c0-0.55-0.45-1-1-1H5.001c-0.55,0-1,0.45-1,1L4,20c0,0.55,0.45,1,1,1h2 |
1115 | + c0.55,0,1-0.45,1-1v-3H6v-1h2v-2H6v-1h2V11z"/> |
1116 | +<path fill="#FFFFFF" d="M8,8L8,8V7l0,0V8z"/> |
1117 | +<path fill="#FFFFFF" d="M18.366,3v1.542C18.602,4.681,18.8,4.925,18.8,5.217c0,0.441-0.358,0.799-0.8,0.799s-0.8-0.358-0.8-0.799 |
1118 | + c0-0.292,0.198-0.537,0.433-0.675V3C17.16,3.578,16,5.26,16,6.005C16,7.106,17.116,8,18,8s2-0.894,2-1.995 |
1119 | + C20,5.26,18.84,3.578,18.366,3z"/> |
1120 | +<path fill="#FFFFFF" d="M20,9v11c0,0.55-0.45,1-1,1h-2c-0.55,0-1-0.45-1-1V9H20z"/> |
1121 | +<path fill="#FFFFFF" d="M12.552,3.991c0.191,0.349,0.378,0.7,0.56,1.056c0.182,0.355,0.349,0.701,0.502,1.038 |
1122 | + C13.766,6.42,13.895,6.726,14,7h-4c0.105-0.262,0.234-0.561,0.387-0.897c0.153-0.336,0.318-0.682,0.495-1.038 |
1123 | + c0.177-0.354,0.36-0.71,0.552-1.065c0.191-0.355,0.377-0.688,0.559-1C12.175,3.312,12.36,3.642,12.552,3.991z"/> |
1124 | </svg> |
1125 | - |
1126 | \ No newline at end of file |
1127 | |
1128 | === modified file 'plugins/unityshell/resources/lens-nav-file.svg' |
1129 | --- plugins/unityshell/resources/lens-nav-file.svg 2011-06-30 17:24:25 +0000 |
1130 | +++ plugins/unityshell/resources/lens-nav-file.svg 2012-09-13 15:55:51 +0000 |
1131 | @@ -1,13 +1,8 @@ |
1132 | <?xml version="1.0" encoding="utf-8"?> |
1133 | -<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> |
1134 | +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
1135 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
1136 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
1137 | width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> |
1138 | -<g> |
1139 | - <g> |
1140 | - <path fill="#FFFFFF" d="M14.969,2H14v6h6V7L14.969,2z M13,2H5C4.45,2,4,2.45,4,3v18c0,0.55,0.45,1,1,1h14c0.551,0,1-0.45,1-1 |
1141 | - V9.007h-7V2z"/> |
1142 | - </g> |
1143 | -</g> |
1144 | +<path fill="#FFFFFF" d="M15,3v4h4V6l-3.031-3H15z"/> |
1145 | +<path fill="#FFFFFF" d="M18,21H6c-0.55,0-1-0.45-1-1V4c0-0.55,0.45-1,1-1h8v5.007h5V20C19,20.55,18.551,21,18,21z"/> |
1146 | </svg> |
1147 | - |
1148 | \ No newline at end of file |
1149 | |
1150 | === added file 'plugins/unityshell/resources/lens-nav-gwibber.svg' |
1151 | --- plugins/unityshell/resources/lens-nav-gwibber.svg 1970-01-01 00:00:00 +0000 |
1152 | +++ plugins/unityshell/resources/lens-nav-gwibber.svg 2012-09-13 15:55:51 +0000 |
1153 | @@ -0,0 +1,14 @@ |
1154 | +<?xml version="1.0" encoding="utf-8"?> |
1155 | +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
1156 | +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
1157 | +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
1158 | + width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> |
1159 | +<path fill="#FFFFFF" d="M23,11.38c-0.774,0.14-1.897-0.005-2.492-0.267c1.236-0.108,2.073-0.701,2.396-1.505 |
1160 | + c-0.445,0.29-1.829,0.604-2.593,0.304c-0.038-0.189-0.078-0.369-0.121-0.533c-0.581-2.256-2.576-4.074-4.663-3.854 |
1161 | + c0.169-0.073,0.34-0.139,0.512-0.2c0.229-0.087,1.577-0.318,1.365-0.82c-0.179-0.442-1.828,0.332-2.138,0.435 |
1162 | + c0.41-0.162,1.087-0.441,1.159-0.939c-0.627,0.091-1.243,0.404-1.72,0.86c0.173-0.195,0.304-0.432,0.331-0.689 |
1163 | + c-1.675,1.129-2.652,3.405-3.443,5.613c-0.621-0.637-1.173-1.136-1.667-1.416C8.541,7.584,6.883,6.766,4.282,5.746 |
1164 | + c-0.08,0.909,0.426,2.118,1.881,2.92C5.848,8.621,5.271,8.722,4.811,8.838c0.188,1.042,0.801,1.899,2.463,2.312 |
1165 | + c-0.759,0.053-1.153,0.237-1.508,0.629c0.346,0.725,1.191,1.576,2.708,1.401c-1.689,0.769-0.688,2.19,0.686,1.979 |
1166 | + C6.817,17.715,3.122,17.525,1,15.39c5.539,7.969,17.581,4.712,19.374-2.963C21.721,12.438,22.51,11.936,23,11.38z"/> |
1167 | +</svg> |
1168 | |
1169 | === modified file 'plugins/unityshell/resources/lens-nav-home.svg' |
1170 | --- plugins/unityshell/resources/lens-nav-home.svg 2011-06-30 17:24:25 +0000 |
1171 | +++ plugins/unityshell/resources/lens-nav-home.svg 2012-09-13 15:55:51 +0000 |
1172 | @@ -1,9 +1,9 @@ |
1173 | <?xml version="1.0" encoding="utf-8"?> |
1174 | -<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> |
1175 | +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
1176 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
1177 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
1178 | width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> |
1179 | -<path fill="#FFFFFF" d="M12.707,2.298C12.513,2.1,12.256,2,12,2s-0.513,0.1-0.707,0.298L2,11.788h2v9.191C4,21.539,4.45,22,5,22 |
1180 | - h5.02v-6.127h3.968V22H19c0.55,0,1-0.461,1-1.021v-9.191h2L12.707,2.298z"/> |
1181 | +<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M12.678,3.268C12.5,3.089,12.266,3,12.031,3 |
1182 | + c-0.235,0-0.47,0.089-0.647,0.268L3,12h2v8c0,0.553,0.447,1,1,1h12c0.553,0,1-0.447,1-1v-8h2L12.678,3.268z M14,20.998h-4v-5h4 |
1183 | + V20.998z"/> |
1184 | </svg> |
1185 | - |
1186 | \ No newline at end of file |
1187 | |
1188 | === modified file 'plugins/unityshell/resources/lens-nav-music.svg' |
1189 | --- plugins/unityshell/resources/lens-nav-music.svg 2011-06-30 17:24:25 +0000 |
1190 | +++ plugins/unityshell/resources/lens-nav-music.svg 2012-09-13 15:55:51 +0000 |
1191 | @@ -1,16 +1,11 @@ |
1192 | <?xml version="1.0" encoding="utf-8"?> |
1193 | -<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> |
1194 | +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
1195 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
1196 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
1197 | width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> |
1198 | -<g> |
1199 | - <g> |
1200 | - <path fill="#FFFFFF" d="M21,2.85c0-0.55-0.443-0.927-0.986-0.837L9.986,3.687C9.444,3.776,9,4.301,9,4.851v10.268l0.02,0.026 |
1201 | - c-1.062-0.301-2.393-0.131-3.61,0.578c-2.025,1.178-2.956,3.379-2.079,4.911s3.232,1.819,5.258,0.637 |
1202 | - c1.437-0.835,2.307-2.182,2.389-3.441l0.022,0.03V7.155c0-0.55,0.444-1.075,0.986-1.165l6.028-1.006 |
1203 | - C18.557,4.894,19,5.271,19,5.821v7.296l0.02,0.026c-1.062-0.3-2.393-0.131-3.609,0.578c-2.025,1.179-2.957,3.379-2.079,4.911 |
1204 | - c0.877,1.533,3.231,1.82,5.257,0.638c1.438-0.835,2.308-2.183,2.39-3.442L21,15.859V2.85z"/> |
1205 | - </g> |
1206 | -</g> |
1207 | +<path fill="#FFFFFF" d="M19.964,14.964L20,15V3.849c0-0.55-0.444-0.926-0.986-0.835l-8.027,1.67C10.444,4.774,10,5.299,10,5.849 |
1208 | + v9.603c-0.984-0.633-2.52-0.61-3.892,0.172c-1.772,1.009-2.587,2.895-1.819,4.207c0.767,1.312,2.828,1.559,4.6,0.545 |
1209 | + c1.441-0.819,2.232-2.213,2.074-3.412L11,17V6.849c0-0.55,0.444-1.075,0.986-1.167l6.028-1.365C18.557,4.224,19,4.599,19,5.148 |
1210 | + v8.302c-0.984-0.632-2.521-0.609-3.891,0.174c-1.773,1.01-2.588,2.894-1.82,4.206c0.768,1.312,2.828,1.56,4.601,0.546 |
1211 | + C19.331,17.557,20.122,16.163,19.964,14.964z"/> |
1212 | </svg> |
1213 | - |
1214 | \ No newline at end of file |
1215 | |
1216 | === modified file 'plugins/unityshell/resources/lens-nav-photo.svg' |
1217 | --- plugins/unityshell/resources/lens-nav-photo.svg 2011-06-30 17:24:25 +0000 |
1218 | +++ plugins/unityshell/resources/lens-nav-photo.svg 2012-09-13 15:55:51 +0000 |
1219 | @@ -1,16 +1,11 @@ |
1220 | <?xml version="1.0" encoding="utf-8"?> |
1221 | -<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> |
1222 | +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
1223 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
1224 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
1225 | width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> |
1226 | -<g> |
1227 | - <g> |
1228 | - <path fill="#FFFFFF" d="M12.009,9.51c-2.218,0-4.016,1.797-4.016,4.013s1.798,4.013,4.016,4.013s4.016-1.797,4.016-4.013 |
1229 | - S14.227,9.51,12.009,9.51z M21,6.511H3c-0.55,0-1,0.45-1,0.999v11.991c0,0.55,0.45,0.999,1,0.999h18c0.55,0,1-0.449,1-0.999V7.51 |
1230 | - C22,6.961,21.55,6.511,21,6.511z M12,19.501c-3.313,0-6-2.684-6-5.995c0-3.312,2.687-5.996,6-5.996s6,2.684,6,5.996 |
1231 | - C18,16.817,15.313,19.501,12,19.501z M15.664,5.55l-0.368-1.102C15.122,3.927,14.53,3.5,13.979,3.5h-4 |
1232 | - c-0.55,0-1.142,0.427-1.316,0.948L8.296,5.55C8.122,6.071,7.53,6.498,6.98,6.498h10C16.431,6.498,15.838,6.071,15.664,5.55z"/> |
1233 | - </g> |
1234 | -</g> |
1235 | +<path fill="#FFFFFF" d="M16,13.5c0,2.21-1.79,4-4,4s-4-1.79-4-4s1.79-4,4-4S16,11.29,16,13.5z"/> |
1236 | +<path fill="#FFFFFF" d="M20,7.5h-3c-0.55,0-1.162-0.433-1.336-0.956l-0.368-1.103C15.122,4.92,14.55,4.5,14,4.5h-4 |
1237 | + c-0.55,0-1.162,0.42-1.337,0.942L8.296,6.544C8.122,7.067,7.55,7.5,7,7.5H4c-0.55,0-1,0.45-1,1v10c0,0.551,0.45,1,1,1h16 |
1238 | + c0.55,0,1-0.449,1-1v-10C21,7.95,20.55,7.5,20,7.5z M12,18.5c-2.762,0-5-2.238-5-5c0-2.763,2.238-5,5-5c2.761,0,5,2.237,5,5 |
1239 | + C17,16.262,14.761,18.5,12,18.5z"/> |
1240 | </svg> |
1241 | - |
1242 | \ No newline at end of file |
1243 | |
1244 | === modified file 'plugins/unityshell/resources/lens-nav-video.svg' |
1245 | --- plugins/unityshell/resources/lens-nav-video.svg 2011-06-30 17:24:25 +0000 |
1246 | +++ plugins/unityshell/resources/lens-nav-video.svg 2012-09-13 15:55:51 +0000 |
1247 | @@ -1,14 +1,13 @@ |
1248 | <?xml version="1.0" encoding="utf-8"?> |
1249 | -<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> |
1250 | +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
1251 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
1252 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
1253 | width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> |
1254 | -<g> |
1255 | - <g> |
1256 | - <path fill="#FFFFFF" d="M21,4H3C2.45,4,2,4.45,2,5v14c0,0.55,0.45,1,1,1h18c0.55,0,1-0.45,1-1V5C22,4.45,21.55,4,21,4z M5,19H3v-2 |
1257 | - h2V19z M5,16H3v-2h2V16z M5,13H3v-2h2V13z M5,10H3V8h2V10z M5,7H3V5h2V7z M9,15.98V8l7.036,4L9,15.98z M21,19h-2v-2h2V19z M21,16 |
1258 | - h-2v-2h2V16z M21,13h-2v-2h2V13z M21,10h-2V8h2V10z M21,7h-2V5h2V7z"/> |
1259 | - </g> |
1260 | -</g> |
1261 | +<path fill="#FFFFFF" d="M20,4.5H4c-0.532,0-1,0.467-1,1v13c0,0.533,0.468,1,1,1h16c0.533,0,1-0.467,1-1v-13 |
1262 | + C21,4.967,20.533,4.5,20,4.5z M5.5,18.5h-1v-1h1V18.5z M5.5,16.5h-1v-1h1V16.5z M5.5,14.5h-1v-1h1V14.5z M5.5,12.5h-1v-1h1V12.5z |
1263 | + M5.5,10.5h-1v-1h1V10.5z M5.5,8.5h-1v-1h1V8.5z M5.5,6.5h-1v-1h1V6.5z M14.267,13.241c-0.61,0.431-1.226,0.85-1.849,1.259 |
1264 | + c-0.621,0.408-1.226,0.785-1.815,1.129C10.015,15.973,9.479,16.263,9,16.5v-9c0.458,0.236,0.981,0.527,1.57,0.871 |
1265 | + c0.588,0.343,1.194,0.715,1.816,1.113c0.621,0.398,1.243,0.812,1.864,1.242c0.622,0.429,1.205,0.849,1.75,1.257 |
1266 | + C15.455,12.392,14.877,12.812,14.267,13.241z M19.5,18.5h-1v-1h1V18.5z M19.5,16.5h-1v-1h1V16.5z M19.5,14.5h-1v-1h1V14.5z |
1267 | + M19.5,12.5h-1v-1h1V12.5z M19.5,10.5h-1v-1h1V10.5z M19.5,8.5h-1v-1h1V8.5z M19.5,6.5h-1v-1h1V6.5z"/> |
1268 | </svg> |
1269 | - |
1270 | \ No newline at end of file |
1271 | |
1272 | === added file 'plugins/unityshell/resources/refine_gradient.png' |
1273 | Binary files plugins/unityshell/resources/refine_gradient.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/refine_gradient.png 2012-09-13 15:55:51 +0000 differ |
1274 | === added file 'plugins/unityshell/resources/refine_gradient_corner.png' |
1275 | Binary files plugins/unityshell/resources/refine_gradient_corner.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/refine_gradient_corner.png 2012-09-13 15:55:51 +0000 differ |
1276 | === added file 'plugins/unityshell/resources/refine_gradient_dash.png' |
1277 | Binary files plugins/unityshell/resources/refine_gradient_dash.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/refine_gradient_dash.png 2012-09-13 15:55:51 +0000 differ |
1278 | === added file 'plugins/unityshell/resources/refine_gradient_dash_no_refine.png' |
1279 | Binary files plugins/unityshell/resources/refine_gradient_dash_no_refine.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/refine_gradient_dash_no_refine.png 2012-09-13 15:55:51 +0000 differ |
1280 | === added file 'plugins/unityshell/resources/refine_gradient_no_refine_dash.png' |
1281 | Binary files plugins/unityshell/resources/refine_gradient_no_refine_dash.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/refine_gradient_no_refine_dash.png 2012-09-13 15:55:51 +0000 differ |
1282 | === added file 'plugins/unityshell/resources/refine_gradient_panel.png' |
1283 | Binary files plugins/unityshell/resources/refine_gradient_panel.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/refine_gradient_panel.png 2012-09-13 15:55:51 +0000 differ |
1284 | === added file 'plugins/unityshell/resources/refine_gradient_panel_single_column.png' |
1285 | Binary files plugins/unityshell/resources/refine_gradient_panel_single_column.png 1970-01-01 00:00:00 +0000 and plugins/unityshell/resources/refine_gradient_panel_single_column.png 2012-09-13 15:55:51 +0000 differ |
1286 | === modified file 'plugins/unityshell/src/unityshell.cpp' |
1287 | --- plugins/unityshell/src/unityshell.cpp 2012-09-07 12:40:24 +0000 |
1288 | +++ plugins/unityshell/src/unityshell.cpp 2012-09-13 15:55:51 +0000 |
1289 | @@ -131,7 +131,6 @@ |
1290 | , panel_texture_has_changed_(true) |
1291 | , paint_panel_(false) |
1292 | , scale_just_activated_(false) |
1293 | - , scale_highlighted_window_(0) |
1294 | , minimize_speed_controller(new WindowMinimizeSpeedController()) |
1295 | { |
1296 | Timer timer; |
1297 | @@ -359,7 +358,7 @@ |
1298 | g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING, |
1299 | &overlay_identity, &can_maximise, &overlay_monitor); |
1300 | |
1301 | - dash_monitor_ = overlay_monitor; |
1302 | + overlay_monitor_ = overlay_monitor; |
1303 | |
1304 | RaiseInputWindows(); |
1305 | }); |
1306 | @@ -370,7 +369,6 @@ |
1307 | } |
1308 | |
1309 | panel::Style::Instance().changed.connect(sigc::mem_fun(this, &UnityScreen::OnPanelStyleChanged)); |
1310 | - WindowManager::Default()->terminate_spread.connect([this] { scale_highlighted_window_ = 0; }); |
1311 | |
1312 | minimize_speed_controller->DurationChanged.connect( |
1313 | sigc::mem_fun(this, &UnityScreen::OnMinimizeDurationChanged) |
1314 | @@ -571,7 +569,7 @@ |
1315 | i++; |
1316 | } |
1317 | |
1318 | - if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_) |
1319 | + if (!(launcher_controller_->IsOverlayOpen() && current_monitor == overlay_monitor_) |
1320 | && panel_controller_->opacity() > 0.0f) |
1321 | { |
1322 | foreach(GLTexture * tex, _shadow_texture) |
1323 | @@ -1379,14 +1377,17 @@ |
1324 | void UnityScreen::handleEvent(XEvent* event) |
1325 | { |
1326 | bool skip_other_plugins = false; |
1327 | + auto wm = PluginAdapter::Default(); |
1328 | + |
1329 | switch (event->type) |
1330 | { |
1331 | case FocusIn: |
1332 | case FocusOut: |
1333 | if (event->xfocus.mode == NotifyGrab) |
1334 | - PluginAdapter::Default()->OnScreenGrabbed(); |
1335 | + wm->OnScreenGrabbed(); |
1336 | else if (event->xfocus.mode == NotifyUngrab) |
1337 | - PluginAdapter::Default()->OnScreenUngrabbed(); |
1338 | + wm->OnScreenUngrabbed(); |
1339 | + |
1340 | if (_key_nav_mode_requested) |
1341 | { |
1342 | // Close any overlay that is open. |
1343 | @@ -1400,9 +1401,10 @@ |
1344 | _key_nav_mode_requested = false; |
1345 | break; |
1346 | case MotionNotify: |
1347 | - if (scale_highlighted_window_ && PluginAdapter::Default()->IsScaleActive()) |
1348 | + if (wm->IsScaleActive()) |
1349 | { |
1350 | - if (CompWindow *w = screen->findWindow(scale_highlighted_window_)) |
1351 | + ScaleScreen* ss = ScaleScreen::get(screen); |
1352 | + if (CompWindow *w = screen->findWindow(ss->getSelectedWindow())) |
1353 | skip_other_plugins = UnityWindow::get(w)->handleEvent(event); |
1354 | } |
1355 | break; |
1356 | @@ -1412,12 +1414,21 @@ |
1357 | launcher_controller_->KeyNavTerminate(false); |
1358 | EnableCancelAction(CancelActionTarget::LAUNCHER_SWITCHER, false); |
1359 | } |
1360 | - if (scale_highlighted_window_ && PluginAdapter::Default()->IsScaleActive()) |
1361 | + if (wm->IsScaleActive()) |
1362 | { |
1363 | - if (CompWindow *w = screen->findWindow(scale_highlighted_window_)) |
1364 | + ScaleScreen* ss = ScaleScreen::get(screen); |
1365 | + if (CompWindow *w = screen->findWindow(ss->getSelectedWindow())) |
1366 | skip_other_plugins = UnityWindow::get(w)->handleEvent(event); |
1367 | } |
1368 | - |
1369 | + if (launcher_controller_->IsOverlayOpen()) |
1370 | + { |
1371 | + int monitor_with_mouse = UScreen::GetDefault()->GetMonitorWithMouse(); |
1372 | + if (overlay_monitor_ != monitor_with_mouse) |
1373 | + { |
1374 | + dash_controller_->HideDash(false); |
1375 | + hud_controller_->HideHud(false); |
1376 | + } |
1377 | + } |
1378 | break; |
1379 | case ButtonRelease: |
1380 | if (switcher_controller_ && switcher_controller_->Visible()) |
1381 | @@ -1437,10 +1448,11 @@ |
1382 | } |
1383 | } |
1384 | } |
1385 | - else if (scale_highlighted_window_ && PluginAdapter::Default()->IsScaleActive()) |
1386 | + else if (wm->IsScaleActive()) |
1387 | { |
1388 | - if (CompWindow *w = screen->findWindow(scale_highlighted_window_)) |
1389 | - UnityWindow::get(w)->handleEvent(event); |
1390 | + ScaleScreen* ss = ScaleScreen::get(screen); |
1391 | + if (CompWindow *w = screen->findWindow(ss->getSelectedWindow())) |
1392 | + skip_other_plugins = UnityWindow::get(w)->handleEvent(event); |
1393 | } |
1394 | break; |
1395 | case KeyPress: |
1396 | @@ -2556,7 +2568,8 @@ |
1397 | UnityScreen* us = UnityScreen::get(screen); |
1398 | CompWindow *lw; |
1399 | |
1400 | - if (us->launcher_controller_->IsOverlayOpen()) |
1401 | + // can't rely on launcher->IsOverlayVisible on focus change (because ubus is async close on focus change.) |
1402 | + if (us && (us->dash_controller_->IsVisible() || us->hud_controller_->IsVisible())) |
1403 | { |
1404 | lw = screen->findWindow(us->launcher_controller_->LauncherWindowId(0)); |
1405 | lw->moveInputFocusTo(); |
1406 | @@ -2770,6 +2783,7 @@ |
1407 | * that must not be considered when drawing an overlay */ |
1408 | hud_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1; |
1409 | dash_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1; |
1410 | + panel_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1; |
1411 | |
1412 | if (p) |
1413 | { |
1414 | @@ -3597,8 +3611,8 @@ |
1415 | if (!scale_win->hasSlot()) // animation not finished |
1416 | return; |
1417 | |
1418 | - UnityScreen* us = UnityScreen::get(screen); |
1419 | - const bool highlighted = (us->scale_highlighted_window_ == window->id()); |
1420 | + ScaleScreen* ss = ScaleScreen::get(screen); |
1421 | + const bool highlighted = (ss->getSelectedWindow() == window->id()); |
1422 | |
1423 | ScalePosition const& pos = scale_win->getCurrentPosition(); |
1424 | auto const& border_rect = window->borderRect(); |
1425 | @@ -3651,16 +3665,6 @@ |
1426 | } |
1427 | } |
1428 | |
1429 | -void UnityWindow::scaleSelectWindow() |
1430 | -{ |
1431 | - ScaleWindow::get(window)->scaleSelectWindow(); |
1432 | - |
1433 | - UnityScreen* us = UnityScreen::get(screen); |
1434 | - |
1435 | - if (us->scale_highlighted_window_ != window->id()) |
1436 | - us->scale_highlighted_window_ = window->id(); |
1437 | -} |
1438 | - |
1439 | void UnityWindow::OnInitiateSpreed() |
1440 | { |
1441 | auto const windows = screen->windows(); |
1442 | |
1443 | === modified file 'plugins/unityshell/src/unityshell.h' |
1444 | --- plugins/unityshell/src/unityshell.h 2012-09-07 12:40:24 +0000 |
1445 | +++ plugins/unityshell/src/unityshell.h 2012-09-13 15:55:51 +0000 |
1446 | @@ -312,7 +312,7 @@ |
1447 | |
1448 | bool queryForShader (); |
1449 | |
1450 | - int dash_monitor_; |
1451 | + int overlay_monitor_; |
1452 | CompScreen::GrabHandle grab_index_; |
1453 | CompWindowList fullscreen_windows_; |
1454 | bool painting_tray_; |
1455 | @@ -333,8 +333,6 @@ |
1456 | glib::SourceManager sources_; |
1457 | unity::ThumbnailGenerator thumb_generator; |
1458 | |
1459 | - Window scale_highlighted_window_; |
1460 | - |
1461 | WindowMinimizeSpeedController* minimize_speed_controller; |
1462 | friend class UnityWindow; |
1463 | }; |
1464 | @@ -409,7 +407,6 @@ |
1465 | //! Emited when CompWindowNotifyBeforeDestroy is received |
1466 | sigc::signal<void> being_destroyed; |
1467 | |
1468 | - void scaleSelectWindow(); |
1469 | void scalePaintDecoration(const GLWindowPaintAttrib &, |
1470 | const GLMatrix &, |
1471 | const CompRegion &, |
1472 | |
1473 | === modified file 'tests/autopilot/unity/tests/test_dash.py' |
1474 | --- tests/autopilot/unity/tests/test_dash.py 2012-09-11 12:01:20 +0000 |
1475 | +++ tests/autopilot/unity/tests/test_dash.py 2012-09-13 15:55:51 +0000 |
1476 | @@ -107,22 +107,6 @@ |
1477 | self.dash.reveal_application_lens() |
1478 | self.assertThat(self.dash.active_lens, Eventually(Equals('applications.lens'))) |
1479 | |
1480 | - def test_dash_stays_on_same_monitor(self): |
1481 | - """If the dash is opened, then the mouse is moved to another monitor and |
1482 | - the keyboard is used. The Dash must not move to that monitor. |
1483 | - """ |
1484 | - |
1485 | - if self.screen_geo.get_num_monitors() < 2: |
1486 | - self.skip ("This test must be ran with more then 1 monitor.") |
1487 | - |
1488 | - self.dash.ensure_visible() |
1489 | - self.addCleanup(self.dash.ensure_hidden) |
1490 | - |
1491 | - self.screen_geo.move_mouse_to_monitor(1) |
1492 | - self.keyboard.type("abc") |
1493 | - |
1494 | - self.assertThat(self.dash.ideal_monitor, Eventually(Equals(0))) |
1495 | - |
1496 | |
1497 | class DashSearchInputTests(DashTestCase): |
1498 | """Test features involving input to the dash search""" |
1499 | @@ -435,6 +419,9 @@ |
1500 | class DashKeyboardFocusTests(DashTestCase): |
1501 | """Tests that keyboard focus works.""" |
1502 | |
1503 | + def assertSearchText(self, text): |
1504 | + self.assertThat(self.dash.search_string, Eventually(Equals(text))) |
1505 | + |
1506 | def test_filterbar_expansion_leaves_kb_focus(self): |
1507 | """Expanding or collapsing the filterbar must keave keyboard focus in the |
1508 | search bar. |
1509 | @@ -447,7 +434,19 @@ |
1510 | filter_bar.ensure_expanded() |
1511 | self.addCleanup(filter_bar.ensure_collapsed) |
1512 | self.keyboard.type(" world") |
1513 | - self.assertThat(self.dash.search_string, Eventually(Equals("hello world"))) |
1514 | + self.assertSearchText("hello world") |
1515 | + |
1516 | + def test_keep_focus_on_application_opens(self): |
1517 | + """The Dash must keep key focus as well as stay open if an app gets opened from an external source. """ |
1518 | + |
1519 | + self.dash.ensure_visible() |
1520 | + self.addCleanup(self.hud.ensure_hidden) |
1521 | + |
1522 | + self.start_app_window("Calculator") |
1523 | + sleep(1) |
1524 | + |
1525 | + self.keyboard.type("HasFocus") |
1526 | + self.assertSearchText("HasFocus") |
1527 | |
1528 | |
1529 | class DashLensResultsTests(DashTestCase): |
1530 | @@ -847,6 +846,7 @@ |
1531 | |
1532 | self.assertThat(self.dash.preview_displaying, Eventually(Equals(False))) |
1533 | |
1534 | + |
1535 | class DashDBusIfaceTests(DashTestCase): |
1536 | """Test the Unity dash DBus interface.""" |
1537 | |
1538 | @@ -856,3 +856,41 @@ |
1539 | self.dash.controller.hide_dash_via_dbus() |
1540 | self.assertThat(self.dash.visible, Eventually(Equals(False))) |
1541 | self.dash.ensure_hidden() |
1542 | + |
1543 | + |
1544 | +class DashCrossMonitorsTests(DashTestCase): |
1545 | + """Multi-monitor dash tests.""" |
1546 | + |
1547 | + def setUp(self): |
1548 | + super(DashCrossMonitorsTests, self).setUp() |
1549 | + if self.screen_geo.get_num_monitors() < 2: |
1550 | + self.skipTest("This test requires more than 1 monitor.") |
1551 | + |
1552 | + def test_dash_stays_on_same_monitor(self): |
1553 | + """If the dash is opened, then the mouse is moved to another monitor and |
1554 | + the keyboard is used. The Dash must not move to that monitor. |
1555 | + """ |
1556 | + current_monitor = self.dash.ideal_monitor |
1557 | + |
1558 | + self.dash.ensure_visible() |
1559 | + self.addCleanup(self.dash.ensure_hidden) |
1560 | + |
1561 | + self.screen_geo.move_mouse_to_monitor((current_monitor + 1) % self.screen_geo.get_num_monitors()) |
1562 | + self.keyboard.type("abc") |
1563 | + |
1564 | + self.assertThat(self.dash.ideal_monitor, Eventually(Equals(current_monitor))) |
1565 | + |
1566 | + def test_dash_close_on_cross_monitor_click(self): |
1567 | + """Dash must close when clicking on a window in a different screen.""" |
1568 | + |
1569 | + self.addCleanup(self.dash.ensure_hidden) |
1570 | + |
1571 | + for monitor in range(self.screen_geo.get_num_monitors()-1): |
1572 | + self.screen_geo.move_mouse_to_monitor(monitor) |
1573 | + self.dash.ensure_visible() |
1574 | + |
1575 | + self.screen_geo.move_mouse_to_monitor(monitor+1) |
1576 | + sleep(.5) |
1577 | + self.mouse.click() |
1578 | + |
1579 | + self.assertThat(self.dash.visible, Eventually(Equals(False))) |
1580 | |
1581 | === modified file 'tests/autopilot/unity/tests/test_hud.py' |
1582 | --- tests/autopilot/unity/tests/test_hud.py 2012-09-07 17:36:50 +0000 |
1583 | +++ tests/autopilot/unity/tests/test_hud.py 2012-09-13 15:55:51 +0000 |
1584 | @@ -357,22 +357,6 @@ |
1585 | |
1586 | self.assertThat(self.hud.visible, Eventually(Equals(False))) |
1587 | |
1588 | - def test_hud_stays_on_same_monitor(self): |
1589 | - """If the hud is opened, then the mouse is moved to another monitor and |
1590 | - the keyboard is used. The hud must not move to that monitor. |
1591 | - """ |
1592 | - |
1593 | - if self.screen_geo.get_num_monitors() < 2: |
1594 | - self.skip ("This test must be ran with more then 1 monitor.") |
1595 | - |
1596 | - self.hud.ensure_visible() |
1597 | - self.addCleanup(self.hud.ensure_hidden) |
1598 | - |
1599 | - self.screen_geo.move_mouse_to_monitor(1) |
1600 | - self.keyboard.type("abc") |
1601 | - |
1602 | - self.assertThat(self.hud.ideal_monitor, Eventually(Equals(0))) |
1603 | - |
1604 | def test_mouse_changes_selected_hud_button(self): |
1605 | """This tests moves the mouse from the top of the screen to the bottom, this must |
1606 | change the selected button from 1 to 5. |
1607 | @@ -408,6 +392,18 @@ |
1608 | |
1609 | self.assertThat(self.hud.view.selected_button, Eventually(Equals(1))) |
1610 | |
1611 | + def test_keep_focus_on_application_opens(self): |
1612 | + """The Hud must keep key focus as well as stay open if an app gets opened from an external source. """ |
1613 | + |
1614 | + self.hud.ensure_visible() |
1615 | + self.addCleanup(self.hud.ensure_hidden) |
1616 | + |
1617 | + self.start_app_window("Calculator") |
1618 | + sleep(1) |
1619 | + |
1620 | + self.keyboard.type("HasFocus") |
1621 | + self.assertThat(self.hud.search_string, Eventually(Equals("HasFocus"))) |
1622 | + |
1623 | |
1624 | class HudLauncherInteractionsTests(HudTestsBase): |
1625 | |
1626 | @@ -661,3 +657,42 @@ |
1627 | # Don't use reveal_hud, but be explicit in the keybindings. |
1628 | self.keyboard.press_and_release("Ctrl+Alt+h") |
1629 | self.assertThat(self.hud.visible, Eventually(Equals(True))) |
1630 | + |
1631 | + |
1632 | +class HudCrossMonitorsTests(HudTestsBase): |
1633 | + """Multi-monitor hud tests.""" |
1634 | + |
1635 | + def setUp(self): |
1636 | + super(HudCrossMonitorsTests, self).setUp() |
1637 | + if self.screen_geo.get_num_monitors() < 2: |
1638 | + self.skipTest("This test requires more than 1 monitor.") |
1639 | + |
1640 | + def test_hud_stays_on_same_monitor(self): |
1641 | + """If the hud is opened, then the mouse is moved to another monitor and |
1642 | + the keyboard is used. The hud must not move to that monitor. |
1643 | + """ |
1644 | + |
1645 | + current_monitor = self.hud.ideal_monitor |
1646 | + |
1647 | + self.hud.ensure_visible() |
1648 | + self.addCleanup(self.hud.ensure_hidden) |
1649 | + |
1650 | + self.screen_geo.move_mouse_to_monitor((current_monitor + 1) % self.screen_geo.get_num_monitors()) |
1651 | + self.keyboard.type("abc") |
1652 | + |
1653 | + self.assertThat(self.hud.ideal_monitor, Eventually(Equals(current_monitor))) |
1654 | + |
1655 | + def test_hud_close_on_cross_monitor_click(self): |
1656 | + """Hud must close when clicking on a window in a different screen.""" |
1657 | + |
1658 | + self.addCleanup(self.hud.ensure_hidden) |
1659 | + |
1660 | + for monitor in range(self.screen_geo.get_num_monitors()-1): |
1661 | + self.screen_geo.move_mouse_to_monitor(monitor) |
1662 | + self.hud.ensure_visible() |
1663 | + |
1664 | + self.screen_geo.move_mouse_to_monitor(monitor+1) |
1665 | + sleep(.5) |
1666 | + self.mouse.click() |
1667 | + |
1668 | + self.assertThat(self.hud.visible, Eventually(Equals(False))) |
1669 | |
1670 | === modified file 'unity-shared/DashStyle.cpp' |
1671 | --- unity-shared/DashStyle.cpp 2012-08-20 19:59:54 +0000 |
1672 | +++ unity-shared/DashStyle.cpp 2012-09-13 15:55:51 +0000 |
1673 | @@ -196,6 +196,8 @@ |
1674 | int text_height_; |
1675 | int number_of_columns_; |
1676 | |
1677 | + LazyLoadTexture category_texture_; |
1678 | + LazyLoadTexture category_texture_no_filters_; |
1679 | LazyLoadTexture dash_bottom_texture_; |
1680 | LazyLoadTexture dash_bottom_texture_mask_; |
1681 | LazyLoadTexture dash_right_texture_; |
1682 | @@ -218,6 +220,11 @@ |
1683 | LazyLoadTexture search_close_texture_; |
1684 | LazyLoadTexture search_spin_texture_; |
1685 | |
1686 | + |
1687 | + LazyLoadTexture refine_gradient_corner_; |
1688 | + LazyLoadTexture refine_gradient_dash_; |
1689 | + LazyLoadTexture refine_gradient_no_refine_dash_; |
1690 | + |
1691 | LazyLoadTexture group_unexpand_texture_; |
1692 | LazyLoadTexture group_expand_texture_; |
1693 | |
1694 | @@ -239,6 +246,8 @@ |
1695 | , text_width_(0) |
1696 | , text_height_(0) |
1697 | , number_of_columns_(6) |
1698 | + , category_texture_("/category_gradient.png") |
1699 | + , category_texture_no_filters_("/category_gradient_no_refine.png") |
1700 | , dash_bottom_texture_("/dash_bottom_border_tile.png") |
1701 | , dash_bottom_texture_mask_("/dash_bottom_border_tile_mask.png") |
1702 | , dash_right_texture_("/dash_right_border_tile.png") |
1703 | @@ -258,6 +267,9 @@ |
1704 | , search_circle_texture_("/search_circle.svg", 32) |
1705 | , search_close_texture_("/search_close.svg", 32) |
1706 | , search_spin_texture_("/search_spin.svg", 32) |
1707 | + , refine_gradient_corner_("/refine_gradient_corner.png") |
1708 | + , refine_gradient_dash_("/refine_gradient_dash.png") |
1709 | + , refine_gradient_no_refine_dash_("/refine_gradient_dash_no_refine.png") |
1710 | , group_unexpand_texture_("/dash_group_unexpand.png") |
1711 | , group_expand_texture_("/dash_group_expand.png") |
1712 | , star_deselected_texture_("/star_deselected.png") |
1713 | @@ -2081,6 +2093,16 @@ |
1714 | } |
1715 | |
1716 | |
1717 | +nux::BaseTexture* Style::GetCategoryBackground() |
1718 | +{ |
1719 | + return pimpl->category_texture_.texture(); |
1720 | +} |
1721 | + |
1722 | +nux::BaseTexture* Style::GetCategoryBackgroundNoFilters() |
1723 | +{ |
1724 | + return pimpl->category_texture_no_filters_.texture(); |
1725 | +} |
1726 | + |
1727 | nux::BaseTexture* Style::GetDashBottomTile() |
1728 | { |
1729 | return pimpl->dash_bottom_texture_.texture(); |
1730 | @@ -2171,6 +2193,21 @@ |
1731 | return pimpl->search_spin_texture_.texture(); |
1732 | } |
1733 | |
1734 | +nux::BaseTexture* Style::GetRefineTextureCorner() |
1735 | +{ |
1736 | + return pimpl->refine_gradient_corner_.texture(); |
1737 | +} |
1738 | + |
1739 | +nux::BaseTexture* Style::GetRefineNoRefineTextureDash() |
1740 | +{ |
1741 | + return pimpl->refine_gradient_no_refine_dash_.texture(); |
1742 | +} |
1743 | + |
1744 | +nux::BaseTexture* Style::GetRefineTextureDash() |
1745 | +{ |
1746 | + return pimpl->refine_gradient_dash_.texture(); |
1747 | +} |
1748 | + |
1749 | nux::BaseTexture* Style::GetGroupUnexpandIcon() |
1750 | { |
1751 | return pimpl->group_unexpand_texture_.texture(); |
1752 | |
1753 | === modified file 'unity-shared/DashStyle.h' |
1754 | --- unity-shared/DashStyle.h 2012-08-20 19:59:54 +0000 |
1755 | +++ unity-shared/DashStyle.h 2012-09-13 15:55:51 +0000 |
1756 | @@ -165,6 +165,8 @@ |
1757 | |
1758 | int GetTextLineHeight() const; |
1759 | |
1760 | + nux::BaseTexture* GetCategoryBackground(); |
1761 | + nux::BaseTexture* GetCategoryBackgroundNoFilters(); |
1762 | nux::BaseTexture* GetDashBottomTile(); |
1763 | nux::BaseTexture* GetDashBottomTileMask(); |
1764 | nux::BaseTexture* GetDashRightTile(); |
1765 | @@ -196,7 +198,11 @@ |
1766 | nux::BaseTexture* GetStarDeselectedIcon(); |
1767 | nux::BaseTexture* GetStarSelectedIcon(); |
1768 | nux::BaseTexture* GetStarHighlightIcon(); |
1769 | - |
1770 | + |
1771 | + nux::BaseTexture* GetRefineTextureCorner(); |
1772 | + nux::BaseTexture* GetRefineTextureDash(); |
1773 | + nux::BaseTexture* GetRefineNoRefineTextureDash(); |
1774 | + |
1775 | // Returns the width of the separator between the dash and the launcher. |
1776 | int GetVSeparatorSize() const; |
1777 | |
1778 | @@ -206,6 +212,7 @@ |
1779 | // Practically it is the space between the top border of the dash and the searchbar. |
1780 | int GetDashViewTopPadding() const; |
1781 | |
1782 | + |
1783 | // Search bar |
1784 | int GetSearchBarLeftPadding() const; |
1785 | int GetSearchBarRightPadding() const; |
1786 | |
1787 | === modified file 'unity-shared/OverlayRenderer.cpp' |
1788 | --- unity-shared/OverlayRenderer.cpp 2012-05-22 10:15:47 +0000 |
1789 | +++ unity-shared/OverlayRenderer.cpp 2012-09-13 15:55:51 +0000 |
1790 | @@ -64,10 +64,19 @@ |
1791 | nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_blur_texture_; |
1792 | nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_shine_texture_; |
1793 | |
1794 | + |
1795 | + nux::ObjectPtr<nux::BaseTexture> bg_refine_tex_; |
1796 | + nux::ObjectPtr<nux::BaseTexture> bg_refine_no_refine_tex_; |
1797 | + nux::ObjectPtr<nux::BaseTexture> bg_refine_corner_tex_; |
1798 | + std::unique_ptr<nux::AbstractPaintLayer> bg_refine_gradient_; |
1799 | + std::unique_ptr<nux::AbstractPaintLayer> bg_refine_gradient_corner_; |
1800 | + |
1801 | // temporary variable that stores the number of backgrounds we have rendered |
1802 | int bgs; |
1803 | bool visible; |
1804 | |
1805 | + bool refine_is_open_; |
1806 | + |
1807 | UBusManager ubus_manager_; |
1808 | |
1809 | OverlayRenderer *parent; |
1810 | @@ -107,16 +116,67 @@ |
1811 | rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
1812 | bg_layer_ = new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.9), true, rop); |
1813 | |
1814 | + nux::TexCoordXForm texxform; |
1815 | + bg_refine_tex_ = unity::dash::Style::Instance().GetRefineTextureDash(); |
1816 | + bg_refine_no_refine_tex_ = unity::dash::Style::Instance().GetRefineNoRefineTextureDash(); |
1817 | + |
1818 | + bg_refine_gradient_.reset(new nux::TextureLayer(bg_refine_tex_->GetDeviceTexture(), |
1819 | + texxform, |
1820 | + nux::color::White, |
1821 | + false, |
1822 | + rop)); |
1823 | + |
1824 | + bg_refine_corner_tex_ = unity::dash::Style::Instance().GetRefineTextureCorner(); |
1825 | + |
1826 | + bg_refine_gradient_corner_.reset(new nux::TextureLayer(bg_refine_corner_tex_->GetDeviceTexture(), |
1827 | + texxform, |
1828 | + nux::color::White, |
1829 | + false, |
1830 | + rop)); |
1831 | + |
1832 | + ubus_manager_.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED, |
1833 | + sigc::mem_fun(this, &OverlayRendererImpl::OnBackgroundColorChanged)); |
1834 | + |
1835 | rop.Blend = true; |
1836 | rop.SrcBlend = GL_ZERO; |
1837 | rop.DstBlend = GL_SRC_COLOR; |
1838 | bg_darken_layer_ = new nux::ColorLayer(nux::Color(0.9f, 0.9f, 0.9f, 1.0f), false, rop); |
1839 | bg_shine_texture_ = unity::dash::Style::Instance().GetDashShine()->GetDeviceTexture(); |
1840 | |
1841 | - ubus_manager_.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED, |
1842 | - sigc::mem_fun(this, &OverlayRendererImpl::OnBackgroundColorChanged)); |
1843 | - |
1844 | ubus_manager_.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT); |
1845 | + |
1846 | + ubus_manager_.RegisterInterest(UBUS_REFINE_STATUS, [this] (GVariant *data) |
1847 | + { |
1848 | + gboolean status; |
1849 | + g_variant_get(data, UBUS_REFINE_STATUS_FORMAT_STRING, &status); |
1850 | + |
1851 | + refine_is_open_ = status; |
1852 | + nux::ROPConfig rop; |
1853 | + rop.Blend = true; |
1854 | + rop.SrcBlend = GL_ONE; |
1855 | + rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
1856 | + |
1857 | + nux::TexCoordXForm texxform; |
1858 | + |
1859 | + if (refine_is_open_) |
1860 | + { |
1861 | + bg_refine_gradient_.reset(new nux::TextureLayer(bg_refine_tex_->GetDeviceTexture(), |
1862 | + texxform, |
1863 | + nux::color::White, |
1864 | + false, |
1865 | + rop)); |
1866 | + } |
1867 | + else |
1868 | + { |
1869 | + bg_refine_gradient_.reset(new nux::TextureLayer(bg_refine_no_refine_tex_->GetDeviceTexture(), |
1870 | + texxform, |
1871 | + nux::color::White, |
1872 | + false, |
1873 | + rop)); |
1874 | + } |
1875 | + |
1876 | + parent->need_redraw.emit(); |
1877 | + }); |
1878 | } |
1879 | |
1880 | void OverlayRendererImpl::OnBackgroundColorChanged(GVariant* args) |
1881 | @@ -442,9 +502,9 @@ |
1882 | gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); |
1883 | |
1884 | const double line_opacity = 0.1f; |
1885 | - const int gradient_width = 130; |
1886 | + //const int gradient_width = 130; |
1887 | const int gradient_height = 50; |
1888 | - const int horizontal_padding = 40; |
1889 | + //const int horizontal_padding = 40; |
1890 | const int vertical_padding = 20; |
1891 | |
1892 | // Now that we mask the corners of the dash, |
1893 | @@ -471,7 +531,7 @@ |
1894 | line_color * 0.7f); // less opacity |
1895 | |
1896 | // Horizontal panel/dash separator |
1897 | - nux::GetPainter().Paint2DQuadColor(gfx_context, |
1898 | + /*nux::GetPainter().Paint2DQuadColor(gfx_context, |
1899 | nux::Geometry(geometry.x + horizontal_padding, |
1900 | geometry.y, |
1901 | gradient_width, |
1902 | @@ -486,7 +546,7 @@ |
1903 | geometry.x + content_geo.width + INNER_CORNER_RADIUS + corner_overlap, |
1904 | style.GetHSeparatorSize(), |
1905 | line_color); |
1906 | - |
1907 | +*/ |
1908 | // Draw the background |
1909 | bg_darken_layer_->SetGeometry(larger_content_geo); |
1910 | nux::GetPainter().RenderSinglePaintLayer(gfx_context, larger_content_geo, bg_darken_layer_); |
1911 | @@ -510,6 +570,33 @@ |
1912 | larger_content_geo.width, larger_content_geo.height, |
1913 | bg_shine_texture_, texxform_absolute_bg, nux::color::White); |
1914 | |
1915 | + gfx_context.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |
1916 | + nux::TexCoordXForm refine_texxform; |
1917 | + |
1918 | + if (refine_is_open_) |
1919 | + { |
1920 | + gfx_context.QRP_1Tex(larger_content_geo.x + larger_content_geo.width - bg_refine_tex_->GetWidth(), |
1921 | + larger_content_geo.y, |
1922 | + bg_refine_tex_->GetWidth(), |
1923 | + bg_refine_tex_->GetHeight(), |
1924 | + bg_refine_tex_->GetDeviceTexture(), |
1925 | + refine_texxform, |
1926 | + nux::color::White |
1927 | + ); |
1928 | + } |
1929 | + else |
1930 | + { |
1931 | + gfx_context.QRP_1Tex(larger_content_geo.x + larger_content_geo.width - bg_refine_no_refine_tex_->GetWidth(), |
1932 | + larger_content_geo.y, |
1933 | + bg_refine_no_refine_tex_->GetWidth(), |
1934 | + bg_refine_no_refine_tex_->GetHeight(), |
1935 | + bg_refine_no_refine_tex_->GetDeviceTexture(), |
1936 | + refine_texxform, |
1937 | + nux::color::White |
1938 | + ); |
1939 | + } |
1940 | + |
1941 | + |
1942 | if (Settings::Instance().GetFormFactor() != FormFactor::NETBOOK || force_edges) |
1943 | { |
1944 | // Paint the edges |
1945 | @@ -850,6 +937,24 @@ |
1946 | false, |
1947 | rop); |
1948 | bgs++; |
1949 | + |
1950 | + nux::Geometry refine_geo = larger_content_geo; |
1951 | + |
1952 | + if (refine_is_open_) |
1953 | + { |
1954 | + refine_geo.x += larger_content_geo.width - bg_refine_tex_->GetWidth(); |
1955 | + refine_geo.width = bg_refine_tex_->GetWidth(); |
1956 | + refine_geo.height = bg_refine_tex_->GetHeight(); |
1957 | + } |
1958 | + else |
1959 | + { |
1960 | + refine_geo.x += larger_content_geo.width - bg_refine_no_refine_tex_->GetWidth(); |
1961 | + refine_geo.width = bg_refine_no_refine_tex_->GetWidth(); |
1962 | + refine_geo.height = bg_refine_no_refine_tex_->GetHeight(); |
1963 | + } |
1964 | + |
1965 | + nux::GetPainter().PushLayer(gfx_context, refine_geo, bg_refine_gradient_.get()); |
1966 | + bgs++; |
1967 | } |
1968 | |
1969 | void OverlayRendererImpl::DrawContentCleanup(nux::GraphicsEngine& gfx_context, nux::Geometry content_geo, nux::Geometry absolute_geo, nux::Geometry geometry) |
1970 | |
1971 | === modified file 'unity-shared/PreviewStyle.cpp' |
1972 | --- unity-shared/PreviewStyle.cpp 2012-09-06 07:03:54 +0000 |
1973 | +++ unity-shared/PreviewStyle.cpp 2012-09-13 15:55:51 +0000 |
1974 | @@ -224,7 +224,7 @@ |
1975 | |
1976 | int Style::GetActionButtonHeight() const |
1977 | { |
1978 | - return 36; |
1979 | + return 34; |
1980 | } |
1981 | |
1982 | int Style::GetActionButtonMaximumWidth() const |
1983 | |
1984 | === modified file 'unity-shared/UBusMessages.h' |
1985 | --- unity-shared/UBusMessages.h 2012-08-27 03:00:42 +0000 |
1986 | +++ unity-shared/UBusMessages.h 2012-09-13 15:55:51 +0000 |
1987 | @@ -40,6 +40,9 @@ |
1988 | #define UBUS_OVERLAY_HIDDEN "OVERLAY_HIDDEN" |
1989 | #define UBUS_OVERLAY_SHOWN "OVERLAY_SHOWN" |
1990 | |
1991 | +#define UBUS_REFINE_STATUS_FORMAT_STRING "(b)" |
1992 | +#define UBUS_REFINE_STATUS "REFINE_STATUS" |
1993 | + |
1994 | #define UBUS_PLACE_VIEW_QUEUE_DRAW "PLACE_VIEW_QUEUE_DRAW" |
1995 | |
1996 | // Signal send by Launcher/Quicklist when it wants to exit key-nav and wants to |
1997 | |
1998 | === modified file 'unity-standalone/StandaloneUnity.cpp' |
1999 | --- unity-standalone/StandaloneUnity.cpp 2012-07-27 20:20:29 +0000 |
2000 | +++ unity-standalone/StandaloneUnity.cpp 2012-09-13 15:55:51 +0000 |
2001 | @@ -45,7 +45,7 @@ |
2002 | |
2003 | namespace |
2004 | { |
2005 | - static int display_width = 1280; |
2006 | + static int display_width = 1200; |
2007 | static int display_height = 720; |
2008 | static gboolean no_window_decorations = FALSE; |
2009 | static gboolean force_tv = FALSE; |
2010 | @@ -89,7 +89,9 @@ |
2011 | launcher_controller.reset(new launcher::Controller(0)); |
2012 | panel_controller.reset(new panel::Controller()); |
2013 | dash_controller.reset(new dash::Controller()); |
2014 | + |
2015 | dash_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1; |
2016 | + panel_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1; |
2017 | } |
2018 | |
2019 | void UnityStandalone::InitWindowThread(nux::NThread* thread, void* InitData) |