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