Merge lp:~gordallott/unity/newbg into lp:~gordallott/unity/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
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.

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
=== modified file 'dash/CoverflowResultView.cpp'
--- dash/CoverflowResultView.cpp 2012-08-23 14:23:08 +0000
+++ dash/CoverflowResultView.cpp 2012-09-13 15:55:51 +0000
@@ -161,11 +161,12 @@
161161
162 ubus_.RegisterInterest(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, [&] (GVariant* data) {162 ubus_.RegisterInterest(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, [&] (GVariant* data) {
163 int nav_mode = 0;163 int nav_mode = 0;
164 gchar* uri = NULL;164 glib::String uri;
165 gchar* proposed_unique_id = NULL;165 glib::String proposed_unique_id;
166
166 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);167 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);
167 168
168 if (std::string(proposed_unique_id) != parent_->unique_id())169 if (proposed_unique_id.Str() != parent_->unique_id())
169 return;170 return;
170171
171 unsigned num_results = coverflow_->model()->Items().size();172 unsigned num_results = coverflow_->model()->Items().size();
@@ -192,10 +193,6 @@
192 ubus_.SendMessage(UBUS_DASH_PREVIEW_INFO_PAYLOAD, 193 ubus_.SendMessage(UBUS_DASH_PREVIEW_INFO_PAYLOAD,
193 g_variant_new("(iii)", 0, left_results, right_results));194 g_variant_new("(iii)", 0, left_results, right_results));
194 }195 }
195
196 g_free(uri);
197 g_free(proposed_unique_id);
198
199 });196 });
200}197}
201198
202199
=== modified file 'dash/DashController.cpp'
--- dash/DashController.cpp 2012-09-12 08:36:06 +0000
+++ dash/DashController.cpp 2012-09-13 15:55:51 +0000
@@ -284,17 +284,8 @@
284 return;284 return;
285 }285 }
286286
287 /* GetIdealMonitor must get called before visible_ is set */
288 monitor_ = GetIdealMonitor();287 monitor_ = GetIdealMonitor();
289288
290 // The launcher must receive UBUS_OVERLAY_SHOW before window_->EnableInputWindow().
291 // Other wise the Launcher gets focus for X, which causes XIM to fail.
292 sources_.AddTimeout(0, [this] {
293 GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_);
294 ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info);
295 return false;
296 });
297
298 view_->AboutToShow();289 view_->AboutToShow();
299290
300 window_->ShowWindow(true);291 window_->ShowWindow(true);
@@ -311,6 +302,9 @@
311 visible_ = true;302 visible_ = true;
312303
313 StartShowHideTimeline();304 StartShowHideTimeline();
305
306 GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_);
307 ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info);
314}308}
315309
316void Controller::HideDash(bool restore)310void Controller::HideDash(bool restore)
@@ -400,6 +394,11 @@
400 .add("monitor", monitor_);394 .add("monitor", monitor_);
401}395}
402396
397bool Controller::IsVisible() const
398{
399 return visible_;
400}
401
403void Controller::OnBusAcquired(GObject *obj, GAsyncResult *result, gpointer user_data)402void Controller::OnBusAcquired(GObject *obj, GAsyncResult *result, gpointer user_data)
404{403{
405 glib::Error error;404 glib::Error error;
@@ -447,6 +446,5 @@
447}446}
448447
449448
450
451}449}
452}450}
453451
=== modified file 'dash/DashController.h'
--- dash/DashController.h 2012-09-11 10:47:15 +0000
+++ dash/DashController.h 2012-09-13 15:55:51 +0000
@@ -59,6 +59,8 @@
5959
60 void HideDash(bool restore_focus = true);60 void HideDash(bool restore_focus = true);
6161
62 bool IsVisible() const;
63
62protected:64protected:
63 std::string GetName() const;65 std::string GetName() const;
64 void AddProperties(GVariantBuilder* builder);66 void AddProperties(GVariantBuilder* builder);
@@ -104,7 +106,6 @@
104 sigc::connection screen_ungrabbed_slot_;106 sigc::connection screen_ungrabbed_slot_;
105 glib::SignalManager sig_manager_;107 glib::SignalManager sig_manager_;
106 glib::TimeoutSeconds ensure_timeout_;108 glib::TimeoutSeconds ensure_timeout_;
107 glib::SourceManager sources_;
108 Animator timeline_animator_;109 Animator timeline_animator_;
109 UBusManager ubus_manager_;110 UBusManager ubus_manager_;
110 unsigned int dbus_owner_;111 unsigned int dbus_owner_;
111112
=== modified file 'dash/FilterBar.cpp'
--- dash/FilterBar.cpp 2012-05-06 23:48:38 +0000
+++ dash/FilterBar.cpp 2012-09-13 15:55:51 +0000
@@ -82,8 +82,6 @@
82 AddChild(filter_view);82 AddChild(filter_view);
83 filter_map_[filter] = filter_view;83 filter_map_[filter] = filter_view;
84 GetLayout()->AddView(filter_view, 0, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL);84 GetLayout()->AddView(filter_view, 0, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL);
85
86 UpdateDrawSeparators();
87}85}
8886
89void FilterBar::RemoveFilter(Filter::Ptr const& filter)87void FilterBar::RemoveFilter(Filter::Ptr const& filter)
@@ -99,8 +97,6 @@
99 break;97 break;
100 }98 }
101 }99 }
102
103 UpdateDrawSeparators();
104}100}
105101
106void FilterBar::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)102void FilterBar::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
@@ -120,24 +116,6 @@
120 GfxContext.PopClippingRectangle();116 GfxContext.PopClippingRectangle();
121}117}
122118
123void FilterBar::UpdateDrawSeparators()
124{
125 std::list<Area*> children = GetLayout()->GetChildren();
126 std::list<Area*>::reverse_iterator rit;
127 bool found_one = false;
128
129 for (rit = children.rbegin(); rit != children.rend(); ++rit)
130 {
131 FilterExpanderLabel* widget = dynamic_cast<FilterExpanderLabel*>(*rit);
132
133 if (!widget)
134 continue;
135
136 widget->draw_separator = found_one;
137 found_one = true;
138 }
139}
140
141//119//
142// Key navigation120// Key navigation
143//121//
144122
=== modified file 'dash/FilterBar.h'
--- dash/FilterBar.h 2012-05-06 23:48:38 +0000
+++ dash/FilterBar.h 2012-09-13 15:55:51 +0000
@@ -60,7 +60,6 @@
6060
61private:61private:
62 void Init();62 void Init();
63 void UpdateDrawSeparators();
6463
65 FilterFactory factory_;64 FilterFactory factory_;
66 Filters::Ptr filters_;65 Filters::Ptr filters_;
6766
=== modified file 'dash/LensBar.cpp'
--- dash/LensBar.cpp 2012-08-09 14:28:50 +0000
+++ dash/LensBar.cpp 2012-09-13 15:55:51 +0000
@@ -31,7 +31,9 @@
3131
32nux::logging::Logger logger("unity.dash.lensbar");32nux::logging::Logger logger("unity.dash.lensbar");
3333
34const int LENSBAR_HEIGHT = 44;34// according to Q design the inner area of the lensbar should be 40px
35// (without any borders)
36const int LENSBAR_HEIGHT = 41;
3537
36}38}
3739
3840
=== modified file 'dash/LensView.cpp'
--- dash/LensView.cpp 2012-08-31 15:46:18 +0000
+++ dash/LensView.cpp 2012-09-13 15:55:51 +0000
@@ -147,7 +147,14 @@
147 lens_->connected.changed.connect([&](bool is_connected) { if (is_connected) initial_activation_ = true; });147 lens_->connected.changed.connect([&](bool is_connected) { if (is_connected) initial_activation_ = true; });
148 lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged));148 lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged));
149 search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string));149 search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string));
150 filters_expanded.changed.connect([&](bool expanded) { fscroll_view_->SetVisible(expanded); QueueRelayout(); OnColumnsChanged(); });150 filters_expanded.changed.connect([&](bool expanded)
151 {
152 fscroll_view_->SetVisible(expanded);
153 QueueRelayout();
154 OnColumnsChanged();
155 ubus_manager_.SendMessage(UBUS_REFINE_STATUS,
156 g_variant_new(UBUS_REFINE_STATUS_FORMAT_STRING, expanded ? TRUE : FALSE));
157 });
151 view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged));158 view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged));
152159
153 ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [&] (GVariant* data) {160 ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [&] (GVariant* data) {
@@ -189,10 +196,15 @@
189196
190 scroll_view_ = new LensScrollView(new PlacesVScrollBar(NUX_TRACKER_LOCATION),197 scroll_view_ = new LensScrollView(new PlacesVScrollBar(NUX_TRACKER_LOCATION),
191 NUX_TRACKER_LOCATION);198 NUX_TRACKER_LOCATION);
192 scroll_view_->EnableVerticalScrollBar(true);199 scroll_view_->EnableVerticalScrollBar(false);
193 scroll_view_->EnableHorizontalScrollBar(false);200 scroll_view_->EnableHorizontalScrollBar(false);
194 layout_->AddView(scroll_view_);201 layout_->AddView(scroll_view_);
195202
203 scroll_view_->OnGeometryChanged.connect([this] (nux::Area *area, nux::Geometry& geo)
204 {
205 CheckScrollBarState();
206 });
207
196 scroll_layout_ = new nux::VLayout(NUX_TRACKER_LOCATION);208 scroll_layout_ = new nux::VLayout(NUX_TRACKER_LOCATION);
197 scroll_view_->SetLayout(scroll_layout_);209 scroll_view_->SetLayout(scroll_layout_);
198 scroll_view_->SetRightArea(show_filters);210 scroll_view_->SetRightArea(show_filters);
@@ -385,6 +397,8 @@
385 scroll_layout_->AddView(group, 0, nux::MinorDimensionPosition::eAbove,397 scroll_layout_->AddView(group, 0, nux::MinorDimensionPosition::eAbove,
386 nux::MinorDimensionSize::eFull, 100.0f,398 nux::MinorDimensionSize::eFull, 100.0f,
387 (nux::LayoutPosition)index);399 (nux::LayoutPosition)index);
400
401 group->SetMinimumWidth(GetGeometry().width+20);
388}402}
389403
390void LensView::OnCategoryOrderChanged()404void LensView::OnCategoryOrderChanged()
@@ -612,6 +626,20 @@
612 ResultViewGrid* grid = static_cast<ResultViewGrid*>(group->GetChildView());626 ResultViewGrid* grid = static_cast<ResultViewGrid*>(group->GetChildView());
613 grid->expanded = group->GetExpanded();627 grid->expanded = group->GetExpanded();
614 ubus_manager_.SendMessage(UBUS_PLACE_VIEW_QUEUE_DRAW);628 ubus_manager_.SendMessage(UBUS_PLACE_VIEW_QUEUE_DRAW);
629
630 CheckScrollBarState();
631}
632
633void LensView::CheckScrollBarState()
634{
635 if (scroll_layout_->GetGeometry().height > scroll_view_->GetGeometry().height)
636 {
637 scroll_view_->EnableVerticalScrollBar(true);
638 }
639 else
640 {
641 scroll_view_->EnableVerticalScrollBar(false);
642 }
615}643}
616644
617void LensView::OnColumnsChanged()645void LensView::OnColumnsChanged()
618646
=== modified file 'dash/LensView.h'
--- dash/LensView.h 2012-08-29 14:50:19 +0000
+++ dash/LensView.h 2012-09-13 15:55:51 +0000
@@ -88,6 +88,7 @@
88 void OnResultRemoved(Result const& result);88 void OnResultRemoved(Result const& result);
89 void UpdateCounts(PlacesGroup* group);89 void UpdateCounts(PlacesGroup* group);
90 void OnGroupExpanded(PlacesGroup* group);90 void OnGroupExpanded(PlacesGroup* group);
91 void CheckScrollBarState();
91 void OnColumnsChanged();92 void OnColumnsChanged();
92 void OnFilterAdded(Filter::Ptr filter);93 void OnFilterAdded(Filter::Ptr filter);
93 void OnFilterRemoved(Filter::Ptr filter);94 void OnFilterRemoved(Filter::Ptr filter);
9495
=== modified file 'dash/PlacesGroup.cpp'
--- dash/PlacesGroup.cpp 2012-08-20 16:49:10 +0000
+++ dash/PlacesGroup.cpp 2012-09-13 15:55:51 +0000
@@ -58,6 +58,7 @@
58const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 0.5f);58const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 0.5f);
59const float kExpandDefaultIconOpacity = 0.5f;59const float kExpandDefaultIconOpacity = 0.5f;
6060
61const int kCategoryIconSize = 22;
61// Category highlight62// Category highlight
62const int kHighlightHeight = 24;63const int kHighlightHeight = 24;
63const int kHighlightRightPadding = 10 - 3; // -3 because the scrollbar is not a real overlay scrollbar!64const int kHighlightRightPadding = 10 - 3; // -3 because the scrollbar is not a real overlay scrollbar!
@@ -114,7 +115,7 @@
114PlacesGroup::PlacesGroup()115PlacesGroup::PlacesGroup()
115 : AbstractPlacesGroup(),116 : AbstractPlacesGroup(),
116 _child_view(nullptr),117 _child_view(nullptr),
117 _is_expanded(true),118 _is_expanded(false),
118 _n_visible_items_in_unexpand_mode(0),119 _n_visible_items_in_unexpand_mode(0),
119 _n_total_items(0),120 _n_total_items(0),
120 _category_index(0),121 _category_index(0),
@@ -127,6 +128,21 @@
127 SetAcceptKeyNavFocusOnMouseEnter(false);128 SetAcceptKeyNavFocusOnMouseEnter(false);
128129
129 nux::BaseTexture* arrow = style.GetGroupUnexpandIcon();130 nux::BaseTexture* arrow = style.GetGroupUnexpandIcon();
131
132 _background = style.GetCategoryBackground();
133 _background_nofilters = style.GetCategoryBackgroundNoFilters();
134
135 nux::ROPConfig rop;
136 rop.Blend = true;
137 rop.SrcBlend = GL_ONE;
138 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
139
140 nux::TexCoordXForm texxform;
141 _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(),
142 texxform,
143 nux::color::White,
144 false,
145 rop));
130146
131 _group_layout = new nux::VLayout("", NUX_TRACKER_LOCATION);147 _group_layout = new nux::VLayout("", NUX_TRACKER_LOCATION);
132148
@@ -142,8 +158,8 @@
142 _header_layout->SetSpaceBetweenChildren(10);158 _header_layout->SetSpaceBetweenChildren(10);
143 _header_view->SetLayout(_header_layout);159 _header_view->SetLayout(_header_layout);
144160
145 _icon = new IconTexture("", 24);161 _icon = new IconTexture("", kCategoryIconSize);
146 _icon->SetMinMaxSize(24, 24);162 _icon->SetMinMaxSize(kCategoryIconSize, kCategoryIconSize);
147 _header_layout->AddView(_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);163 _header_layout->AddView(_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
148164
149 _text_layout = new nux::HLayout(NUX_TRACKER_LOCATION);165 _text_layout = new nux::HLayout(NUX_TRACKER_LOCATION);
@@ -176,15 +192,6 @@
176 _expand_icon->SetVisible(false);192 _expand_icon->SetVisible(false);
177 _expand_layout->AddView(_expand_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);193 _expand_layout->AddView(_expand_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
178194
179 separator_layout_ = new nux::HLayout();
180 separator_layout_->SetLeftAndRightPadding(style.GetCategorySeparatorLeftPadding(),
181 style.GetCategorySeparatorRightPadding() - style.GetScrollbarWidth());
182
183 separator_ = new HSeparator;
184 separator_layout_->AddView(separator_, 1);
185
186 draw_separator.changed.connect(sigc::mem_fun(this, &PlacesGroup::DrawSeparatorChanged));
187
188 SetLayout(_group_layout);195 SetLayout(_group_layout);
189196
190 // don't need to disconnect these signals as they are disconnected when this object destroys the contents197 // don't need to disconnect these signals as they are disconnected when this object destroys the contents
@@ -206,15 +213,8 @@
206 else213 else
207 nux::GetWindowCompositor().SetKeyFocusArea(GetHeaderFocusableView(), direction);214 nux::GetWindowCompositor().SetKeyFocusArea(GetHeaderFocusableView(), direction);
208 });215 });
209}
210216
211void PlacesGroup::DrawSeparatorChanged(bool draw)217 SetMinimumWidth(2000);
212{
213 if (draw and !separator_layout_->IsChildOf(_group_layout))
214 _group_layout->AddView(separator_layout_.GetPointer(), 0);
215 else if (!draw and separator_layout_->IsChildOf(_group_layout))
216 _group_layout->RemoveChildObject(separator_layout_.GetPointer());
217 QueueDraw();
218}218}
219219
220void220void
@@ -252,7 +252,7 @@
252252
253 if (g_strcmp0(renderer_name, "tile-horizontal") == 0)253 if (g_strcmp0(renderer_name, "tile-horizontal") == 0)
254 (static_cast<dash::ResultView*>(_child_view))->SetModelRenderer(new dash::ResultRendererHorizontalTile(NUX_TRACKER_LOCATION));254 (static_cast<dash::ResultView*>(_child_view))->SetModelRenderer(new dash::ResultRendererHorizontalTile(NUX_TRACKER_LOCATION));
255 else255 else if (g_strcmp0(renderer_name, "tile-vertical"))
256 (static_cast<dash::ResultView*>(_child_view))->SetModelRenderer(new dash::ResultRendererTile(NUX_TRACKER_LOCATION));256 (static_cast<dash::ResultView*>(_child_view))->SetModelRenderer(new dash::ResultRendererTile(NUX_TRACKER_LOCATION));
257}257}
258258
@@ -277,7 +277,7 @@
277void277void
278PlacesGroup::SetIcon(std::string const& path_to_emblem)278PlacesGroup::SetIcon(std::string const& path_to_emblem)
279{279{
280 _icon->SetByIconName(path_to_emblem, 24);280 _icon->SetByIconName(path_to_emblem, kCategoryIconSize);
281}281}
282282
283void283void
@@ -395,6 +395,35 @@
395{395{
396 if (GetChildView())396 if (GetChildView())
397 {397 {
398
399 nux::ROPConfig rop;
400 rop.Blend = true;
401 rop.SrcBlend = GL_ONE;
402 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
403
404 nux::TexCoordXForm texxform;
405 if (_n_visible_items_in_unexpand_mode < 6 && _using_nofilters_background)
406 {
407 LOG_DEBUG(logger) << "drawing unexpanded texture";
408 _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(),
409 texxform,
410 nux::color::White,
411 false,
412 rop));
413 _using_nofilters_background = false;
414 }
415 else if (_n_visible_items_in_unexpand_mode >= 6 && !_using_nofilters_background)
416 {
417 LOG_DEBUG(logger) << "drawing expanded texture";
418 _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(),
419 texxform,
420 nux::color::White,
421 false,
422 rop));
423
424 _using_nofilters_background = true;
425 }
426
398 Refresh();427 Refresh();
399 QueueDraw();428 QueueDraw();
400 _group_layout->QueueDraw();429 _group_layout->QueueDraw();
@@ -416,10 +445,8 @@
416 if (_cached_geometry.GetWidth() != geo.GetWidth())445 if (_cached_geometry.GetWidth() != geo.GetWidth())
417 {446 {
418 _focus_layer.reset(dash::Style::Instance().FocusOverlay(geo.width - kHighlightLeftPadding - kHighlightRightPadding, kHighlightHeight));447 _focus_layer.reset(dash::Style::Instance().FocusOverlay(geo.width - kHighlightLeftPadding - kHighlightRightPadding, kHighlightHeight));
419
420 _cached_geometry = geo;448 _cached_geometry = geo;
421 }449 }
422
423 return ret;450 return ret;
424}451}
425452
@@ -429,6 +456,8 @@
429 nux::Geometry const& base = GetGeometry();456 nux::Geometry const& base = GetGeometry();
430 graphics_engine.PushClippingRectangle(base);457 graphics_engine.PushClippingRectangle(base);
431458
459 LOG_DEBUG(logger) << "places group geo: " << base.width;
460
432 if (ShouldBeHighlighted())461 if (ShouldBeHighlighted())
433 {462 {
434 nux::Geometry geo(_header_layout->GetGeometry());463 nux::Geometry geo(_header_layout->GetGeometry());
@@ -439,6 +468,20 @@
439 _focus_layer->Renderlayer(graphics_engine);468 _focus_layer->Renderlayer(graphics_engine);
440 }469 }
441470
471 nux::Geometry bg_geo = GetGeometry();
472 int bg_width = 0;
473 if (_using_nofilters_background)
474 bg_width = _background_nofilters->GetWidth();
475 else
476 bg_width = _background->GetWidth();
477
478 bg_geo.x = std::max(bg_geo.width - bg_width,0);
479
480 bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 10;
481 bg_geo.height = _background->GetHeight();
482
483 _background_layer->SetGeometry(bg_geo);
484 _background_layer->Renderlayer(graphics_engine);
442 graphics_engine.PopClippingRectangle();485 graphics_engine.PopClippingRectangle();
443}486}
444487
@@ -448,7 +491,24 @@
448 nux::Geometry const& base = GetGeometry();491 nux::Geometry const& base = GetGeometry();
449492
450 graphics_engine.PushClippingRectangle(base);493 graphics_engine.PushClippingRectangle(base);
494 nux::Geometry bg_geo = GetGeometry();
495
496 int bg_width = 0;
497 if (_using_nofilters_background)
498 bg_width = _background_nofilters->GetWidth();
499 else
500 bg_width = _background->GetWidth();
501
502 // if the dash is smaller, resize to fit, otherwise move to the right edge
503 bg_geo.x = std::max(bg_geo.width - bg_width, 0);
504 bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 10;
505
506 bg_geo.height = _background->GetHeight();
451507
508 if (!IsFullRedraw())
509 {
510 nux::GetPainter().PushLayer(graphics_engine, bg_geo, _background_layer.get());
511 }
452 if (ShouldBeHighlighted() && !IsFullRedraw() && _focus_layer)512 if (ShouldBeHighlighted() && !IsFullRedraw() && _focus_layer)
453 {513 {
454 nux::GetPainter().PushLayer(graphics_engine, _focus_layer->GetGeometry(), _focus_layer.get());514 nux::GetPainter().PushLayer(graphics_engine, _focus_layer->GetGeometry(), _focus_layer.get());
455515
=== modified file 'dash/PlacesGroup.h'
--- dash/PlacesGroup.h 2012-08-20 16:49:10 +0000
+++ dash/PlacesGroup.h 2012-09-13 15:55:51 +0000
@@ -123,8 +123,6 @@
123 nux::HLayout* _expand_label_layout;123 nux::HLayout* _expand_label_layout;
124 nux::HLayout* _expand_layout;124 nux::HLayout* _expand_layout;
125 nux::View* _child_view;125 nux::View* _child_view;
126 nux::ObjectPtr<nux::HLayout> separator_layout_;
127 HSeparator* separator_;
128 std::unique_ptr<nux::AbstractPaintLayer> _focus_layer;126 std::unique_ptr<nux::AbstractPaintLayer> _focus_layer;
129127
130 IconTexture* _icon;128 IconTexture* _icon;
@@ -132,12 +130,16 @@
132 nux::StaticCairoText* _expand_label;130 nux::StaticCairoText* _expand_label;
133 IconTexture* _expand_icon;131 IconTexture* _expand_icon;
134132
133 nux::BaseTexture* _background;
134 nux::BaseTexture* _background_nofilters;
135 bool _using_nofilters_background;
136 std::unique_ptr<nux::AbstractPaintLayer> _background_layer;
137
135 bool _is_expanded;138 bool _is_expanded;
136 unsigned _n_visible_items_in_unexpand_mode;139 unsigned _n_visible_items_in_unexpand_mode;
137 unsigned _n_total_items;140 unsigned _n_total_items;
138 unsigned _category_index;141 unsigned _category_index;
139 std::string _cached_name;142 std::string _cached_name;
140 bool _draw_sep;
141 nux::Geometry _cached_geometry;143 nux::Geometry _cached_geometry;
142 144
143 std::string _renderer_name;145 std::string _renderer_name;
144146
=== modified file 'dash/previews/ActionButton.cpp'
--- dash/previews/ActionButton.cpp 2012-08-28 08:30:00 +0000
+++ dash/previews/ActionButton.cpp 2012-09-13 15:55:51 +0000
@@ -29,7 +29,7 @@
2929
30namespace30namespace
31{31{
32const int kMinButtonHeight = 36;32const int kMinButtonHeight = 34;
33const int kMinButtonWidth = 48;33const int kMinButtonWidth = 48;
3434
35const int icon_size = 24;35const int icon_size = 24;
3636
=== modified file 'dash/previews/PreviewContainer.cpp'
--- dash/previews/PreviewContainer.cpp 2012-09-04 10:45:31 +0000
+++ dash/previews/PreviewContainer.cpp 2012-09-13 15:55:51 +0000
@@ -62,6 +62,7 @@
62 PreviewContent(PreviewContainer*const parent)62 PreviewContent(PreviewContainer*const parent)
63 : parent_(parent)63 : parent_(parent)
64 , progress_(0.0)64 , progress_(0.0)
65 , curve_progress_(0.0)
65 , animating_(false)66 , animating_(false)
66 , waiting_preview_(false)67 , waiting_preview_(false)
67 , rotation_(0.0)68 , rotation_(0.0)
@@ -69,6 +70,11 @@
69 , nav_complete_(0)70 , nav_complete_(0)
70 , relative_nav_index_(0)71 , relative_nav_index_(0)
71 {72 {
73 OnGeometryChanged.connect([&](nux::Area*, nux::Geometry& geo)
74 {
75 // Need to update the preview geometries when updating the container geo.
76 UpdateAnimationProgress(progress_, curve_progress_);
77 });
72 Style& style = previews::Style::Instance();78 Style& style = previews::Style::Instance();
7379
74 spin_= style.GetSearchSpinIcon(256);80 spin_= style.GetSearchSpinIcon(256);
@@ -98,6 +104,9 @@
98104
99 if (preview)105 if (preview)
100 {106 {
107 // the parents layout will not change based on the previews.
108 preview->SetReconfigureParentLayoutOnGeometryChange(false);
109
101 AddChild(preview.GetPointer());110 AddChild(preview.GetPointer());
102 AddView(preview.GetPointer());111 AddView(preview.GetPointer());
103 preview->SetVisible(false);112 preview->SetVisible(false);
@@ -123,6 +132,7 @@
123 void UpdateAnimationProgress(float progress, float curve_progress)132 void UpdateAnimationProgress(float progress, float curve_progress)
124 {133 {
125 progress_ = progress;134 progress_ = progress;
135 curve_progress_ = curve_progress;
126136
127 if (!animating_)137 if (!animating_)
128 {138 {
@@ -171,39 +181,43 @@
171181
172 if (progress >= 1.0)182 if (progress >= 1.0)
173 {183 {
174 animating_ = false;184 // if we were animating, we need to remove the old preview, and replace it with the new.
175 if (current_preview_)185 if (animating_)
176 {186 {
177 RemoveChild(current_preview_.GetPointer());187 animating_ = false;
178 RemoveChildObject(current_preview_.GetPointer());
179 current_preview_.Release();
180 }
181 if (swipe_.preview)
182 {
183 if (swipe_.direction == Navigation::RIGHT)
184 relative_nav_index_++;
185 else if (swipe_.direction == Navigation::LEFT)
186 relative_nav_index_--;
187
188 current_preview_ = swipe_.preview;
189 swipe_.preview.Release();
190 if (current_preview_)188 if (current_preview_)
191 current_preview_->OnNavigateInComplete();189 {
192 }190 RemoveChild(current_preview_.GetPointer());
193191 RemoveChildObject(current_preview_.GetPointer());
194 // another swipe?192 current_preview_.Release();
195 if (!push_preview_.empty())193 }
196 {194 if (swipe_.preview)
197 progress_ = 0;195 {
198 continue_navigation.emit();196 if (swipe_.direction == Navigation::RIGHT)
199 }197 relative_nav_index_++;
200 else198 else if (swipe_.direction == Navigation::LEFT)
201 {199 relative_nav_index_--;
202 end_navigation.emit();200
201 current_preview_ = swipe_.preview;
202 swipe_.preview.Release();
203 if (current_preview_)
204 current_preview_->OnNavigateInComplete();
205 }
206
207 // another swipe?
208 if (!push_preview_.empty())
209 {
210 progress_ = 0;
211 continue_navigation.emit();
212 }
213 else
214 {
215 end_navigation.emit();
216 }
203 }217 }
204218
205 // set the geometry to the whole layout.219 // set the geometry to the whole layout.
206 if (current_preview_ && current_preview_->GetGeometry() != geometry)220 if (current_preview_)
207 {221 {
208 current_preview_->SetGeometry(geometry);222 current_preview_->SetGeometry(geometry);
209 }223 }
@@ -309,7 +323,7 @@
309 }323 }
310 }324 }
311325
312 _queued_draw = false;326 //_queued_draw = false;
313 }327 }
314328
315 sigc::signal<void> start_navigation;329 sigc::signal<void> start_navigation;
@@ -332,6 +346,7 @@
332 PreviewSwipe swipe_;346 PreviewSwipe swipe_;
333347
334 float progress_;348 float progress_;
349 float curve_progress_;
335 bool animating_;350 bool animating_;
336 // wait animation351 // wait animation
337 glib::Source::UniquePtr preview_wait_timer_;352 glib::Source::UniquePtr preview_wait_timer_;
338353
=== modified file 'launcher/LauncherController.cpp'
--- launcher/LauncherController.cpp 2012-09-04 16:40:30 +0000
+++ launcher/LauncherController.cpp 2012-09-13 15:55:51 +0000
@@ -244,7 +244,7 @@
244{244{
245 static bool keynav_first_focus = false;245 static bool keynav_first_focus = false;
246246
247 if (parent_->IsOverlayOpen())247 if (parent_->IsOverlayOpen() || launcher_->GetParent()->GetInputWindowId() == xid)
248 keynav_first_focus = false;248 keynav_first_focus = false;
249249
250 if (keynav_first_focus)250 if (keynav_first_focus)
251251
=== modified file 'manual-tests/Dash.txt'
--- manual-tests/Dash.txt 2012-08-28 12:23:15 +0000
+++ manual-tests/Dash.txt 2012-09-13 15:55:51 +0000
@@ -100,6 +100,19 @@
100 * When a single row of results isn't enough to contain all returned search results, and there are no other category headers, the displayed category100 * 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
101 header expands automatically101 header expands automatically
102102
103
104Test the Panel does not lose track of when the Dash is opened then closed.
105--------------------------------------------------------------------------
106This tests shows the panel will not think the Dash is opened when it is closed.
107(see lp:1044086)
108
109Actions:
110#. Press Super twice (Quickly)
111
112Expected Result:
113 The screen should look the same as if you had never opened the dash.
114
115
103Filter Results Tests116Filter Results Tests
104========================117========================
105These tests show that the dash "All" button works well.118These tests show that the dash "All" button works well.
106119
=== modified file 'manual-tests/Preview.txt'
--- manual-tests/Preview.txt 2012-08-31 14:10:27 +0000
+++ manual-tests/Preview.txt 2012-09-13 15:55:51 +0000
@@ -5,7 +5,7 @@
55
6Setup:6Setup:
7#. Open dash super7#. Open dash super
8#. Open a lens which supports previeing (eg Application, Music, File)8#. Open a lens which supports previewing (e.g. Application, Music, File)
9#. Enter arbitrary search string and ensure a result is available.9#. Enter arbitrary search string and ensure a result is available.
1010
11Actions:11Actions:
@@ -23,7 +23,7 @@
2323
24Setup:24Setup:
25#. Open dash super25#. Open dash super
26#. Open a lens which supports previeing (eg Application, Music, File)26#. Open a lens which supports previewing (e.g. Application, Music, File)
27#. Enter arbitrary search string and ensure at least 2 results are available.27#. Enter arbitrary search string and ensure at least 2 results are available.
28#. Right-click the mouse on at least the second result.28#. Right-click the mouse on at least the second result.
29#. Wait for the preview window to open and finish animating.29#. Wait for the preview window to open and finish animating.
@@ -32,7 +32,7 @@
32#. Click the 'navigate left' icon.32#. Click the 'navigate left' icon.
3333
34Expected Result:34Expected Result:
35 The current preview will swipe out and the new prevew result will swipe from right35 The current preview will swipe out and the new preview result will swipe from right
36 to left using an ease in-out curve progression.36 to left using an ease in-out curve progression.
3737
3838
@@ -43,7 +43,7 @@
4343
44Setup:44Setup:
45#. Open dash super45#. Open dash super
46#. Open a lens which supports previeing (eg Application, Music, File)46#. Open a lens which supports previewing (e.g. Application, Music, File)
47#. Enter arbitrary search string and ensure at least 2 results are available.47#. Enter arbitrary search string and ensure at least 2 results are available.
48#. Right-click the mouse on at most the second last result.48#. Right-click the mouse on at most the second last result.
49#. Wait for the preview window to open and finish animating.49#. Wait for the preview window to open and finish animating.
@@ -52,7 +52,7 @@
52#. Click the navigate right icon.52#. Click the navigate right icon.
5353
54Expected Result:54Expected Result:
55 The current preview will swipe out and the new prevew result will swipe from right55 The current preview will swipe out and the new preview result will swipe from right
56 to left using an ease in-out curve progression.56 to left using an ease in-out curve progression.
5757
5858
@@ -111,7 +111,7 @@
111Expected Result:111Expected Result:
112 When hovering on play icon, it will change to a pause icon.112 When hovering on play icon, it will change to a pause icon.
113 Music Player daemon will pause the playing track and update it's status113 Music Player daemon will pause the playing track and update it's status
114 to paused. Progress will stop incresing.114 to paused. Progress will stop increasing.
115115
116116
117Preview Application Launch117Preview Application Launch
@@ -130,3 +130,24 @@
130130
131Expected Result:131Expected Result:
132 Preview should close and launch the gedit application.132 Preview should close and launch the gedit application.
133
134
135Preview Open Geometry
136------------
137This tests the dash preview opens with the correct size and
138its geometry is updated when changing between form factor (desktop & netbook)
139
140Setup:
141#. Open dash super
142#. Ensure dash is in windowed mode (not full screen)
143#. Open a lens which supports previewing (e.g. Application, Music, File)
144#. Enter arbitrary search string and ensure a result is available.
145
146Actions:
147#. Open preview for result.
148#. Resize dash to full screen.
149#. Resize dash back to windowed mode.
150
151Expected Result:
152 A preview will open with the correct size initially (no size flicker).
153 When the dash is resized, the preview will center its geometry and stay the correct size.
133154
=== modified file 'panel/PanelController.cpp'
--- panel/PanelController.cpp 2012-07-23 21:50:30 +0000
+++ panel/PanelController.cpp 2012-09-13 15:55:51 +0000
@@ -53,6 +53,7 @@
53 std::vector<nux::Geometry> GetGeometries() const;53 std::vector<nux::Geometry> GetGeometries() const;
5454
55 // NOTE: nux::Property maybe?55 // NOTE: nux::Property maybe?
56 void SetLauncherWidth(int width);
56 void SetOpacity(float opacity);57 void SetOpacity(float opacity);
57 void SetOpacityMaximizedToggle(bool enabled);58 void SetOpacityMaximizedToggle(bool enabled);
5859
@@ -147,6 +148,14 @@
147 }148 }
148}149}
149150
151void Controller::Impl::SetLauncherWidth(int width)
152{
153 for (auto window: windows_)
154 {
155 ViewForWindow(window)->SetLauncherWidth(width);
156 }
157}
158
150void Controller::Impl::SetOpacityMaximizedToggle(bool enabled)159void Controller::Impl::SetOpacityMaximizedToggle(bool enabled)
151{160{
152 opacity_maximized_toggle_ = enabled;161 opacity_maximized_toggle_ = enabled;
@@ -297,6 +306,11 @@
297 UScreen* screen = UScreen::GetDefault();306 UScreen* screen = UScreen::GetDefault();
298 screen->changed.connect(sigc::mem_fun(this, &Controller::OnScreenChanged));307 screen->changed.connect(sigc::mem_fun(this, &Controller::OnScreenChanged));
299 OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors());308 OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors());
309
310 launcher_width.changed.connect([&] (int width)
311 {
312 pimpl->SetLauncherWidth(width);
313 });
300}314}
301315
302Controller::~Controller()316Controller::~Controller()
303317
=== modified file 'panel/PanelController.h'
--- panel/PanelController.h 2012-06-19 08:52:39 +0000
+++ panel/PanelController.h 2012-09-13 15:55:51 +0000
@@ -44,6 +44,8 @@
44 std::vector<nux::View*> GetPanelViews() const;44 std::vector<nux::View*> GetPanelViews() const;
45 std::vector<nux::Geometry> GetGeometries() const;45 std::vector<nux::Geometry> GetGeometries() const;
4646
47 nux::Property<int> launcher_width;
48
47 // NOTE: nux::Property maybe?49 // NOTE: nux::Property maybe?
48 void SetOpacity(float opacity);50 void SetOpacity(float opacity);
49 void SetOpacityMaximizedToggle(bool enabled);51 void SetOpacityMaximizedToggle(bool enabled);
5052
=== modified file 'panel/PanelView.cpp'
--- panel/PanelView.cpp 2012-07-26 09:56:17 +0000
+++ panel/PanelView.cpp 2012-09-13 15:55:51 +0000
@@ -44,7 +44,8 @@
4444
45namespace45namespace
46{46{
47nux::logging::Logger logger("unity.PanelView");47nux::logging::Logger logger("unity.panel.view");
48const int refine_gradient_midpoint = 959;
48}49}
4950
50namespace unity51namespace unity
@@ -61,6 +62,8 @@
61 , _overlay_is_open(false)62 , _overlay_is_open(false)
62 , _opacity(1.0f)63 , _opacity(1.0f)
63 , _monitor(0)64 , _monitor(0)
65 , _stored_dash_width(0)
66 , _launcher_width(0)
64{67{
65 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground));68 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground));
6669
@@ -98,7 +101,47 @@
98 _ubus_manager.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED, sigc::mem_fun(this, &PanelView::OnBackgroundUpdate));101 _ubus_manager.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED, sigc::mem_fun(this, &PanelView::OnBackgroundUpdate));
99 _ubus_manager.RegisterInterest(UBUS_OVERLAY_HIDDEN, sigc::mem_fun(this, &PanelView::OnOverlayHidden));102 _ubus_manager.RegisterInterest(UBUS_OVERLAY_HIDDEN, sigc::mem_fun(this, &PanelView::OnOverlayHidden));
100 _ubus_manager.RegisterInterest(UBUS_OVERLAY_SHOWN, sigc::mem_fun(this, &PanelView::OnOverlayShown));103 _ubus_manager.RegisterInterest(UBUS_OVERLAY_SHOWN, sigc::mem_fun(this, &PanelView::OnOverlayShown));
101104 _ubus_manager.RegisterInterest(UBUS_DASH_SIZE_CHANGED, [&] (GVariant *data)
105 {
106 int width, height;
107 g_variant_get(data, "(ii)", &width, &height);
108 _stored_dash_width = width;
109 QueueDraw();
110 });
111
112 _ubus_manager.RegisterInterest(UBUS_REFINE_STATUS, [this] (GVariant *data)
113 {
114 gboolean status;
115 g_variant_get(data, UBUS_REFINE_STATUS_FORMAT_STRING, &status);
116
117 _refine_is_open = status;
118
119 nux::ROPConfig rop;
120 rop.Blend = true;
121 rop.SrcBlend = GL_ONE;
122 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
123
124 nux::TexCoordXForm texxform;
125 if (_refine_is_open)
126 {
127 _bg_refine_layer.reset(new nux::TextureLayer(_bg_refine_tex->GetDeviceTexture(),
128 texxform,
129 nux::color::White,
130 false,
131 rop));
132 }
133 else
134 {
135 _bg_refine_layer.reset(new nux::TextureLayer(_bg_refine_no_refine_tex->GetDeviceTexture(),
136 texxform,
137 nux::color::White,
138 false,
139 rop));
140
141 }
142 QueueDraw();
143 });
144
102 // request the latest colour from bghash145 // request the latest colour from bghash
103 _ubus_manager.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);146 _ubus_manager.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);
104147
@@ -116,6 +159,61 @@
116 {159 {
117 _panel_sheen.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true));160 _panel_sheen.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true));
118 }161 }
162
163 //FIXME (gord) like 12 months later, still not async loading!
164 pixbuf = gdk_pixbuf_new_from_file(PKGDATADIR "/refine_gradient_panel.png", &error);
165 if (error)
166 {
167 LOG_WARN(logger) << "Unable to texture " << PKGDATADIR << "/refine_gradient_panel.png";
168 }
169 else
170 {
171 _bg_refine_tex.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true));
172 }
173
174 //FIXME (gord) like 12 months later, still not async loading!
175 pixbuf = gdk_pixbuf_new_from_file(PKGDATADIR "/refine_gradient_panel_no_refine.png", &error);
176 if (error)
177 {
178 LOG_WARN(logger) << "Unable to texture " << PKGDATADIR << "/refine_gradient_panel_no_refine.png";
179 }
180 else
181 {
182 _bg_refine_no_refine_tex.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true));
183 }
184
185 rop.Blend = true;
186 rop.SrcBlend = GL_ONE;
187 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
188
189 nux::TexCoordXForm texxform;
190 _bg_refine_layer.reset(new nux::TextureLayer(_bg_refine_tex->GetDeviceTexture(),
191 texxform,
192 nux::color::White,
193 false,
194 rop));
195
196 //FIXME (gord) like 12 months later, still not async loading!
197 pixbuf = gdk_pixbuf_new_from_file(PKGDATADIR "/refine_gradient_panel_single_column.png", &error);
198 if (error)
199 {
200 LOG_WARN(logger) << "Unable to texture " << PKGDATADIR << "/refine_gradient_panel_single_column.png";
201 }
202 else
203 {
204 _bg_refine_single_column_tex.Adopt(nux::CreateTexture2DFromPixbuf(pixbuf, true));
205 }
206
207 rop.Blend = true;
208 rop.SrcBlend = GL_ONE;
209 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
210
211 _bg_refine_single_column_layer.reset(new nux::TextureLayer(_bg_refine_single_column_tex->GetDeviceTexture(),
212 texxform,
213 nux::color::White,
214 false,
215 rop));
216
119}217}
120218
121PanelView::~PanelView()219PanelView::~PanelView()
@@ -138,6 +236,12 @@
138 return _tray->xid();236 return _tray->xid();
139}237}
140238
239void PanelView::SetLauncherWidth(int width)
240{
241 _launcher_width = width;
242 QueueDraw();
243}
244
141void PanelView::OnBackgroundUpdate(GVariant *data)245void PanelView::OnBackgroundUpdate(GVariant *data)
142{246{
143 gdouble red, green, blue, alpha;247 gdouble red, green, blue, alpha;
@@ -219,6 +323,7 @@
219void323void
220PanelView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)324PanelView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
221{325{
326 LOG_DEBUG(logger) << "test";
222 nux::Geometry const& geo = GetGeometry();327 nux::Geometry const& geo = GetGeometry();
223 UpdateBackground();328 UpdateBackground();
224329
@@ -285,6 +390,28 @@
285 if (_overlay_is_open)390 if (_overlay_is_open)
286 {391 {
287 nux::GetPainter().RenderSinglePaintLayer(GfxContext, geo, _bg_darken_layer.get());392 nux::GetPainter().RenderSinglePaintLayer(GfxContext, geo, _bg_darken_layer.get());
393
394 GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
395 nux::TexCoordXForm refine_texxform;
396
397 int refine_x_pos = geo.x + (_stored_dash_width - refine_gradient_midpoint);
398
399 refine_x_pos += _launcher_width;
400 GfxContext.QRP_1Tex(refine_x_pos,
401 geo.y,
402 _bg_refine_tex->GetWidth(),
403 _bg_refine_tex->GetHeight(),
404 _bg_refine_tex->GetDeviceTexture(),
405 refine_texxform,
406 nux::color::White);
407
408 GfxContext.QRP_1Tex(refine_x_pos + _bg_refine_tex->GetWidth(),
409 geo.y,
410 geo.width,
411 geo.height,
412 _bg_refine_single_column_tex->GetDeviceTexture(),
413 refine_texxform,
414 nux::color::White);
288 }415 }
289 }416 }
290417
@@ -360,6 +487,24 @@
360 {487 {
361 nux::GetPainter().PushLayer(GfxContext, geo, _bg_darken_layer.get());488 nux::GetPainter().PushLayer(GfxContext, geo, _bg_darken_layer.get());
362 bgs++;489 bgs++;
490
491 nux::Geometry refine_geo = geo;
492
493 int refine_x_pos = geo.x + (_stored_dash_width - refine_gradient_midpoint);
494 refine_x_pos += _launcher_width;
495
496 refine_geo.x = refine_x_pos;
497 refine_geo.width = _bg_refine_tex->GetWidth();
498 refine_geo.height = _bg_refine_tex->GetHeight();
499
500 nux::GetPainter().PushLayer(GfxContext, refine_geo, _bg_refine_layer.get());
501 bgs++;
502
503 refine_geo.x += refine_geo.width;
504 refine_geo.width = geo.width;
505 refine_geo.height = geo.height;
506 nux::GetPainter().PushLayer(GfxContext, refine_geo, _bg_refine_single_column_layer.get());
507 bgs++;
363 }508 }
364 }509 }
365510
366511
=== modified file 'panel/PanelView.h'
--- panel/PanelView.h 2012-07-04 02:37:23 +0000
+++ panel/PanelView.h 2012-09-13 15:55:51 +0000
@@ -64,6 +64,8 @@
6464
65 Window GetTrayXid() const;65 Window GetTrayXid() const;
6666
67 void SetLauncherWidth(int width);
68
67protected:69protected:
68 void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);70 void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);
69 void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw);71 void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw);
@@ -105,6 +107,12 @@
105 nux::ObjectPtr<nux::BaseTexture> _panel_sheen;107 nux::ObjectPtr<nux::BaseTexture> _panel_sheen;
106 nux::HLayout* _layout;108 nux::HLayout* _layout;
107109
110 nux::ObjectPtr <nux::BaseTexture> _bg_refine_tex;
111 nux::ObjectPtr <nux::BaseTexture> _bg_refine_no_refine_tex;
112
113 std::unique_ptr<nux::AbstractPaintLayer> _bg_refine_layer;
114 nux::ObjectPtr <nux::BaseTexture> _bg_refine_single_column_tex;
115 std::unique_ptr<nux::AbstractPaintLayer> _bg_refine_single_column_layer;
108 nux::Geometry _last_geo;116 nux::Geometry _last_geo;
109117
110 nux::Color _bg_color;118 nux::Color _bg_color;
@@ -115,6 +123,9 @@
115 bool _overlay_is_open;123 bool _overlay_is_open;
116 float _opacity;124 float _opacity;
117 int _monitor;125 int _monitor;
126 int _stored_dash_width;
127 int _launcher_width;
128 bool _refine_is_open;
118129
119 std::string _active_overlay;130 std::string _active_overlay;
120131
121132
=== modified file 'panel/StandalonePanel.cpp'
--- panel/StandalonePanel.cpp 2012-08-15 02:51:33 +0000
+++ panel/StandalonePanel.cpp 2012-09-13 15:55:51 +0000
@@ -18,11 +18,12 @@
18 *18 *
19 */19 */
2020
21#include "Nux/Nux.h"21#include <Nux/Nux.h>
22#include "Nux/VLayout.h"22#include <Nux/VLayout.h>
23#include "Nux/HLayout.h"23#include <Nux/HLayout.h>
24#include "Nux/WindowThread.h"24#include <Nux/WindowThread.h>
25#include "NuxGraphics/GraphicsEngine.h"25#include <NuxGraphics/GraphicsEngine.h>
26#include <NuxCore/Logger.h>
26#include <gtk/gtk.h>27#include <gtk/gtk.h>
2728
28#include "unity-shared/UnitySettings.h"29#include "unity-shared/UnitySettings.h"
@@ -47,7 +48,8 @@
47 g_type_init();48 g_type_init();
48 gtk_init(&argc, &argv);49 gtk_init(&argc, &argv);
49 nux::NuxInitialize(0);50 nux::NuxInitialize(0);
5051 nux::logging::configure_logging(::getenv("UNITY_LOG_SEVERITY"));
52
51 // The instances for the pseudo-singletons.53 // The instances for the pseudo-singletons.
52 unity::Settings settings;54 unity::Settings settings;
53 unity::panel::Style panel_style;55 unity::panel::Style panel_style;
5456
=== added file 'plugins/unityshell/resources/category_gradient.png'
55Binary 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 differ57Binary 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
=== added file 'plugins/unityshell/resources/category_gradient_no_refine.png'
56Binary 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 differ58Binary 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
=== modified file 'plugins/unityshell/resources/lens-nav-app.svg'
--- plugins/unityshell/resources/lens-nav-app.svg 2011-06-30 17:24:25 +0000
+++ plugins/unityshell/resources/lens-nav-app.svg 2012-09-13 15:55:51 +0000
@@ -1,17 +1,17 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->2<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"4<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"
5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6<g>6<path fill="#FFFFFF" d="M14,8v12c0,0.55-0.45,1-1,1h-2c-0.55,0-1-0.45-1-1V8H14z"/>
7 <g>7<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
8 <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,218 c0.55,0,1-0.45,1-1v-3H6v-1h2v-2H6v-1h2V11z"/>
9 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,2z9<path fill="#FFFFFF" d="M8,8L8,8V7l0,0V8z"/>
10 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.01510<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
11 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-111 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
12 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-512 C20,5.26,18.84,3.578,18.366,3z"/>
13 L9.438,7z M16.5,21c0,0.55,0.45,1,1,1h3c0.55,0,1-0.45,1-1V9h-5V21z"/>13<path fill="#FFFFFF" d="M20,9v11c0,0.55-0.45,1-1,1h-2c-0.55,0-1-0.45-1-1V9H20z"/>
14 </g>14<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
15</g>15 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
16 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"/>
16</svg>17</svg>
17
18\ No newline at end of file18\ No newline at end of file
1919
=== modified file 'plugins/unityshell/resources/lens-nav-file.svg'
--- plugins/unityshell/resources/lens-nav-file.svg 2011-06-30 17:24:25 +0000
+++ plugins/unityshell/resources/lens-nav-file.svg 2012-09-13 15:55:51 +0000
@@ -1,13 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->2<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"4<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"
5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6<g>6<path fill="#FFFFFF" d="M15,3v4h4V6l-3.031-3H15z"/>
7 <g>7<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"/>
8 <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
9 V9.007h-7V2z"/>
10 </g>
11</g>
12</svg>8</svg>
13
14\ No newline at end of file9\ No newline at end of file
1510
=== added file 'plugins/unityshell/resources/lens-nav-gwibber.svg'
--- plugins/unityshell/resources/lens-nav-gwibber.svg 1970-01-01 00:00:00 +0000
+++ plugins/unityshell/resources/lens-nav-gwibber.svg 2012-09-13 15:55:51 +0000
@@ -0,0 +1,14 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"
5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6<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
7 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
8 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
9 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
10 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
11 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
12 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
13 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"/>
14</svg>
015
=== modified file 'plugins/unityshell/resources/lens-nav-home.svg'
--- plugins/unityshell/resources/lens-nav-home.svg 2011-06-30 17:24:25 +0000
+++ plugins/unityshell/resources/lens-nav-home.svg 2012-09-13 15:55:51 +0000
@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->2<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"4<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"
5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6<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,226<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M12.678,3.268C12.5,3.089,12.266,3,12.031,3
7 h5.02v-6.127h3.968V22H19c0.55,0,1-0.461,1-1.021v-9.191h2L12.707,2.298z"/>7 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
8 V20.998z"/>
8</svg>9</svg>
9
10\ No newline at end of file10\ No newline at end of file
1111
=== modified file 'plugins/unityshell/resources/lens-nav-music.svg'
--- plugins/unityshell/resources/lens-nav-music.svg 2011-06-30 17:24:25 +0000
+++ plugins/unityshell/resources/lens-nav-music.svg 2012-09-13 15:55:51 +0000
@@ -1,16 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->2<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"4<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"
5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6<g>6<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
7 <g>7 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
8 <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.0268 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
9 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.6379 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
10 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.00610 C19.331,17.557,20.122,16.163,19.964,14.964z"/>
11 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
12 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"/>
13 </g>
14</g>
15</svg>11</svg>
16
17\ No newline at end of file12\ No newline at end of file
1813
=== modified file 'plugins/unityshell/resources/lens-nav-photo.svg'
--- plugins/unityshell/resources/lens-nav-photo.svg 2011-06-30 17:24:25 +0000
+++ plugins/unityshell/resources/lens-nav-photo.svg 2012-09-13 15:55:51 +0000
@@ -1,16 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->2<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"4<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"
5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6<g>6<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"/>
7 <g>7<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
8 <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.0138 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
9 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.519 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
10 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.99610 C17,16.262,14.761,18.5,12,18.5z"/>
11 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
12 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"/>
13 </g>
14</g>
15</svg>11</svg>
16
17\ No newline at end of file12\ No newline at end of file
1813
=== modified file 'plugins/unityshell/resources/lens-nav-video.svg'
--- plugins/unityshell/resources/lens-nav-video.svg 2011-06-30 17:24:25 +0000
+++ plugins/unityshell/resources/lens-nav-video.svg 2012-09-13 15:55:51 +0000
@@ -1,14 +1,13 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->2<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"4<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"
5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">5 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6<g>6<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
7 <g>7 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
8 <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-28 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
9 h2V19z M5,16H3v-2h2V16z M5,13H3v-2h2V13z M5,10H3V8h2V10z M5,7H3V5h2V7z M9,15.98V8l7.036,4L9,15.98z M21,19h-2v-2h2V19z M21,169 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
10 h-2v-2h2V16z M21,13h-2v-2h2V13z M21,10h-2V8h2V10z M21,7h-2V5h2V7z"/>10 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
11 </g>11 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
12</g>12 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"/>
13</svg>13</svg>
14
15\ No newline at end of file14\ No newline at end of file
1615
=== added file 'plugins/unityshell/resources/refine_gradient.png'
17Binary 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 differ16Binary 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
=== added file 'plugins/unityshell/resources/refine_gradient_corner.png'
18Binary 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 differ17Binary 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
=== added file 'plugins/unityshell/resources/refine_gradient_dash.png'
19Binary 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 differ18Binary 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
=== added file 'plugins/unityshell/resources/refine_gradient_dash_no_refine.png'
20Binary 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 differ19Binary 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
=== added file 'plugins/unityshell/resources/refine_gradient_no_refine_dash.png'
21Binary 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 differ20Binary 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
=== added file 'plugins/unityshell/resources/refine_gradient_panel.png'
22Binary 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 differ21Binary 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
=== added file 'plugins/unityshell/resources/refine_gradient_panel_single_column.png'
23Binary 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 differ22Binary 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
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-09-07 12:40:24 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-09-13 15:55:51 +0000
@@ -131,7 +131,6 @@
131 , panel_texture_has_changed_(true)131 , panel_texture_has_changed_(true)
132 , paint_panel_(false)132 , paint_panel_(false)
133 , scale_just_activated_(false)133 , scale_just_activated_(false)
134 , scale_highlighted_window_(0)
135 , minimize_speed_controller(new WindowMinimizeSpeedController())134 , minimize_speed_controller(new WindowMinimizeSpeedController())
136{135{
137 Timer timer;136 Timer timer;
@@ -359,7 +358,7 @@
359 g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING,358 g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING,
360 &overlay_identity, &can_maximise, &overlay_monitor);359 &overlay_identity, &can_maximise, &overlay_monitor);
361360
362 dash_monitor_ = overlay_monitor;361 overlay_monitor_ = overlay_monitor;
363362
364 RaiseInputWindows();363 RaiseInputWindows();
365 });364 });
@@ -370,7 +369,6 @@
370 }369 }
371370
372 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &UnityScreen::OnPanelStyleChanged));371 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &UnityScreen::OnPanelStyleChanged));
373 WindowManager::Default()->terminate_spread.connect([this] { scale_highlighted_window_ = 0; });
374372
375 minimize_speed_controller->DurationChanged.connect(373 minimize_speed_controller->DurationChanged.connect(
376 sigc::mem_fun(this, &UnityScreen::OnMinimizeDurationChanged)374 sigc::mem_fun(this, &UnityScreen::OnMinimizeDurationChanged)
@@ -571,7 +569,7 @@
571 i++;569 i++;
572 }570 }
573571
574 if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_)572 if (!(launcher_controller_->IsOverlayOpen() && current_monitor == overlay_monitor_)
575 && panel_controller_->opacity() > 0.0f)573 && panel_controller_->opacity() > 0.0f)
576 {574 {
577 foreach(GLTexture * tex, _shadow_texture)575 foreach(GLTexture * tex, _shadow_texture)
@@ -1379,14 +1377,17 @@
1379void UnityScreen::handleEvent(XEvent* event)1377void UnityScreen::handleEvent(XEvent* event)
1380{1378{
1381 bool skip_other_plugins = false;1379 bool skip_other_plugins = false;
1380 auto wm = PluginAdapter::Default();
1381
1382 switch (event->type)1382 switch (event->type)
1383 {1383 {
1384 case FocusIn:1384 case FocusIn:
1385 case FocusOut:1385 case FocusOut:
1386 if (event->xfocus.mode == NotifyGrab)1386 if (event->xfocus.mode == NotifyGrab)
1387 PluginAdapter::Default()->OnScreenGrabbed();1387 wm->OnScreenGrabbed();
1388 else if (event->xfocus.mode == NotifyUngrab)1388 else if (event->xfocus.mode == NotifyUngrab)
1389 PluginAdapter::Default()->OnScreenUngrabbed();1389 wm->OnScreenUngrabbed();
1390
1390 if (_key_nav_mode_requested)1391 if (_key_nav_mode_requested)
1391 {1392 {
1392 // Close any overlay that is open.1393 // Close any overlay that is open.
@@ -1400,9 +1401,10 @@
1400 _key_nav_mode_requested = false;1401 _key_nav_mode_requested = false;
1401 break;1402 break;
1402 case MotionNotify:1403 case MotionNotify:
1403 if (scale_highlighted_window_ && PluginAdapter::Default()->IsScaleActive())1404 if (wm->IsScaleActive())
1404 {1405 {
1405 if (CompWindow *w = screen->findWindow(scale_highlighted_window_))1406 ScaleScreen* ss = ScaleScreen::get(screen);
1407 if (CompWindow *w = screen->findWindow(ss->getSelectedWindow()))
1406 skip_other_plugins = UnityWindow::get(w)->handleEvent(event);1408 skip_other_plugins = UnityWindow::get(w)->handleEvent(event);
1407 }1409 }
1408 break;1410 break;
@@ -1412,12 +1414,21 @@
1412 launcher_controller_->KeyNavTerminate(false);1414 launcher_controller_->KeyNavTerminate(false);
1413 EnableCancelAction(CancelActionTarget::LAUNCHER_SWITCHER, false);1415 EnableCancelAction(CancelActionTarget::LAUNCHER_SWITCHER, false);
1414 }1416 }
1415 if (scale_highlighted_window_ && PluginAdapter::Default()->IsScaleActive())1417 if (wm->IsScaleActive())
1416 {1418 {
1417 if (CompWindow *w = screen->findWindow(scale_highlighted_window_))1419 ScaleScreen* ss = ScaleScreen::get(screen);
1420 if (CompWindow *w = screen->findWindow(ss->getSelectedWindow()))
1418 skip_other_plugins = UnityWindow::get(w)->handleEvent(event);1421 skip_other_plugins = UnityWindow::get(w)->handleEvent(event);
1419 }1422 }
14201423 if (launcher_controller_->IsOverlayOpen())
1424 {
1425 int monitor_with_mouse = UScreen::GetDefault()->GetMonitorWithMouse();
1426 if (overlay_monitor_ != monitor_with_mouse)
1427 {
1428 dash_controller_->HideDash(false);
1429 hud_controller_->HideHud(false);
1430 }
1431 }
1421 break;1432 break;
1422 case ButtonRelease:1433 case ButtonRelease:
1423 if (switcher_controller_ && switcher_controller_->Visible())1434 if (switcher_controller_ && switcher_controller_->Visible())
@@ -1437,10 +1448,11 @@
1437 }1448 }
1438 }1449 }
1439 }1450 }
1440 else if (scale_highlighted_window_ && PluginAdapter::Default()->IsScaleActive())1451 else if (wm->IsScaleActive())
1441 {1452 {
1442 if (CompWindow *w = screen->findWindow(scale_highlighted_window_))1453 ScaleScreen* ss = ScaleScreen::get(screen);
1443 UnityWindow::get(w)->handleEvent(event);1454 if (CompWindow *w = screen->findWindow(ss->getSelectedWindow()))
1455 skip_other_plugins = UnityWindow::get(w)->handleEvent(event);
1444 }1456 }
1445 break;1457 break;
1446 case KeyPress:1458 case KeyPress:
@@ -2556,7 +2568,8 @@
2556 UnityScreen* us = UnityScreen::get(screen);2568 UnityScreen* us = UnityScreen::get(screen);
2557 CompWindow *lw;2569 CompWindow *lw;
25582570
2559 if (us->launcher_controller_->IsOverlayOpen())2571 // can't rely on launcher->IsOverlayVisible on focus change (because ubus is async close on focus change.)
2572 if (us && (us->dash_controller_->IsVisible() || us->hud_controller_->IsVisible()))
2560 {2573 {
2561 lw = screen->findWindow(us->launcher_controller_->LauncherWindowId(0));2574 lw = screen->findWindow(us->launcher_controller_->LauncherWindowId(0));
2562 lw->moveInputFocusTo();2575 lw->moveInputFocusTo();
@@ -2770,6 +2783,7 @@
2770 * that must not be considered when drawing an overlay */2783 * that must not be considered when drawing an overlay */
2771 hud_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1;2784 hud_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1;
2772 dash_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1;2785 dash_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1;
2786 panel_controller_->launcher_width = launcher_controller_->launcher().GetAbsoluteWidth() - 1;
27732787
2774 if (p)2788 if (p)
2775 {2789 {
@@ -3597,8 +3611,8 @@
3597 if (!scale_win->hasSlot()) // animation not finished3611 if (!scale_win->hasSlot()) // animation not finished
3598 return;3612 return;
35993613
3600 UnityScreen* us = UnityScreen::get(screen);3614 ScaleScreen* ss = ScaleScreen::get(screen);
3601 const bool highlighted = (us->scale_highlighted_window_ == window->id());3615 const bool highlighted = (ss->getSelectedWindow() == window->id());
36023616
3603 ScalePosition const& pos = scale_win->getCurrentPosition();3617 ScalePosition const& pos = scale_win->getCurrentPosition();
3604 auto const& border_rect = window->borderRect();3618 auto const& border_rect = window->borderRect();
@@ -3651,16 +3665,6 @@
3651 }3665 }
3652}3666}
36533667
3654void UnityWindow::scaleSelectWindow()
3655{
3656 ScaleWindow::get(window)->scaleSelectWindow();
3657
3658 UnityScreen* us = UnityScreen::get(screen);
3659
3660 if (us->scale_highlighted_window_ != window->id())
3661 us->scale_highlighted_window_ = window->id();
3662}
3663
3664void UnityWindow::OnInitiateSpreed()3668void UnityWindow::OnInitiateSpreed()
3665{3669{
3666 auto const windows = screen->windows();3670 auto const windows = screen->windows();
36673671
=== modified file 'plugins/unityshell/src/unityshell.h'
--- plugins/unityshell/src/unityshell.h 2012-09-07 12:40:24 +0000
+++ plugins/unityshell/src/unityshell.h 2012-09-13 15:55:51 +0000
@@ -312,7 +312,7 @@
312312
313 bool queryForShader ();313 bool queryForShader ();
314314
315 int dash_monitor_;315 int overlay_monitor_;
316 CompScreen::GrabHandle grab_index_;316 CompScreen::GrabHandle grab_index_;
317 CompWindowList fullscreen_windows_;317 CompWindowList fullscreen_windows_;
318 bool painting_tray_;318 bool painting_tray_;
@@ -333,8 +333,6 @@
333 glib::SourceManager sources_;333 glib::SourceManager sources_;
334 unity::ThumbnailGenerator thumb_generator;334 unity::ThumbnailGenerator thumb_generator;
335335
336 Window scale_highlighted_window_;
337
338 WindowMinimizeSpeedController* minimize_speed_controller;336 WindowMinimizeSpeedController* minimize_speed_controller;
339 friend class UnityWindow;337 friend class UnityWindow;
340};338};
@@ -409,7 +407,6 @@
409 //! Emited when CompWindowNotifyBeforeDestroy is received407 //! Emited when CompWindowNotifyBeforeDestroy is received
410 sigc::signal<void> being_destroyed;408 sigc::signal<void> being_destroyed;
411409
412 void scaleSelectWindow();
413 void scalePaintDecoration(const GLWindowPaintAttrib &,410 void scalePaintDecoration(const GLWindowPaintAttrib &,
414 const GLMatrix &,411 const GLMatrix &,
415 const CompRegion &,412 const CompRegion &,
416413
=== modified file 'tests/autopilot/unity/tests/test_dash.py'
--- tests/autopilot/unity/tests/test_dash.py 2012-09-11 12:01:20 +0000
+++ tests/autopilot/unity/tests/test_dash.py 2012-09-13 15:55:51 +0000
@@ -107,22 +107,6 @@
107 self.dash.reveal_application_lens()107 self.dash.reveal_application_lens()
108 self.assertThat(self.dash.active_lens, Eventually(Equals('applications.lens')))108 self.assertThat(self.dash.active_lens, Eventually(Equals('applications.lens')))
109109
110 def test_dash_stays_on_same_monitor(self):
111 """If the dash is opened, then the mouse is moved to another monitor and
112 the keyboard is used. The Dash must not move to that monitor.
113 """
114
115 if self.screen_geo.get_num_monitors() < 2:
116 self.skip ("This test must be ran with more then 1 monitor.")
117
118 self.dash.ensure_visible()
119 self.addCleanup(self.dash.ensure_hidden)
120
121 self.screen_geo.move_mouse_to_monitor(1)
122 self.keyboard.type("abc")
123
124 self.assertThat(self.dash.ideal_monitor, Eventually(Equals(0)))
125
126110
127class DashSearchInputTests(DashTestCase):111class DashSearchInputTests(DashTestCase):
128 """Test features involving input to the dash search"""112 """Test features involving input to the dash search"""
@@ -435,6 +419,9 @@
435class DashKeyboardFocusTests(DashTestCase):419class DashKeyboardFocusTests(DashTestCase):
436 """Tests that keyboard focus works."""420 """Tests that keyboard focus works."""
437421
422 def assertSearchText(self, text):
423 self.assertThat(self.dash.search_string, Eventually(Equals(text)))
424
438 def test_filterbar_expansion_leaves_kb_focus(self):425 def test_filterbar_expansion_leaves_kb_focus(self):
439 """Expanding or collapsing the filterbar must keave keyboard focus in the426 """Expanding or collapsing the filterbar must keave keyboard focus in the
440 search bar.427 search bar.
@@ -447,7 +434,19 @@
447 filter_bar.ensure_expanded()434 filter_bar.ensure_expanded()
448 self.addCleanup(filter_bar.ensure_collapsed)435 self.addCleanup(filter_bar.ensure_collapsed)
449 self.keyboard.type(" world")436 self.keyboard.type(" world")
450 self.assertThat(self.dash.search_string, Eventually(Equals("hello world")))437 self.assertSearchText("hello world")
438
439 def test_keep_focus_on_application_opens(self):
440 """The Dash must keep key focus as well as stay open if an app gets opened from an external source. """
441
442 self.dash.ensure_visible()
443 self.addCleanup(self.hud.ensure_hidden)
444
445 self.start_app_window("Calculator")
446 sleep(1)
447
448 self.keyboard.type("HasFocus")
449 self.assertSearchText("HasFocus")
451450
452451
453class DashLensResultsTests(DashTestCase):452class DashLensResultsTests(DashTestCase):
@@ -847,6 +846,7 @@
847846
848 self.assertThat(self.dash.preview_displaying, Eventually(Equals(False)))847 self.assertThat(self.dash.preview_displaying, Eventually(Equals(False)))
849848
849
850class DashDBusIfaceTests(DashTestCase):850class DashDBusIfaceTests(DashTestCase):
851 """Test the Unity dash DBus interface."""851 """Test the Unity dash DBus interface."""
852852
@@ -856,3 +856,41 @@
856 self.dash.controller.hide_dash_via_dbus()856 self.dash.controller.hide_dash_via_dbus()
857 self.assertThat(self.dash.visible, Eventually(Equals(False)))857 self.assertThat(self.dash.visible, Eventually(Equals(False)))
858 self.dash.ensure_hidden()858 self.dash.ensure_hidden()
859
860
861class DashCrossMonitorsTests(DashTestCase):
862 """Multi-monitor dash tests."""
863
864 def setUp(self):
865 super(DashCrossMonitorsTests, self).setUp()
866 if self.screen_geo.get_num_monitors() < 2:
867 self.skipTest("This test requires more than 1 monitor.")
868
869 def test_dash_stays_on_same_monitor(self):
870 """If the dash is opened, then the mouse is moved to another monitor and
871 the keyboard is used. The Dash must not move to that monitor.
872 """
873 current_monitor = self.dash.ideal_monitor
874
875 self.dash.ensure_visible()
876 self.addCleanup(self.dash.ensure_hidden)
877
878 self.screen_geo.move_mouse_to_monitor((current_monitor + 1) % self.screen_geo.get_num_monitors())
879 self.keyboard.type("abc")
880
881 self.assertThat(self.dash.ideal_monitor, Eventually(Equals(current_monitor)))
882
883 def test_dash_close_on_cross_monitor_click(self):
884 """Dash must close when clicking on a window in a different screen."""
885
886 self.addCleanup(self.dash.ensure_hidden)
887
888 for monitor in range(self.screen_geo.get_num_monitors()-1):
889 self.screen_geo.move_mouse_to_monitor(monitor)
890 self.dash.ensure_visible()
891
892 self.screen_geo.move_mouse_to_monitor(monitor+1)
893 sleep(.5)
894 self.mouse.click()
895
896 self.assertThat(self.dash.visible, Eventually(Equals(False)))
859897
=== modified file 'tests/autopilot/unity/tests/test_hud.py'
--- tests/autopilot/unity/tests/test_hud.py 2012-09-07 17:36:50 +0000
+++ tests/autopilot/unity/tests/test_hud.py 2012-09-13 15:55:51 +0000
@@ -357,22 +357,6 @@
357357
358 self.assertThat(self.hud.visible, Eventually(Equals(False)))358 self.assertThat(self.hud.visible, Eventually(Equals(False)))
359359
360 def test_hud_stays_on_same_monitor(self):
361 """If the hud is opened, then the mouse is moved to another monitor and
362 the keyboard is used. The hud must not move to that monitor.
363 """
364
365 if self.screen_geo.get_num_monitors() < 2:
366 self.skip ("This test must be ran with more then 1 monitor.")
367
368 self.hud.ensure_visible()
369 self.addCleanup(self.hud.ensure_hidden)
370
371 self.screen_geo.move_mouse_to_monitor(1)
372 self.keyboard.type("abc")
373
374 self.assertThat(self.hud.ideal_monitor, Eventually(Equals(0)))
375
376 def test_mouse_changes_selected_hud_button(self):360 def test_mouse_changes_selected_hud_button(self):
377 """This tests moves the mouse from the top of the screen to the bottom, this must361 """This tests moves the mouse from the top of the screen to the bottom, this must
378 change the selected button from 1 to 5.362 change the selected button from 1 to 5.
@@ -408,6 +392,18 @@
408392
409 self.assertThat(self.hud.view.selected_button, Eventually(Equals(1)))393 self.assertThat(self.hud.view.selected_button, Eventually(Equals(1)))
410394
395 def test_keep_focus_on_application_opens(self):
396 """The Hud must keep key focus as well as stay open if an app gets opened from an external source. """
397
398 self.hud.ensure_visible()
399 self.addCleanup(self.hud.ensure_hidden)
400
401 self.start_app_window("Calculator")
402 sleep(1)
403
404 self.keyboard.type("HasFocus")
405 self.assertThat(self.hud.search_string, Eventually(Equals("HasFocus")))
406
411407
412class HudLauncherInteractionsTests(HudTestsBase):408class HudLauncherInteractionsTests(HudTestsBase):
413409
@@ -661,3 +657,42 @@
661 # Don't use reveal_hud, but be explicit in the keybindings.657 # Don't use reveal_hud, but be explicit in the keybindings.
662 self.keyboard.press_and_release("Ctrl+Alt+h")658 self.keyboard.press_and_release("Ctrl+Alt+h")
663 self.assertThat(self.hud.visible, Eventually(Equals(True)))659 self.assertThat(self.hud.visible, Eventually(Equals(True)))
660
661
662class HudCrossMonitorsTests(HudTestsBase):
663 """Multi-monitor hud tests."""
664
665 def setUp(self):
666 super(HudCrossMonitorsTests, self).setUp()
667 if self.screen_geo.get_num_monitors() < 2:
668 self.skipTest("This test requires more than 1 monitor.")
669
670 def test_hud_stays_on_same_monitor(self):
671 """If the hud is opened, then the mouse is moved to another monitor and
672 the keyboard is used. The hud must not move to that monitor.
673 """
674
675 current_monitor = self.hud.ideal_monitor
676
677 self.hud.ensure_visible()
678 self.addCleanup(self.hud.ensure_hidden)
679
680 self.screen_geo.move_mouse_to_monitor((current_monitor + 1) % self.screen_geo.get_num_monitors())
681 self.keyboard.type("abc")
682
683 self.assertThat(self.hud.ideal_monitor, Eventually(Equals(current_monitor)))
684
685 def test_hud_close_on_cross_monitor_click(self):
686 """Hud must close when clicking on a window in a different screen."""
687
688 self.addCleanup(self.hud.ensure_hidden)
689
690 for monitor in range(self.screen_geo.get_num_monitors()-1):
691 self.screen_geo.move_mouse_to_monitor(monitor)
692 self.hud.ensure_visible()
693
694 self.screen_geo.move_mouse_to_monitor(monitor+1)
695 sleep(.5)
696 self.mouse.click()
697
698 self.assertThat(self.hud.visible, Eventually(Equals(False)))
664699
=== modified file 'unity-shared/DashStyle.cpp'
--- unity-shared/DashStyle.cpp 2012-08-20 19:59:54 +0000
+++ unity-shared/DashStyle.cpp 2012-09-13 15:55:51 +0000
@@ -196,6 +196,8 @@
196 int text_height_;196 int text_height_;
197 int number_of_columns_;197 int number_of_columns_;
198198
199 LazyLoadTexture category_texture_;
200 LazyLoadTexture category_texture_no_filters_;
199 LazyLoadTexture dash_bottom_texture_;201 LazyLoadTexture dash_bottom_texture_;
200 LazyLoadTexture dash_bottom_texture_mask_;202 LazyLoadTexture dash_bottom_texture_mask_;
201 LazyLoadTexture dash_right_texture_;203 LazyLoadTexture dash_right_texture_;
@@ -218,6 +220,11 @@
218 LazyLoadTexture search_close_texture_;220 LazyLoadTexture search_close_texture_;
219 LazyLoadTexture search_spin_texture_;221 LazyLoadTexture search_spin_texture_;
220222
223
224 LazyLoadTexture refine_gradient_corner_;
225 LazyLoadTexture refine_gradient_dash_;
226 LazyLoadTexture refine_gradient_no_refine_dash_;
227
221 LazyLoadTexture group_unexpand_texture_;228 LazyLoadTexture group_unexpand_texture_;
222 LazyLoadTexture group_expand_texture_;229 LazyLoadTexture group_expand_texture_;
223230
@@ -239,6 +246,8 @@
239 , text_width_(0)246 , text_width_(0)
240 , text_height_(0)247 , text_height_(0)
241 , number_of_columns_(6)248 , number_of_columns_(6)
249 , category_texture_("/category_gradient.png")
250 , category_texture_no_filters_("/category_gradient_no_refine.png")
242 , dash_bottom_texture_("/dash_bottom_border_tile.png")251 , dash_bottom_texture_("/dash_bottom_border_tile.png")
243 , dash_bottom_texture_mask_("/dash_bottom_border_tile_mask.png")252 , dash_bottom_texture_mask_("/dash_bottom_border_tile_mask.png")
244 , dash_right_texture_("/dash_right_border_tile.png")253 , dash_right_texture_("/dash_right_border_tile.png")
@@ -258,6 +267,9 @@
258 , search_circle_texture_("/search_circle.svg", 32)267 , search_circle_texture_("/search_circle.svg", 32)
259 , search_close_texture_("/search_close.svg", 32)268 , search_close_texture_("/search_close.svg", 32)
260 , search_spin_texture_("/search_spin.svg", 32)269 , search_spin_texture_("/search_spin.svg", 32)
270 , refine_gradient_corner_("/refine_gradient_corner.png")
271 , refine_gradient_dash_("/refine_gradient_dash.png")
272 , refine_gradient_no_refine_dash_("/refine_gradient_dash_no_refine.png")
261 , group_unexpand_texture_("/dash_group_unexpand.png")273 , group_unexpand_texture_("/dash_group_unexpand.png")
262 , group_expand_texture_("/dash_group_expand.png")274 , group_expand_texture_("/dash_group_expand.png")
263 , star_deselected_texture_("/star_deselected.png")275 , star_deselected_texture_("/star_deselected.png")
@@ -2081,6 +2093,16 @@
2081}2093}
20822094
20832095
2096nux::BaseTexture* Style::GetCategoryBackground()
2097{
2098 return pimpl->category_texture_.texture();
2099}
2100
2101nux::BaseTexture* Style::GetCategoryBackgroundNoFilters()
2102{
2103 return pimpl->category_texture_no_filters_.texture();
2104}
2105
2084nux::BaseTexture* Style::GetDashBottomTile()2106nux::BaseTexture* Style::GetDashBottomTile()
2085{2107{
2086 return pimpl->dash_bottom_texture_.texture();2108 return pimpl->dash_bottom_texture_.texture();
@@ -2171,6 +2193,21 @@
2171 return pimpl->search_spin_texture_.texture();2193 return pimpl->search_spin_texture_.texture();
2172}2194}
21732195
2196nux::BaseTexture* Style::GetRefineTextureCorner()
2197{
2198 return pimpl->refine_gradient_corner_.texture();
2199}
2200
2201nux::BaseTexture* Style::GetRefineNoRefineTextureDash()
2202{
2203 return pimpl->refine_gradient_no_refine_dash_.texture();
2204}
2205
2206nux::BaseTexture* Style::GetRefineTextureDash()
2207{
2208 return pimpl->refine_gradient_dash_.texture();
2209}
2210
2174nux::BaseTexture* Style::GetGroupUnexpandIcon()2211nux::BaseTexture* Style::GetGroupUnexpandIcon()
2175{2212{
2176 return pimpl->group_unexpand_texture_.texture();2213 return pimpl->group_unexpand_texture_.texture();
21772214
=== modified file 'unity-shared/DashStyle.h'
--- unity-shared/DashStyle.h 2012-08-20 19:59:54 +0000
+++ unity-shared/DashStyle.h 2012-09-13 15:55:51 +0000
@@ -165,6 +165,8 @@
165165
166 int GetTextLineHeight() const;166 int GetTextLineHeight() const;
167167
168 nux::BaseTexture* GetCategoryBackground();
169 nux::BaseTexture* GetCategoryBackgroundNoFilters();
168 nux::BaseTexture* GetDashBottomTile();170 nux::BaseTexture* GetDashBottomTile();
169 nux::BaseTexture* GetDashBottomTileMask();171 nux::BaseTexture* GetDashBottomTileMask();
170 nux::BaseTexture* GetDashRightTile();172 nux::BaseTexture* GetDashRightTile();
@@ -196,7 +198,11 @@
196 nux::BaseTexture* GetStarDeselectedIcon();198 nux::BaseTexture* GetStarDeselectedIcon();
197 nux::BaseTexture* GetStarSelectedIcon();199 nux::BaseTexture* GetStarSelectedIcon();
198 nux::BaseTexture* GetStarHighlightIcon();200 nux::BaseTexture* GetStarHighlightIcon();
199201
202 nux::BaseTexture* GetRefineTextureCorner();
203 nux::BaseTexture* GetRefineTextureDash();
204 nux::BaseTexture* GetRefineNoRefineTextureDash();
205
200 // Returns the width of the separator between the dash and the launcher.206 // Returns the width of the separator between the dash and the launcher.
201 int GetVSeparatorSize() const;207 int GetVSeparatorSize() const;
202208
@@ -206,6 +212,7 @@
206 // Practically it is the space between the top border of the dash and the searchbar.212 // Practically it is the space between the top border of the dash and the searchbar.
207 int GetDashViewTopPadding() const;213 int GetDashViewTopPadding() const;
208214
215
209 // Search bar216 // Search bar
210 int GetSearchBarLeftPadding() const;217 int GetSearchBarLeftPadding() const;
211 int GetSearchBarRightPadding() const;218 int GetSearchBarRightPadding() const;
212219
=== modified file 'unity-shared/OverlayRenderer.cpp'
--- unity-shared/OverlayRenderer.cpp 2012-05-22 10:15:47 +0000
+++ unity-shared/OverlayRenderer.cpp 2012-09-13 15:55:51 +0000
@@ -64,10 +64,19 @@
64 nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_blur_texture_;64 nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_blur_texture_;
65 nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_shine_texture_;65 nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_shine_texture_;
6666
67
68 nux::ObjectPtr<nux::BaseTexture> bg_refine_tex_;
69 nux::ObjectPtr<nux::BaseTexture> bg_refine_no_refine_tex_;
70 nux::ObjectPtr<nux::BaseTexture> bg_refine_corner_tex_;
71 std::unique_ptr<nux::AbstractPaintLayer> bg_refine_gradient_;
72 std::unique_ptr<nux::AbstractPaintLayer> bg_refine_gradient_corner_;
73
67 // temporary variable that stores the number of backgrounds we have rendered74 // temporary variable that stores the number of backgrounds we have rendered
68 int bgs;75 int bgs;
69 bool visible;76 bool visible;
7077
78 bool refine_is_open_;
79
71 UBusManager ubus_manager_;80 UBusManager ubus_manager_;
7281
73 OverlayRenderer *parent;82 OverlayRenderer *parent;
@@ -107,16 +116,67 @@
107 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;116 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
108 bg_layer_ = new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.9), true, rop);117 bg_layer_ = new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.9), true, rop);
109118
119 nux::TexCoordXForm texxform;
120 bg_refine_tex_ = unity::dash::Style::Instance().GetRefineTextureDash();
121 bg_refine_no_refine_tex_ = unity::dash::Style::Instance().GetRefineNoRefineTextureDash();
122
123 bg_refine_gradient_.reset(new nux::TextureLayer(bg_refine_tex_->GetDeviceTexture(),
124 texxform,
125 nux::color::White,
126 false,
127 rop));
128
129 bg_refine_corner_tex_ = unity::dash::Style::Instance().GetRefineTextureCorner();
130
131 bg_refine_gradient_corner_.reset(new nux::TextureLayer(bg_refine_corner_tex_->GetDeviceTexture(),
132 texxform,
133 nux::color::White,
134 false,
135 rop));
136
137 ubus_manager_.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED,
138 sigc::mem_fun(this, &OverlayRendererImpl::OnBackgroundColorChanged));
139
110 rop.Blend = true;140 rop.Blend = true;
111 rop.SrcBlend = GL_ZERO;141 rop.SrcBlend = GL_ZERO;
112 rop.DstBlend = GL_SRC_COLOR;142 rop.DstBlend = GL_SRC_COLOR;
113 bg_darken_layer_ = new nux::ColorLayer(nux::Color(0.9f, 0.9f, 0.9f, 1.0f), false, rop);143 bg_darken_layer_ = new nux::ColorLayer(nux::Color(0.9f, 0.9f, 0.9f, 1.0f), false, rop);
114 bg_shine_texture_ = unity::dash::Style::Instance().GetDashShine()->GetDeviceTexture();144 bg_shine_texture_ = unity::dash::Style::Instance().GetDashShine()->GetDeviceTexture();
115145
116 ubus_manager_.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED,
117 sigc::mem_fun(this, &OverlayRendererImpl::OnBackgroundColorChanged));
118
119 ubus_manager_.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);146 ubus_manager_.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);
147
148 ubus_manager_.RegisterInterest(UBUS_REFINE_STATUS, [this] (GVariant *data)
149 {
150 gboolean status;
151 g_variant_get(data, UBUS_REFINE_STATUS_FORMAT_STRING, &status);
152
153 refine_is_open_ = status;
154 nux::ROPConfig rop;
155 rop.Blend = true;
156 rop.SrcBlend = GL_ONE;
157 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
158
159 nux::TexCoordXForm texxform;
160
161 if (refine_is_open_)
162 {
163 bg_refine_gradient_.reset(new nux::TextureLayer(bg_refine_tex_->GetDeviceTexture(),
164 texxform,
165 nux::color::White,
166 false,
167 rop));
168 }
169 else
170 {
171 bg_refine_gradient_.reset(new nux::TextureLayer(bg_refine_no_refine_tex_->GetDeviceTexture(),
172 texxform,
173 nux::color::White,
174 false,
175 rop));
176 }
177
178 parent->need_redraw.emit();
179 });
120}180}
121181
122void OverlayRendererImpl::OnBackgroundColorChanged(GVariant* args)182void OverlayRendererImpl::OnBackgroundColorChanged(GVariant* args)
@@ -442,9 +502,9 @@
442 gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);502 gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
443503
444 const double line_opacity = 0.1f;504 const double line_opacity = 0.1f;
445 const int gradient_width = 130;505 //const int gradient_width = 130;
446 const int gradient_height = 50;506 const int gradient_height = 50;
447 const int horizontal_padding = 40;507 //const int horizontal_padding = 40;
448 const int vertical_padding = 20;508 const int vertical_padding = 20;
449509
450 // Now that we mask the corners of the dash,510 // Now that we mask the corners of the dash,
@@ -471,7 +531,7 @@
471 line_color * 0.7f); // less opacity531 line_color * 0.7f); // less opacity
472532
473 // Horizontal panel/dash separator533 // Horizontal panel/dash separator
474 nux::GetPainter().Paint2DQuadColor(gfx_context,534 /*nux::GetPainter().Paint2DQuadColor(gfx_context,
475 nux::Geometry(geometry.x + horizontal_padding,535 nux::Geometry(geometry.x + horizontal_padding,
476 geometry.y,536 geometry.y,
477 gradient_width,537 gradient_width,
@@ -486,7 +546,7 @@
486 geometry.x + content_geo.width + INNER_CORNER_RADIUS + corner_overlap,546 geometry.x + content_geo.width + INNER_CORNER_RADIUS + corner_overlap,
487 style.GetHSeparatorSize(),547 style.GetHSeparatorSize(),
488 line_color);548 line_color);
489549*/
490 // Draw the background550 // Draw the background
491 bg_darken_layer_->SetGeometry(larger_content_geo);551 bg_darken_layer_->SetGeometry(larger_content_geo);
492 nux::GetPainter().RenderSinglePaintLayer(gfx_context, larger_content_geo, bg_darken_layer_);552 nux::GetPainter().RenderSinglePaintLayer(gfx_context, larger_content_geo, bg_darken_layer_);
@@ -510,6 +570,33 @@
510 larger_content_geo.width, larger_content_geo.height,570 larger_content_geo.width, larger_content_geo.height,
511 bg_shine_texture_, texxform_absolute_bg, nux::color::White);571 bg_shine_texture_, texxform_absolute_bg, nux::color::White);
512572
573 gfx_context.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
574 nux::TexCoordXForm refine_texxform;
575
576 if (refine_is_open_)
577 {
578 gfx_context.QRP_1Tex(larger_content_geo.x + larger_content_geo.width - bg_refine_tex_->GetWidth(),
579 larger_content_geo.y,
580 bg_refine_tex_->GetWidth(),
581 bg_refine_tex_->GetHeight(),
582 bg_refine_tex_->GetDeviceTexture(),
583 refine_texxform,
584 nux::color::White
585 );
586 }
587 else
588 {
589 gfx_context.QRP_1Tex(larger_content_geo.x + larger_content_geo.width - bg_refine_no_refine_tex_->GetWidth(),
590 larger_content_geo.y,
591 bg_refine_no_refine_tex_->GetWidth(),
592 bg_refine_no_refine_tex_->GetHeight(),
593 bg_refine_no_refine_tex_->GetDeviceTexture(),
594 refine_texxform,
595 nux::color::White
596 );
597 }
598
599
513 if (Settings::Instance().GetFormFactor() != FormFactor::NETBOOK || force_edges)600 if (Settings::Instance().GetFormFactor() != FormFactor::NETBOOK || force_edges)
514 {601 {
515 // Paint the edges602 // Paint the edges
@@ -850,6 +937,24 @@
850 false,937 false,
851 rop);938 rop);
852 bgs++;939 bgs++;
940
941 nux::Geometry refine_geo = larger_content_geo;
942
943 if (refine_is_open_)
944 {
945 refine_geo.x += larger_content_geo.width - bg_refine_tex_->GetWidth();
946 refine_geo.width = bg_refine_tex_->GetWidth();
947 refine_geo.height = bg_refine_tex_->GetHeight();
948 }
949 else
950 {
951 refine_geo.x += larger_content_geo.width - bg_refine_no_refine_tex_->GetWidth();
952 refine_geo.width = bg_refine_no_refine_tex_->GetWidth();
953 refine_geo.height = bg_refine_no_refine_tex_->GetHeight();
954 }
955
956 nux::GetPainter().PushLayer(gfx_context, refine_geo, bg_refine_gradient_.get());
957 bgs++;
853}958}
854959
855void OverlayRendererImpl::DrawContentCleanup(nux::GraphicsEngine& gfx_context, nux::Geometry content_geo, nux::Geometry absolute_geo, nux::Geometry geometry)960void OverlayRendererImpl::DrawContentCleanup(nux::GraphicsEngine& gfx_context, nux::Geometry content_geo, nux::Geometry absolute_geo, nux::Geometry geometry)
856961
=== modified file 'unity-shared/PreviewStyle.cpp'
--- unity-shared/PreviewStyle.cpp 2012-09-06 07:03:54 +0000
+++ unity-shared/PreviewStyle.cpp 2012-09-13 15:55:51 +0000
@@ -224,7 +224,7 @@
224224
225int Style::GetActionButtonHeight() const225int Style::GetActionButtonHeight() const
226{226{
227 return 36;227 return 34;
228}228}
229229
230int Style::GetActionButtonMaximumWidth() const230int Style::GetActionButtonMaximumWidth() const
231231
=== modified file 'unity-shared/UBusMessages.h'
--- unity-shared/UBusMessages.h 2012-08-27 03:00:42 +0000
+++ unity-shared/UBusMessages.h 2012-09-13 15:55:51 +0000
@@ -40,6 +40,9 @@
40#define UBUS_OVERLAY_HIDDEN "OVERLAY_HIDDEN"40#define UBUS_OVERLAY_HIDDEN "OVERLAY_HIDDEN"
41#define UBUS_OVERLAY_SHOWN "OVERLAY_SHOWN"41#define UBUS_OVERLAY_SHOWN "OVERLAY_SHOWN"
4242
43#define UBUS_REFINE_STATUS_FORMAT_STRING "(b)"
44#define UBUS_REFINE_STATUS "REFINE_STATUS"
45
43#define UBUS_PLACE_VIEW_QUEUE_DRAW "PLACE_VIEW_QUEUE_DRAW"46#define UBUS_PLACE_VIEW_QUEUE_DRAW "PLACE_VIEW_QUEUE_DRAW"
4447
45// Signal send by Launcher/Quicklist when it wants to exit key-nav and wants to48// Signal send by Launcher/Quicklist when it wants to exit key-nav and wants to
4649
=== modified file 'unity-standalone/StandaloneUnity.cpp'
--- unity-standalone/StandaloneUnity.cpp 2012-07-27 20:20:29 +0000
+++ unity-standalone/StandaloneUnity.cpp 2012-09-13 15:55:51 +0000
@@ -45,7 +45,7 @@
4545
46namespace46namespace
47{47{
48 static int display_width = 1280;48 static int display_width = 1200;
49 static int display_height = 720;49 static int display_height = 720;
50 static gboolean no_window_decorations = FALSE;50 static gboolean no_window_decorations = FALSE;
51 static gboolean force_tv = FALSE;51 static gboolean force_tv = FALSE;
@@ -89,7 +89,9 @@
89 launcher_controller.reset(new launcher::Controller(0));89 launcher_controller.reset(new launcher::Controller(0));
90 panel_controller.reset(new panel::Controller());90 panel_controller.reset(new panel::Controller());
91 dash_controller.reset(new dash::Controller());91 dash_controller.reset(new dash::Controller());
92
92 dash_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1;93 dash_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1;
94 panel_controller->launcher_width = launcher_controller->launcher().GetAbsoluteWidth() - 1;
93}95}
9496
95void UnityStandalone::InitWindowThread(nux::NThread* thread, void* InitData)97void UnityStandalone::InitWindowThread(nux::NThread* thread, void* InitData)

Subscribers

People subscribed via source and target branches

to all changes: