Merge lp:~fboucault/unity-2d/new_dash_layout into lp:unity-2d/3.0
- new_dash_layout
- Merge into natty
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~fboucault/unity-2d/new_dash_layout | ||||
Merge into: | lp:unity-2d/3.0 | ||||
Prerequisite: | lp:~agateau/unity-2d/desktop-dash | ||||
Diff against target: |
1439 lines (+584/-420) 27 files modified
libunity-2d-private/Unity2d/plugin.cpp (+4/-0) places/BorderGlow.qml (+0/-6) places/FoldingArrow.qml (+14/-0) places/GroupHeader.qml (+60/-32) places/Home.qml (+107/-76) places/HomeButton.qml (+26/-19) places/HomeButtonApplication.qml (+23/-0) places/ListViewWithScrollbar.qml (+3/-2) places/PlaceEntryView.qml (+1/-2) places/RendererGrid.qml (+2/-2) places/Scrollbar.qml (+30/-58) places/SearchBar.qml (+0/-87) places/SearchEntry.qml (+43/-38) places/SearchRefine.qml (+99/-0) places/SearchRefineOption.qml (+9/-0) places/SearchRefineOptionType.qml (+62/-0) places/Section.qml (+0/-43) places/TickBox.qml (+47/-0) places/UnityDefaultRenderer.qml (+7/-5) places/artwork/border_glow.sci (+0/-9) places/artwork/scrollbar.sci (+7/-0) places/artwork/scrollbar/background.sci (+0/-7) places/artwork/scrollbar/slider_default.sci (+0/-7) places/artwork/scrollbar/slider_hovered.sci (+0/-7) places/artwork/scrollbar/slider_pressed.sci (+0/-7) places/artwork/search_background.sci (+7/-0) places/dash.qml (+33/-13) |
||||
To merge this branch: | bzr merge lp:~fboucault/unity-2d/new_dash_layout | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aurélien Gâteau | Pending | ||
Review via email: mp+50689@code.launchpad.net |
This proposal has been superseded by a proposal from 2011-02-24.
Commit message
Description of the change
[dash] New dash user interface layout.
The following user interface elements were updated for the new design:
- search bar
- scrollbar
- result groups and headers
- new refine search pane that replaces the section selector
- home page shortcuts have been modified to be more intuitive and their visual appearance updated
- home page 'shortcuts' button gets an icon
A few QML effects were made available under the "Effects" QML plugin:
- QGraphicsBlurEffect
- QGraphicsColori
- QGraphicsDropSh
Florian Boucault (fboucault) wrote : | # |
Florian Boucault (fboucault) wrote : | # |
Given the size of the merge request and in order to make the review easier I suggest to review the code by reviewing the commits individually.
Florian Boucault (fboucault) wrote : | # |
No proposals found for merge of lp:~agateau/unity-2d/desktop-dash into lp:unity-2d.
- 426. By Florian Boucault
-
Merged from trunk.
Unmerged revisions
- 426. By Florian Boucault
-
Merged from trunk.
Preview Diff
1 | === modified file 'libunity-2d-private/Unity2d/plugin.cpp' |
2 | --- libunity-2d-private/Unity2d/plugin.cpp 2011-02-14 19:59:09 +0000 |
3 | +++ libunity-2d-private/Unity2d/plugin.cpp 2011-02-22 03:27:59 +0000 |
4 | @@ -38,6 +38,7 @@ |
5 | #include <QtDeclarative/qdeclarative.h> |
6 | #include <QDeclarativeEngine> |
7 | #include <QDeclarativeContext> |
8 | +#include <QGraphicsEffect> |
9 | |
10 | #undef signals |
11 | extern "C" { |
12 | @@ -69,6 +70,9 @@ |
13 | qmlRegisterType<WorkspacesInfo>(); // Register the type as non creatable |
14 | |
15 | qmlRegisterType<CacheEffect>(uri, 0, 1, "CacheEffect"); |
16 | + qmlRegisterType<QGraphicsBlurEffect>("Effects", 1, 0, "Blur"); |
17 | + qmlRegisterType<QGraphicsColorizeEffect>("Effects", 1, 0, "Colorize"); |
18 | + qmlRegisterType<QGraphicsDropShadowEffect>("Effects", 1, 0, "DropShadow"); |
19 | |
20 | /* Custom drag’n’drop implementation in QML */ |
21 | qmlRegisterType<DeclarativeMimeData>(); |
22 | |
23 | === removed file 'places/BorderGlow.qml' |
24 | --- places/BorderGlow.qml 2010-11-27 02:56:39 +0000 |
25 | +++ places/BorderGlow.qml 1970-01-01 00:00:00 +0000 |
26 | @@ -1,6 +0,0 @@ |
27 | -import Qt 4.7 |
28 | - |
29 | -BorderImage { |
30 | - source: "artwork/border_glow.sci" |
31 | - smooth: false |
32 | -} |
33 | |
34 | === added file 'places/FoldingArrow.qml' |
35 | --- places/FoldingArrow.qml 1970-01-01 00:00:00 +0000 |
36 | +++ places/FoldingArrow.qml 2011-02-22 03:27:59 +0000 |
37 | @@ -0,0 +1,14 @@ |
38 | +import Qt 4.7 |
39 | +import Effects 1.0 |
40 | + |
41 | +Image { |
42 | + property bool folded: true |
43 | + |
44 | + rotation: folded ? 0 : 90 |
45 | + source: "artwork/arrow.png" |
46 | + width: sourceSize.width |
47 | + height: sourceSize.height |
48 | + fillMode: Image.PreserveAspectFit |
49 | + |
50 | + Behavior on rotation {NumberAnimation {duration: 100}} |
51 | +} |
52 | |
53 | === modified file 'places/GroupHeader.qml' |
54 | --- places/GroupHeader.qml 2010-12-16 22:16:55 +0000 |
55 | +++ places/GroupHeader.qml 2011-02-22 03:27:59 +0000 |
56 | @@ -1,66 +1,94 @@ |
57 | import Qt 4.7 |
58 | - |
59 | -Button { |
60 | - property alias icon: icon.source |
61 | - property alias label: label.text |
62 | +import Effects 1.0 |
63 | + |
64 | +AbstractButton { |
65 | + id: groupHeader |
66 | + |
67 | + property string icon |
68 | + property alias label: title.text |
69 | property bool folded: true |
70 | property int availableCount |
71 | |
72 | + effect: DropShadow { |
73 | + blurRadius: 6 |
74 | + offset.x: 0 |
75 | + offset.y: 0 |
76 | + color: "white" |
77 | + enabled: groupHeader.state == "pressed" |
78 | + } |
79 | |
80 | Image { |
81 | - id: icon |
82 | + id: iconImage |
83 | + |
84 | + source: icon |
85 | |
86 | width: 22 |
87 | height: 22 |
88 | - anchors.verticalCenter: parent.verticalCenter |
89 | + anchors.bottom: underline.top |
90 | + anchors.bottomMargin: 5 |
91 | anchors.left: parent.left |
92 | - anchors.leftMargin: 7 |
93 | + anchors.leftMargin: 8 |
94 | fillMode: Image.PreserveAspectFit |
95 | sourceSize.width: width |
96 | sourceSize.height: height |
97 | } |
98 | |
99 | TextCustom { |
100 | - id: label |
101 | + id: title |
102 | |
103 | - color: parent.state == "pressed" ? "#444444" : "#ffffff" |
104 | font.pixelSize: 16 |
105 | - anchors.bottom: parent.bottom |
106 | - anchors.bottomMargin: 5 |
107 | - anchors.left: icon.right |
108 | - anchors.leftMargin: 5 |
109 | - width: paintedWidth |
110 | + anchors.baseline: underline.top |
111 | + anchors.baselineOffset: -10 |
112 | + anchors.left: iconImage.right |
113 | + anchors.leftMargin: 8 |
114 | } |
115 | |
116 | - Image { |
117 | - id: arrow |
118 | + Item { |
119 | + id: moreResults |
120 | |
121 | visible: availableCount > 0 |
122 | - rotation: folded ? 0 : 90 |
123 | - source: "artwork/arrow.png" |
124 | - width: 7 |
125 | - height: 7 |
126 | - anchors.verticalCenter: parent.verticalCenter |
127 | - anchors.left: label.right |
128 | - anchors.leftMargin: 6 |
129 | - fillMode: Image.PreserveAspectFit |
130 | - sourceSize.width: width |
131 | - sourceSize.height: height |
132 | + anchors.left: title.right |
133 | + anchors.leftMargin: 11 |
134 | + anchors.baseline: title.baseline |
135 | + |
136 | + opacity: groupHeader.state == "selected" || groupHeader.state == "pressed" ? 1.0 : 0.5 |
137 | + Behavior on opacity {NumberAnimation { duration: 100 }} |
138 | + |
139 | + effect: DropShadow { |
140 | + blurRadius: 4 |
141 | + offset.x: 0 |
142 | + offset.y: 0 |
143 | + color: "white" |
144 | + enabled: moreResults.opacity == 1.0 |
145 | + } |
146 | + |
147 | + TextCustom { |
148 | + id: label |
149 | + |
150 | + text: groupHeader.folded ? qsTr("See %1 more results").arg(availableCount) : qsTr("See fewer results") |
151 | + anchors.left: parent.left |
152 | + anchors.baseline: parent.baseline |
153 | + } |
154 | + |
155 | + FoldingArrow { |
156 | + id: arrow |
157 | + |
158 | + folded: groupHeader.folded |
159 | + anchors.left: label.right |
160 | + anchors.leftMargin: 10 |
161 | + anchors.verticalCenter: label.verticalCenter |
162 | + } |
163 | } |
164 | |
165 | Rectangle { |
166 | id: underline |
167 | |
168 | - opacity: parent.state == "selected" ? 0.0 : 1.0 |
169 | - Behavior on opacity {NumberAnimation {duration: 100}} |
170 | + color: "white" |
171 | + opacity: groupHeader.state == "pressed" ? 0.45 : 0.3 |
172 | |
173 | height: 1 |
174 | anchors.bottom: parent.bottom |
175 | anchors.left: parent.left |
176 | - anchors.leftMargin: 5 |
177 | anchors.right: parent.right |
178 | - anchors.rightMargin: 1 |
179 | - |
180 | - color: "#4cffffff" |
181 | } |
182 | } |
183 | |
184 | === modified file 'places/Home.qml' |
185 | --- places/Home.qml 2011-02-22 03:27:59 +0000 |
186 | +++ places/Home.qml 2011-02-22 03:27:59 +0000 |
187 | @@ -24,22 +24,36 @@ |
188 | property bool expanded: globalSearchActive || shortcutsActive |
189 | |
190 | Button { |
191 | - id: shortcutsButton |
192 | + id: openShortcutsButton |
193 | + |
194 | anchors.bottom: parent.top |
195 | anchors.right: parent.right |
196 | anchors.rightMargin: 50 |
197 | anchors.bottomMargin: 10 |
198 | - width: 80 |
199 | - height: 47 |
200 | + width: childrenRect.width |
201 | + height: childrenRect.height |
202 | + |
203 | + Image { |
204 | + id: icon |
205 | + source: "artwork/open_shortcuts.png" |
206 | + width: sourceSize.width |
207 | + height: sourceSize.height |
208 | + anchors.left: parent.left |
209 | + } |
210 | |
211 | TextCustom { |
212 | text: "Shortcuts" |
213 | - anchors.fill: parent |
214 | + anchors.left: icon.right |
215 | + anchors.leftMargin: 3 |
216 | + width: paintedWidth |
217 | + height: icon.height |
218 | + font.pixelSize: 16 |
219 | horizontalAlignment: Text.AlignHCenter |
220 | verticalAlignment: Text.AlignVCenter |
221 | } |
222 | |
223 | opacity: (!expanded && dashView.dashMode == DashDeclarativeView.DesktopMode) ? 1 : 0 |
224 | + Behavior on opacity {NumberAnimation {duration: 100}} |
225 | |
226 | onClicked: { |
227 | shortcutsActive = true |
228 | @@ -55,8 +69,7 @@ |
229 | list.model: dash.places |
230 | |
231 | list.delegate: UnityDefaultRenderer { |
232 | - /* -2 is here because no rightMargin is set in ListViewWithScrollbar.list yet */ |
233 | - width: ListView.view.width-2 |
234 | + width: ListView.view.width |
235 | |
236 | parentListView: list |
237 | placeEntryModel: modelData |
238 | @@ -91,81 +104,99 @@ |
239 | } |
240 | } |
241 | |
242 | - Flow { |
243 | - id: buttons |
244 | + Rectangle { |
245 | + id: shortcuts |
246 | |
247 | opacity: (!globalSearchActive && (shortcutsActive || dashView.dashMode == DashDeclarativeView.FullScreenMode)) ? 1 : 0 |
248 | anchors.horizontalCenter: parent.horizontalCenter |
249 | anchors.verticalCenter: parent.verticalCenter |
250 | |
251 | - width: 692 |
252 | - height: 348 |
253 | - spacing: 62 |
254 | - |
255 | - HomeButton { |
256 | - icon: "image://icons/unity-icon-theme/web" |
257 | - label: qsTr("Web") |
258 | - |
259 | - GConfItem { |
260 | - id: desktop_file_path |
261 | - key: "/desktop/gnome/applications/browser/exec" |
262 | - } |
263 | - |
264 | - onClicked: { |
265 | - dashView.active = false |
266 | - console.log("FIXME: should launch", desktop_file_path.value) |
267 | - Qt.openUrlExternally("http://") |
268 | - } |
269 | - } |
270 | - |
271 | - HomeButton { |
272 | - icon: "image://icons/unity-icon-theme/music" |
273 | - label: qsTr("Music") |
274 | - onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 4) |
275 | - } |
276 | - |
277 | - HomeButton { |
278 | - icon: "image://icons/unity-icon-theme/photos" |
279 | - label: qsTr("Photos & Videos") |
280 | - onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 4) |
281 | - } |
282 | - |
283 | - HomeButton { |
284 | - icon: "image://icons/unity-icon-theme/games" |
285 | - label: qsTr("Games") |
286 | - onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 2) |
287 | - } |
288 | - |
289 | - HomeButton { |
290 | - icon: "image://icons/unity-icon-theme/email_and_chat" |
291 | - label: qsTr("Email & Chat") |
292 | - onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 3) |
293 | - } |
294 | - |
295 | - HomeButton { |
296 | - icon: "image://icons/unity-icon-theme/work" |
297 | - label: qsTr("Office") |
298 | - onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 5) |
299 | - } |
300 | - |
301 | - HomeButton { |
302 | - icon: "image://icons/unity-icon-theme/filesandfolders" |
303 | - label: qsTr("Files & Folders") |
304 | - onClicked: activatePlaceEntry("/usr/share/unity/places/files.place", "Files", 0) |
305 | - } |
306 | - |
307 | - HomeButton { |
308 | - icon: "image://icons/unity-icon-theme/softwarecentre" |
309 | - label: qsTr("Get New Apps") |
310 | - |
311 | - LauncherApplication { |
312 | - id: software_center |
313 | - desktop_file: "/usr/share/applications/ubuntu-software-center.desktop" |
314 | - } |
315 | - |
316 | - onClicked: { |
317 | - dashView.active = false |
318 | - software_center.activate() |
319 | + width: 888 |
320 | + height: 466 |
321 | + |
322 | + radius: 5 |
323 | + border.width: 1 |
324 | + /* FIXME: wrong colors */ |
325 | + border.color: Qt.rgba(1, 1, 1, 0.2) |
326 | + color: Qt.rgba(0, 0, 0, 0.3) |
327 | + |
328 | + Button { |
329 | + id: closeShortcutsButton |
330 | + |
331 | + anchors.left: parent.left |
332 | + anchors.top: parent.top |
333 | + anchors.leftMargin: -width/2 |
334 | + |
335 | + width: childrenRect.width |
336 | + height: childrenRect.height |
337 | + |
338 | + Image { |
339 | + id: search_icon |
340 | + |
341 | + width: sourceSize.width |
342 | + height: sourceSize.height |
343 | + |
344 | + source: "artwork/cross.png" |
345 | + } |
346 | + |
347 | + opacity: (expanded && dashView.dashMode == DashDeclarativeView.DesktopMode) ? 1 : 0 |
348 | + Behavior on opacity {NumberAnimation {duration: 100}} |
349 | + |
350 | + onClicked: shortcutsActive = false |
351 | + } |
352 | + |
353 | + Flow { |
354 | + anchors.fill: parent |
355 | + anchors.topMargin: 26 |
356 | + anchors.bottomMargin: 35 |
357 | + anchors.leftMargin: 32 |
358 | + anchors.rightMargin: 32 |
359 | + spacing: 61 |
360 | + |
361 | + /* FIXME: dummy icons need to be replaced by design's */ |
362 | + HomeButton { |
363 | + label: qsTr("Find Media Apps") |
364 | + icon: "artwork/find_media_apps.png" |
365 | + onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 4) |
366 | + } |
367 | + |
368 | + HomeButton { |
369 | + label: qsTr("Find Internet Apps") |
370 | + icon: "artwork/find_internet_apps.png" |
371 | + onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 3) |
372 | + } |
373 | + |
374 | + HomeButton { |
375 | + label: qsTr("Find More Apps") |
376 | + icon: "artwork/find_more_apps.png" |
377 | + onClicked: activatePlaceEntry("/usr/share/unity/places/applications.place", "Files", 0) |
378 | + } |
379 | + |
380 | + HomeButton { |
381 | + label: qsTr("Find Files") |
382 | + icon: "artwork/find_files.png" |
383 | + onClicked: activatePlaceEntry("/usr/share/unity/places/files.place", "Files", 0) |
384 | + } |
385 | + |
386 | + /* FIXME: use user's preferred applications instead of hardcoding them */ |
387 | + HomeButtonApplication { |
388 | + label: qsTr("Browse the Web") |
389 | + desktopFile: "firefox.desktop" |
390 | + } |
391 | + |
392 | + HomeButtonApplication { |
393 | + label: qsTr("View Photos") |
394 | + desktopFile: "shotwell.desktop" |
395 | + } |
396 | + |
397 | + HomeButtonApplication { |
398 | + label: qsTr("Check Email") |
399 | + desktopFile: "evolution.desktop" |
400 | + } |
401 | + |
402 | + HomeButtonApplication { |
403 | + label: qsTr("Listen to Music") |
404 | + desktopFile: "banshee-1.desktop" |
405 | } |
406 | } |
407 | } |
408 | |
409 | === modified file 'places/HomeButton.qml' |
410 | --- places/HomeButton.qml 2010-10-20 03:06:47 +0000 |
411 | +++ places/HomeButton.qml 2011-02-22 03:27:59 +0000 |
412 | @@ -3,26 +3,31 @@ |
413 | Button { |
414 | property alias icon: icon.source |
415 | property alias label: label.text |
416 | - |
417 | - width: 126 |
418 | - height: 148 |
419 | - |
420 | - Image { |
421 | - id: icon |
422 | - |
423 | + property alias iconSourceSize: icon.sourceSize |
424 | + |
425 | + width: 160 |
426 | + height: 172 |
427 | + |
428 | + Item { |
429 | + anchors.right: parent.right |
430 | + anchors.left: parent.left |
431 | anchors.top: parent.top |
432 | - anchors.left: parent.left |
433 | - anchors.leftMargin: -1 |
434 | - anchors.topMargin: -1 |
435 | - width: 128 |
436 | - height: 128 |
437 | - fillMode: Image.PreserveAspectFit |
438 | - sourceSize.width: width |
439 | - sourceSize.height: height |
440 | - |
441 | - asynchronous: true |
442 | - opacity: status == Image.Ready ? 1 : 0 |
443 | - Behavior on opacity {NumberAnimation {duration: 200; easing.type: Easing.InOutQuad}} |
444 | + anchors.bottom: label.bottom |
445 | + anchors.bottomMargin: 30 |
446 | + |
447 | + Image { |
448 | + id: icon |
449 | + |
450 | + width: sourceSize.width |
451 | + height: sourceSize.height |
452 | + |
453 | + anchors.centerIn: parent |
454 | + fillMode: Image.PreserveAspectFit |
455 | + |
456 | + asynchronous: true |
457 | + opacity: status == Image.Ready ? 1 : 0 |
458 | + Behavior on opacity {NumberAnimation {duration: 200; easing.type: Easing.InOutQuad}} |
459 | + } |
460 | } |
461 | |
462 | TextCustom { |
463 | @@ -38,5 +43,7 @@ |
464 | anchors.rightMargin: 5 |
465 | anchors.leftMargin: 7 |
466 | font.underline: parent.activeFocus |
467 | + font.bold: true |
468 | + font.pixelSize: 16 |
469 | } |
470 | } |
471 | |
472 | === added file 'places/HomeButtonApplication.qml' |
473 | --- places/HomeButtonApplication.qml 1970-01-01 00:00:00 +0000 |
474 | +++ places/HomeButtonApplication.qml 2011-02-22 03:27:59 +0000 |
475 | @@ -0,0 +1,23 @@ |
476 | +import Qt 4.7 |
477 | +/* Necessary for: |
478 | + - ImageProvider serving image://icons/theme_name/icon_name |
479 | + - LauncherApplication |
480 | +*/ |
481 | +import UnityApplications 1.0 |
482 | + |
483 | +HomeButton { |
484 | + property alias desktopFile: application.desktop_file |
485 | + |
486 | + LauncherApplication { |
487 | + id: application |
488 | + } |
489 | + |
490 | + onClicked: { |
491 | + dashView.active = false |
492 | + application.activate() |
493 | + } |
494 | + |
495 | + icon: "image://icons/" + application.icon |
496 | + iconSourceSize.width: 128 |
497 | + iconSourceSize.height: 128 |
498 | +} |
499 | |
500 | === modified file 'places/ListViewWithScrollbar.qml' |
501 | --- places/ListViewWithScrollbar.qml 2010-12-16 12:14:20 +0000 |
502 | +++ places/ListViewWithScrollbar.qml 2011-02-22 03:27:59 +0000 |
503 | @@ -10,8 +10,8 @@ |
504 | anchors.top: parent.top |
505 | anchors.bottom: parent.bottom |
506 | anchors.left: parent.left |
507 | - /* Take all available horizontal space if the scrollbar is invisible */ |
508 | - anchors.right: scrollbar.opacity > 0 ? scrollbar.left : parent.right |
509 | + anchors.right: scrollbar.left |
510 | + anchors.rightMargin: 15 |
511 | |
512 | clip: true |
513 | /* FIXME: proper spacing cannot be set because of the hack in Group.qml |
514 | @@ -44,6 +44,7 @@ |
515 | id: scrollbar |
516 | |
517 | anchors.top: parent.top |
518 | + anchors.topMargin: 15 |
519 | anchors.bottom: parent.bottom |
520 | anchors.right: parent.right |
521 | |
522 | |
523 | === modified file 'places/PlaceEntryView.qml' |
524 | --- places/PlaceEntryView.qml 2011-01-27 09:30:14 +0000 |
525 | +++ places/PlaceEntryView.qml 2011-02-22 03:27:59 +0000 |
526 | @@ -34,8 +34,7 @@ |
527 | console.log("Failed to load renderer", groupRenderer) |
528 | } |
529 | |
530 | - /* -2 is here to prevent clipping of the group; it looks like a bug */ |
531 | - width: ListView.view.width-2 |
532 | + width: ListView.view.width |
533 | |
534 | /* Model that will be used by the group's delegate */ |
535 | QSortFilterProxyModelQML { |
536 | |
537 | === modified file 'places/RendererGrid.qml' |
538 | --- places/RendererGrid.qml 2011-02-11 00:07:17 +0000 |
539 | +++ places/RendererGrid.qml 2011-02-22 03:27:59 +0000 |
540 | @@ -45,7 +45,7 @@ |
541 | anchors.top: parent.top |
542 | anchors.left: parent.left |
543 | anchors.right: parent.right |
544 | - height: 28 |
545 | + height: 32 |
546 | icon: parent.iconHint |
547 | label: parent.displayName |
548 | |
549 | @@ -56,7 +56,7 @@ |
550 | id: results_layout |
551 | |
552 | anchors.top: header.bottom |
553 | - anchors.topMargin: 14 |
554 | + anchors.topMargin: 22 |
555 | anchors.left: parent.left |
556 | anchors.leftMargin: 2 |
557 | anchors.right: parent.right |
558 | |
559 | === modified file 'places/Scrollbar.qml' |
560 | --- places/Scrollbar.qml 2010-11-27 03:13:00 +0000 |
561 | +++ places/Scrollbar.qml 2011-02-22 03:27:59 +0000 |
562 | @@ -1,8 +1,7 @@ |
563 | import Qt 4.7 |
564 | |
565 | /* Scrollbar composed of: |
566 | - - a background track; clicking on it triggers page scrolling |
567 | - - a draggable slider on top |
568 | + - a draggable slider |
569 | |
570 | Usage: |
571 | |
572 | @@ -19,39 +18,31 @@ |
573 | |
574 | property variant targetFlickable |
575 | |
576 | - width: 10 |
577 | + width: 3 |
578 | |
579 | - BorderImage { |
580 | - id: background |
581 | + MouseArea { |
582 | + id: scrollMouseArea |
583 | |
584 | anchors.fill: parent |
585 | - source: "artwork/scrollbar/background.sci" |
586 | - smooth: false |
587 | - |
588 | - MouseArea { |
589 | - id: scrollMouseArea |
590 | - |
591 | - anchors.fill: parent |
592 | - acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton |
593 | - |
594 | - onPressed: { |
595 | - /* Scroll one page without overshooting */ |
596 | - var scrollAmount = mouseY > slider.y ? targetFlickable.height : -targetFlickable.height |
597 | - var destination = targetFlickable.contentY + scrollAmount |
598 | - var clampedDestination = Math.max(0, Math.min(targetFlickable.contentHeight - targetFlickable.height, |
599 | - destination)) |
600 | - scrollAnimation.to = clampedDestination |
601 | - scrollAnimation.restart() |
602 | - } |
603 | - |
604 | - NumberAnimation { |
605 | - id: scrollAnimation |
606 | - |
607 | - duration: 200 |
608 | - easing.type: Easing.InOutQuad |
609 | - target: targetFlickable |
610 | - property: "contentY" |
611 | - } |
612 | + acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton |
613 | + |
614 | + onPressed: { |
615 | + /* Scroll one page without overshooting */ |
616 | + var scrollAmount = mouseY > slider.y ? targetFlickable.height : -targetFlickable.height |
617 | + var destination = targetFlickable.contentY + scrollAmount |
618 | + var clampedDestination = Math.max(0, Math.min(targetFlickable.contentHeight - targetFlickable.height, |
619 | + destination)) |
620 | + scrollAnimation.to = clampedDestination |
621 | + scrollAnimation.restart() |
622 | + } |
623 | + |
624 | + NumberAnimation { |
625 | + id: scrollAnimation |
626 | + |
627 | + duration: 200 |
628 | + easing.type: Easing.InOutQuad |
629 | + target: targetFlickable |
630 | + property: "contentY" |
631 | } |
632 | } |
633 | |
634 | @@ -74,35 +65,16 @@ |
635 | |
636 | BorderImage { |
637 | anchors.fill: parent |
638 | - /* The glow around the slider is 5 pixels wide */ |
639 | - anchors.margins: -5 |
640 | + /* The glow around the slider is 5 pixels wide on the left and right sides |
641 | + and 10 pixels tall on the top and bottom sides. */ |
642 | + anchors.rightMargin: -5 |
643 | + anchors.leftMargin: -5 |
644 | + anchors.topMargin: -10 |
645 | + anchors.bottomMargin: -10 |
646 | |
647 | smooth: false |
648 | |
649 | - source: { |
650 | - if(dragMouseArea.pressed) |
651 | - return "artwork/scrollbar/slider_pressed.sci" |
652 | - else if(dragMouseArea.containsMouse) |
653 | - return "artwork/scrollbar/slider_hovered.sci" |
654 | - else |
655 | - return "artwork/scrollbar/slider_default.sci" |
656 | - } |
657 | - |
658 | - Image { |
659 | - id: handle |
660 | - |
661 | - anchors.centerIn: parent |
662 | - source: { |
663 | - if(dragMouseArea.pressed) |
664 | - return "artwork/scrollbar/handle_pressed.png" |
665 | - else |
666 | - return "artwork/scrollbar/handle_default.png" |
667 | - } |
668 | - width: sourceSize.width |
669 | - height: sourceSize.height |
670 | - fillMode: Image.Tile |
671 | - smooth: false |
672 | - } |
673 | + source: "artwork/scrollbar.sci" |
674 | } |
675 | |
676 | MouseArea { |
677 | |
678 | === removed file 'places/SearchBar.qml' |
679 | --- places/SearchBar.qml 2011-01-06 18:35:39 +0000 |
680 | +++ places/SearchBar.qml 1970-01-01 00:00:00 +0000 |
681 | @@ -1,87 +0,0 @@ |
682 | -import Qt 4.7 |
683 | - |
684 | -FocusScope { |
685 | - /* Keys forwarded to the search bar are forwarded to the search entry. */ |
686 | - Keys.forwardTo: [search_entry] |
687 | - |
688 | - BorderGlow { |
689 | - id: background |
690 | - |
691 | - anchors.fill: parent |
692 | - |
693 | - Image { |
694 | - anchors.fill: parent |
695 | - anchors.margins: 6 |
696 | - source: "artwork/checker.png" |
697 | - fillMode: Image.Tile |
698 | - } |
699 | - } |
700 | - |
701 | - SearchEntry { |
702 | - id: search_entry |
703 | - |
704 | - focus: true |
705 | - KeyNavigation.right: sections |
706 | - |
707 | - width: 281 |
708 | - anchors.left: parent.left |
709 | - anchors.leftMargin: 82 |
710 | - anchors.top: parent.top |
711 | - anchors.topMargin: 7 |
712 | - anchors.bottom: parent.bottom |
713 | - anchors.bottomMargin: 6 |
714 | - } |
715 | - |
716 | - ListView { |
717 | - id: sections |
718 | - |
719 | - KeyNavigation.left: search_entry |
720 | - |
721 | - visible: model != undefined |
722 | - orientation: ListView.Horizontal |
723 | - /* Non-draggable when all sections are visible */ |
724 | - boundsBehavior: Flickable.StopAtBounds |
725 | - |
726 | - anchors.left: search_entry.right |
727 | - anchors.leftMargin: 14 |
728 | - anchors.right: parent.right |
729 | - anchors.rightMargin: 15 |
730 | - spacing: 10 |
731 | - |
732 | - height: parent.height |
733 | - /* Make sure the first section is selected when getting the focus */ |
734 | - currentIndex: 0 |
735 | - onActiveFocusChanged: { |
736 | - /* It really should be onFocusChanged but the following bug makes |
737 | - using focus impossible: |
738 | - http://bugreports.qt.nokia.com/browse/QTBUG-12649 |
739 | - */ |
740 | - if(!focus) currentIndex = 0 |
741 | - } |
742 | - |
743 | - delegate: Section { |
744 | - anchors.verticalCenter: parent.verticalCenter |
745 | - horizontalPadding: 4 |
746 | - verticalPadding: 3 |
747 | - /* FIXME: check for sections.model != undefined is a |
748 | - workaround for a crash in Qt happening when setting the model of |
749 | - a ListView to undefined after it being non-empty. |
750 | - It seems that the model count is not 0 and delegates are still |
751 | - being created and updated with data. |
752 | - |
753 | - To reproduce the crash: go to the applications place, exit the |
754 | - dash and then go to the home page of the dash. |
755 | - */ |
756 | - label: sections.model != undefined ? column_0 : "" |
757 | - isActiveSection: dash.currentPage.model.activeSection == index |
758 | - |
759 | - onClicked: { |
760 | - sections.focus = false |
761 | - search_entry.focus = true |
762 | - dash.currentPage.model.activeSection = model.index |
763 | - } |
764 | - } |
765 | - |
766 | - model: dash.currentPage != undefined ? dash.currentPage.model.sections : undefined |
767 | - } |
768 | -} |
769 | |
770 | === modified file 'places/SearchEntry.qml' |
771 | --- places/SearchEntry.qml 2011-01-06 23:19:27 +0000 |
772 | +++ places/SearchEntry.qml 2011-02-22 03:27:59 +0000 |
773 | @@ -1,4 +1,5 @@ |
774 | import Qt 4.7 |
775 | +import Effects 1.0 |
776 | |
777 | FocusScope { |
778 | property string searchQuery |
779 | @@ -12,8 +13,10 @@ |
780 | /* Keys forwarded to the search entry are forwarded to the text input. */ |
781 | Keys.forwardTo: [search_input] |
782 | |
783 | - BorderGlow { |
784 | + BorderImage { |
785 | anchors.fill: parent |
786 | + source: "artwork/search_background.sci" |
787 | + smooth: false |
788 | } |
789 | |
790 | Item { |
791 | @@ -21,35 +24,54 @@ |
792 | anchors.topMargin: 6 |
793 | anchors.bottomMargin: 6 |
794 | anchors.leftMargin: 6 |
795 | - anchors.rightMargin: 6 |
796 | + anchors.rightMargin: 16 |
797 | |
798 | Image { |
799 | id: search_icon |
800 | |
801 | anchors.left: parent.left |
802 | - anchors.leftMargin: 3 |
803 | + anchors.leftMargin: -5 |
804 | anchors.top: parent.top |
805 | - anchors.topMargin: 1 |
806 | anchors.bottom: parent.bottom |
807 | - anchors.bottomMargin: 1 |
808 | + width: sourceSize.width |
809 | + |
810 | smooth: true |
811 | - width: 18 |
812 | - |
813 | - source: "artwork/search_icon.png" |
814 | - fillMode: Image.PreserveAspectCrop |
815 | + |
816 | + source: search_input.text ? "artwork/cross.png" : "artwork/search_icon.png" |
817 | + fillMode: Image.PreserveAspectFit |
818 | + } |
819 | + |
820 | + MouseArea { |
821 | + id: clear_button |
822 | + |
823 | + anchors.fill: search_icon |
824 | + |
825 | + onClicked: { |
826 | + search_input.forceActiveFocus() |
827 | + search_input.text = "" |
828 | + } |
829 | } |
830 | |
831 | TextInput { |
832 | id: search_input |
833 | |
834 | + effect: DropShadow { |
835 | + id: glow |
836 | + |
837 | + blurRadius: 4 |
838 | + offset.x: 0 |
839 | + offset.y: 0 |
840 | + color: "white" |
841 | + enabled: search_input.text != "" |
842 | + } |
843 | + |
844 | anchors.left: search_icon.right |
845 | - anchors.leftMargin: 2 |
846 | - anchors.right: clear_button.left |
847 | - anchors.rightMargin: 5 |
848 | - anchors.bottom: parent.bottom |
849 | - anchors.bottomMargin: 3 |
850 | + anchors.leftMargin: -5 |
851 | + anchors.right: parent.right |
852 | + anchors.verticalCenter: parent.verticalCenter |
853 | |
854 | color: "#ffffff" |
855 | + font.pixelSize: 28 |
856 | focus: true |
857 | selectByMouse: true |
858 | cursorDelegate: cursor |
859 | @@ -100,40 +122,23 @@ |
860 | Text { |
861 | id: search_instructions |
862 | |
863 | - anchors.fill: parent |
864 | - anchors.leftMargin: 4 |
865 | + anchors.left: parent.left |
866 | + anchors.right: parent.right |
867 | + anchors.verticalCenter: parent.verticalCenter |
868 | |
869 | + color: "white" |
870 | + opacity: 0.5 |
871 | + font.pixelSize: 20 |
872 | font.italic: true |
873 | - color: "#eeeeee" |
874 | text: { |
875 | if(search_input.text) |
876 | return "" |
877 | else if(dash.currentPage != undefined && dash.currentPage.model.name) |
878 | - return qsTr("Search %1").arg(dash.currentPage.model.name) |
879 | + return qsTr("Search for %1").arg(dash.currentPage.model.name) |
880 | else |
881 | return qsTr("Search") |
882 | } |
883 | } |
884 | } |
885 | - |
886 | - Image { |
887 | - id: clear_button |
888 | - |
889 | - anchors.right: parent.right |
890 | - anchors.rightMargin: 4 |
891 | - anchors.verticalCenter: parent.verticalCenter |
892 | - width: 10 |
893 | - |
894 | - source: "artwork/cross.png" |
895 | - fillMode: Image.PreserveAspectFit |
896 | - |
897 | - MouseArea { |
898 | - anchors.fill: parent |
899 | - onClicked: { |
900 | - search_input.forceActiveFocus() |
901 | - search_input.text = "" |
902 | - } |
903 | - } |
904 | - } |
905 | } |
906 | } |
907 | |
908 | === added file 'places/SearchRefine.qml' |
909 | --- places/SearchRefine.qml 1970-01-01 00:00:00 +0000 |
910 | +++ places/SearchRefine.qml 2011-02-22 03:27:59 +0000 |
911 | @@ -0,0 +1,99 @@ |
912 | +import Qt 4.7 |
913 | +import Effects 1.0 |
914 | + |
915 | +FocusScope { |
916 | + id: searchRefine |
917 | + |
918 | + property bool folded: true |
919 | + property int headerHeight |
920 | + property variant placeEntryModel |
921 | + |
922 | + AbstractButton { |
923 | + id: header |
924 | + |
925 | + effect: DropShadow { |
926 | + blurRadius: { |
927 | + switch (header.state) { |
928 | + case "selected": |
929 | + return 4 |
930 | + case "pressed": |
931 | + return 8 |
932 | + default: |
933 | + return 0 |
934 | + } |
935 | + } |
936 | + offset.x: 0 |
937 | + offset.y: 0 |
938 | + color: "white" |
939 | + } |
940 | + |
941 | + onClicked: searchRefine.folded = !searchRefine.folded |
942 | + |
943 | + focus: true |
944 | + |
945 | + anchors.left: parent.left |
946 | + anchors.right: parent.right |
947 | + anchors.top: parent.top |
948 | + anchors.topMargin: 10 |
949 | + height: headerHeight - anchors.topMargin |
950 | + |
951 | + TextCustom { |
952 | + id: title |
953 | + |
954 | + text: qsTr("Refine search") |
955 | + font.bold: true |
956 | + font.pixelSize: 16 |
957 | + |
958 | + anchors.top: parent.top |
959 | + anchors.left: parent.left |
960 | + } |
961 | + |
962 | + FoldingArrow { |
963 | + id: arrow |
964 | + |
965 | + folded: searchRefine.folded |
966 | + |
967 | + anchors.verticalCenter: title.verticalCenter |
968 | + anchors.left: title.right |
969 | + anchors.leftMargin: 10 |
970 | + } |
971 | + } |
972 | + |
973 | + VisualItemModel { |
974 | + id: optionsModel |
975 | + |
976 | + SearchRefineOptionType { |
977 | + title: qsTr("Type") |
978 | + placeEntryModel: searchRefine.placeEntryModel |
979 | + } |
980 | + } |
981 | + |
982 | + ListView { |
983 | + id: options |
984 | + |
985 | + opacity: folded ? 0.0 : 1.0 |
986 | + Behavior on opacity {NumberAnimation {duration: 100; easing.type: Easing.InOutQuad}} |
987 | + |
988 | + anchors.left: parent.left |
989 | + anchors.right: parent.right |
990 | + anchors.top: header.bottom |
991 | + anchors.topMargin: 7 |
992 | + anchors.bottom: parent.bottom |
993 | + orientation: ListView.Vertical |
994 | + |
995 | + /* Make sure the first section is selected when getting the focus */ |
996 | + currentIndex: 0 |
997 | + onActiveFocusChanged: { |
998 | + /* It really should be onFocusChanged but the following bug makes |
999 | + using focus impossible (fixed in Qt 4.7.1): |
1000 | + http://bugreports.qt.nokia.com/browse/QTBUG-12649 |
1001 | + */ |
1002 | + if(!focus) currentIndex = 0 |
1003 | + } |
1004 | + |
1005 | + /* Non-draggable when all items are visible */ |
1006 | + boundsBehavior: Flickable.StopAtBounds |
1007 | + |
1008 | + model: optionsModel |
1009 | + } |
1010 | +} |
1011 | |
1012 | === added file 'places/SearchRefineOption.qml' |
1013 | --- places/SearchRefineOption.qml 1970-01-01 00:00:00 +0000 |
1014 | +++ places/SearchRefineOption.qml 2011-02-22 03:27:59 +0000 |
1015 | @@ -0,0 +1,9 @@ |
1016 | +import Qt 4.7 |
1017 | + |
1018 | +FocusScope { |
1019 | + property string title |
1020 | + property variant placeEntryModel |
1021 | + |
1022 | + width: parent.width |
1023 | + height: childrenRect.height |
1024 | +} |
1025 | |
1026 | === added file 'places/SearchRefineOptionType.qml' |
1027 | --- places/SearchRefineOptionType.qml 1970-01-01 00:00:00 +0000 |
1028 | +++ places/SearchRefineOptionType.qml 2011-02-22 03:27:59 +0000 |
1029 | @@ -0,0 +1,62 @@ |
1030 | +import Qt 4.7 |
1031 | + |
1032 | +SearchRefineOption { |
1033 | + id: searchRefineOption |
1034 | + |
1035 | + AbstractButton { |
1036 | + id: header |
1037 | + |
1038 | + focus: true |
1039 | + anchors.top: parent.top |
1040 | + anchors.left: parent.left |
1041 | + anchors.right: parent.right |
1042 | + height: childrenRect.height |
1043 | + |
1044 | + TextCustom { |
1045 | + id: title |
1046 | + |
1047 | + anchors.top: parent.top |
1048 | + anchors.left: parent.left |
1049 | + |
1050 | + text: searchRefineOption.title |
1051 | + font.pixelSize: 16 |
1052 | + font.bold: true |
1053 | + } |
1054 | + } |
1055 | + |
1056 | + GridView { |
1057 | + id: filters |
1058 | + |
1059 | + property int columns: 2 |
1060 | + property int rowsPerColumn: Math.ceil(count/columns) |
1061 | + |
1062 | + cellHeight: 35 |
1063 | + cellWidth: width/columns |
1064 | + |
1065 | + anchors.top: header.bottom |
1066 | + anchors.topMargin: 15 |
1067 | + height: cellHeight * rowsPerColumn |
1068 | + boundsBehavior: Flickable.StopAtBounds |
1069 | + |
1070 | + anchors.left: parent.left |
1071 | + anchors.right: parent.right |
1072 | + |
1073 | + flow: GridView.TopToBottom |
1074 | + |
1075 | + /* Make sure the first item is selected when getting the focus for the first time */ |
1076 | + currentIndex: 0 |
1077 | + |
1078 | + delegate: TickBox { |
1079 | + height: filters.cellHeight |
1080 | + width: filters.cellWidth-10 |
1081 | + /* Not checking for placeEntryModel != undefined leads to a segfault |
1082 | + when switching places */ |
1083 | + text: placeEntryModel != undefined ? column_0 : "" |
1084 | + ticked: dash.currentPage.model.activeSection == model.index |
1085 | + |
1086 | + onClicked: placeEntryModel.activeSection = model.index |
1087 | + } |
1088 | + |
1089 | + model: placeEntryModel != undefined ? placeEntryModel.sections : undefined |
1090 | + } |
1091 | +} |
1092 | |
1093 | === removed file 'places/Section.qml' |
1094 | --- places/Section.qml 2010-11-21 23:02:27 +0000 |
1095 | +++ places/Section.qml 1970-01-01 00:00:00 +0000 |
1096 | @@ -1,43 +0,0 @@ |
1097 | -import Qt 4.7 |
1098 | - |
1099 | -AbstractButton { |
1100 | - property alias label: label.text |
1101 | - property int horizontalPadding: 0 |
1102 | - property int verticalPadding: 0 |
1103 | - property bool isActiveSection: false |
1104 | - property bool activeOrPressed: isActiveSection || state == "pressed" |
1105 | - |
1106 | - width: label.width + horizontalPadding*2 |
1107 | - height: label.height + verticalPadding*2 |
1108 | - |
1109 | - Rectangle { |
1110 | - anchors.fill: parent |
1111 | - opacity: activeOrPressed || parent.state == "selected" ? 1.0 : 0.0 |
1112 | - |
1113 | - color: activeOrPressed ? "#ffffffff" : "#00000000" |
1114 | - border.color: "#cccccc" |
1115 | - border.width: 1 |
1116 | - radius: 3 |
1117 | - |
1118 | - Behavior on opacity {NumberAnimation {duration: 100}} |
1119 | - |
1120 | - Image { |
1121 | - fillMode: Image.Tile |
1122 | - anchors.fill: parent |
1123 | - source: "artwork/button_background.png" |
1124 | - smooth: false |
1125 | - } |
1126 | - } |
1127 | - |
1128 | - TextCustom { |
1129 | - id: label |
1130 | - |
1131 | - width: paintedWidth |
1132 | - height: paintedHeight |
1133 | - anchors.verticalCenter: parent.verticalCenter |
1134 | - anchors.horizontalCenter: parent.horizontalCenter |
1135 | - |
1136 | - color: activeOrPressed ? "#444444" : "#ffffff" |
1137 | - horizontalAlignment: Text.AlignHCenter |
1138 | - } |
1139 | -} |
1140 | |
1141 | === added file 'places/TickBox.qml' |
1142 | --- places/TickBox.qml 1970-01-01 00:00:00 +0000 |
1143 | +++ places/TickBox.qml 2011-02-22 03:27:59 +0000 |
1144 | @@ -0,0 +1,47 @@ |
1145 | +import Qt 4.7 |
1146 | + |
1147 | +AbstractButton { |
1148 | + id: tickBox |
1149 | + |
1150 | + property string text |
1151 | + property bool ticked: false |
1152 | + property bool canUntick: true |
1153 | + |
1154 | + width: childrenRect.width |
1155 | + height: childrenRect.height |
1156 | + |
1157 | + TextCustom { |
1158 | + id: label |
1159 | + |
1160 | + anchors.left: box.right |
1161 | + anchors.leftMargin: 8 |
1162 | + width: paintedWidth |
1163 | + anchors.top: parent.top |
1164 | + font.pixelSize: 16 |
1165 | + text: tickBox.text |
1166 | + } |
1167 | + |
1168 | + Image { |
1169 | + id: box |
1170 | + |
1171 | + opacity: !canUntick && ticked ? 0 : 1 |
1172 | + anchors.top: parent.top |
1173 | + anchors.left: parent.left |
1174 | + source: "artwork/tick_box.png" |
1175 | + width: sourceSize.width |
1176 | + height: sourceSize.height |
1177 | + } |
1178 | + |
1179 | + Image { |
1180 | + id: tick |
1181 | + |
1182 | + anchors.top: box.top |
1183 | + anchors.topMargin: 2 |
1184 | + anchors.left: box.left |
1185 | + anchors.leftMargin: 3 |
1186 | + opacity: ticked ? 1.0 : parent.state == "selected" ? 0.4 : 0.0 |
1187 | + source: "artwork/tick.png" |
1188 | + width: sourceSize.width |
1189 | + height: sourceSize.height |
1190 | + } |
1191 | +} |
1192 | |
1193 | === modified file 'places/UnityDefaultRenderer.qml' |
1194 | --- places/UnityDefaultRenderer.qml 2011-02-10 09:38:47 +0000 |
1195 | +++ places/UnityDefaultRenderer.qml 2011-02-22 03:27:59 +0000 |
1196 | @@ -1,10 +1,10 @@ |
1197 | import Qt 4.7 |
1198 | |
1199 | RendererGrid { |
1200 | - cellWidth: 158 |
1201 | - cellHeight: 76 |
1202 | - horizontalSpacing: 26 |
1203 | - verticalSpacing: 26 |
1204 | + cellWidth: 136 |
1205 | + cellHeight: 108 |
1206 | + horizontalSpacing: 10 |
1207 | + verticalSpacing: 10 |
1208 | |
1209 | cellRenderer: Component { |
1210 | Button { |
1211 | @@ -24,7 +24,7 @@ |
1212 | height: 48 |
1213 | anchors.horizontalCenter: parent.horizontalCenter |
1214 | anchors.top: parent.top |
1215 | - anchors.topMargin: 3 |
1216 | + anchors.topMargin: 10 |
1217 | fillMode: Image.PreserveAspectFit |
1218 | sourceSize.width: width |
1219 | sourceSize.height: height |
1220 | @@ -41,9 +41,11 @@ |
1221 | color: parent.state == "pressed" ? "#5e5e5e" : "#ffffff" |
1222 | elide: Text.ElideMiddle |
1223 | horizontalAlignment: Text.AlignHCenter |
1224 | + anchors.top: icon.bottom |
1225 | anchors.bottom: parent.bottom |
1226 | anchors.right: parent.right |
1227 | anchors.left: parent.left |
1228 | + anchors.topMargin: 13 |
1229 | anchors.bottomMargin: 5 |
1230 | anchors.rightMargin: 3 |
1231 | anchors.leftMargin: 3 |
1232 | |
1233 | === modified file 'places/artwork/arrow.png' |
1234 | Binary files places/artwork/arrow.png 2010-10-17 03:39:26 +0000 and places/artwork/arrow.png 2011-02-22 03:27:59 +0000 differ |
1235 | === removed file 'places/artwork/border_glow.png' |
1236 | Binary files places/artwork/border_glow.png 2010-10-15 00:14:28 +0000 and places/artwork/border_glow.png 1970-01-01 00:00:00 +0000 differ |
1237 | === removed file 'places/artwork/border_glow.sci' |
1238 | --- places/artwork/border_glow.sci 2010-11-27 02:56:39 +0000 |
1239 | +++ places/artwork/border_glow.sci 1970-01-01 00:00:00 +0000 |
1240 | @@ -1,9 +0,0 @@ |
1241 | -border.left: 11 |
1242 | -border.top: 12 |
1243 | -border.bottom: 12 |
1244 | -border.right: 11 |
1245 | -source: border_glow.png |
1246 | -# It might be more efficient to have a png with a bigger transparent |
1247 | -# middle and setting the tile rules to Repeat |
1248 | -horizontalTileRule: Stretch |
1249 | -verticalTileRule: Stretch |
1250 | |
1251 | === removed file 'places/artwork/checker.png' |
1252 | Binary files places/artwork/checker.png 2010-10-15 00:14:28 +0000 and places/artwork/checker.png 1970-01-01 00:00:00 +0000 differ |
1253 | === modified file 'places/artwork/cross.png' |
1254 | Binary files places/artwork/cross.png 2010-10-15 03:54:08 +0000 and places/artwork/cross.png 2011-02-22 03:27:59 +0000 differ |
1255 | === added file 'places/artwork/find_files.png' |
1256 | Binary files places/artwork/find_files.png 1970-01-01 00:00:00 +0000 and places/artwork/find_files.png 2011-02-22 03:27:59 +0000 differ |
1257 | === added file 'places/artwork/find_internet_apps.png' |
1258 | Binary files places/artwork/find_internet_apps.png 1970-01-01 00:00:00 +0000 and places/artwork/find_internet_apps.png 2011-02-22 03:27:59 +0000 differ |
1259 | === added file 'places/artwork/find_media_apps.png' |
1260 | Binary files places/artwork/find_media_apps.png 1970-01-01 00:00:00 +0000 and places/artwork/find_media_apps.png 2011-02-22 03:27:59 +0000 differ |
1261 | === added file 'places/artwork/find_more_apps.png' |
1262 | Binary files places/artwork/find_more_apps.png 1970-01-01 00:00:00 +0000 and places/artwork/find_more_apps.png 2011-02-22 03:27:59 +0000 differ |
1263 | === added file 'places/artwork/open_shortcuts.png' |
1264 | Binary files places/artwork/open_shortcuts.png 1970-01-01 00:00:00 +0000 and places/artwork/open_shortcuts.png 2011-02-22 03:27:59 +0000 differ |
1265 | === removed directory 'places/artwork/scrollbar' |
1266 | === added file 'places/artwork/scrollbar.png' |
1267 | Binary files places/artwork/scrollbar.png 1970-01-01 00:00:00 +0000 and places/artwork/scrollbar.png 2011-02-22 03:27:59 +0000 differ |
1268 | === added file 'places/artwork/scrollbar.sci' |
1269 | --- places/artwork/scrollbar.sci 1970-01-01 00:00:00 +0000 |
1270 | +++ places/artwork/scrollbar.sci 2011-02-22 03:27:59 +0000 |
1271 | @@ -0,0 +1,7 @@ |
1272 | +border.top: 10 |
1273 | +border.bottom: 10 |
1274 | +border.left: 5 |
1275 | +border.right: 5 |
1276 | +source: scrollbar.png |
1277 | +horizontalTileRule: Repeat |
1278 | +verticalTileRule: Repeat |
1279 | |
1280 | === removed file 'places/artwork/scrollbar/background.png' |
1281 | Binary files places/artwork/scrollbar/background.png 2010-11-27 03:13:00 +0000 and places/artwork/scrollbar/background.png 1970-01-01 00:00:00 +0000 differ |
1282 | === removed file 'places/artwork/scrollbar/background.sci' |
1283 | --- places/artwork/scrollbar/background.sci 2010-11-27 03:13:00 +0000 |
1284 | +++ places/artwork/scrollbar/background.sci 1970-01-01 00:00:00 +0000 |
1285 | @@ -1,7 +0,0 @@ |
1286 | -border.top: 7 |
1287 | -border.bottom: 6 |
1288 | -border.left: 4 |
1289 | -border.right: 4 |
1290 | -source: background.png |
1291 | -horizontalTileRule: Repeat |
1292 | -verticalTileRule: Repeat |
1293 | |
1294 | === removed file 'places/artwork/scrollbar/handle_default.png' |
1295 | Binary files places/artwork/scrollbar/handle_default.png 2010-11-27 03:13:00 +0000 and places/artwork/scrollbar/handle_default.png 1970-01-01 00:00:00 +0000 differ |
1296 | === removed file 'places/artwork/scrollbar/handle_pressed.png' |
1297 | Binary files places/artwork/scrollbar/handle_pressed.png 2010-11-27 03:13:00 +0000 and places/artwork/scrollbar/handle_pressed.png 1970-01-01 00:00:00 +0000 differ |
1298 | === removed file 'places/artwork/scrollbar/slider_default.png' |
1299 | Binary files places/artwork/scrollbar/slider_default.png 2010-11-27 03:13:00 +0000 and places/artwork/scrollbar/slider_default.png 1970-01-01 00:00:00 +0000 differ |
1300 | === removed file 'places/artwork/scrollbar/slider_default.sci' |
1301 | --- places/artwork/scrollbar/slider_default.sci 2010-11-27 03:13:00 +0000 |
1302 | +++ places/artwork/scrollbar/slider_default.sci 1970-01-01 00:00:00 +0000 |
1303 | @@ -1,7 +0,0 @@ |
1304 | -border.top: 12 |
1305 | -border.bottom: 12 |
1306 | -border.left: 9 |
1307 | -border.right: 9 |
1308 | -source: slider_default.png |
1309 | -horizontalTileRule: Repeat |
1310 | -verticalTileRule: Repeat |
1311 | |
1312 | === removed file 'places/artwork/scrollbar/slider_hovered.png' |
1313 | Binary files places/artwork/scrollbar/slider_hovered.png 2010-11-27 03:13:00 +0000 and places/artwork/scrollbar/slider_hovered.png 1970-01-01 00:00:00 +0000 differ |
1314 | === removed file 'places/artwork/scrollbar/slider_hovered.sci' |
1315 | --- places/artwork/scrollbar/slider_hovered.sci 2010-11-27 03:13:00 +0000 |
1316 | +++ places/artwork/scrollbar/slider_hovered.sci 1970-01-01 00:00:00 +0000 |
1317 | @@ -1,7 +0,0 @@ |
1318 | -border.top: 12 |
1319 | -border.bottom: 12 |
1320 | -border.left: 9 |
1321 | -border.right: 9 |
1322 | -source: slider_hovered.png |
1323 | -horizontalTileRule: Repeat |
1324 | -verticalTileRule: Repeat |
1325 | |
1326 | === removed file 'places/artwork/scrollbar/slider_pressed.png' |
1327 | Binary files places/artwork/scrollbar/slider_pressed.png 2010-11-27 03:13:00 +0000 and places/artwork/scrollbar/slider_pressed.png 1970-01-01 00:00:00 +0000 differ |
1328 | === removed file 'places/artwork/scrollbar/slider_pressed.sci' |
1329 | --- places/artwork/scrollbar/slider_pressed.sci 2010-11-27 03:13:00 +0000 |
1330 | +++ places/artwork/scrollbar/slider_pressed.sci 1970-01-01 00:00:00 +0000 |
1331 | @@ -1,7 +0,0 @@ |
1332 | -border.top: 12 |
1333 | -border.bottom: 12 |
1334 | -border.left: 9 |
1335 | -border.right: 9 |
1336 | -source: slider_pressed.png |
1337 | -horizontalTileRule: Repeat |
1338 | -verticalTileRule: Repeat |
1339 | |
1340 | === added file 'places/artwork/search_background.png' |
1341 | Binary files places/artwork/search_background.png 1970-01-01 00:00:00 +0000 and places/artwork/search_background.png 2011-02-22 03:27:59 +0000 differ |
1342 | === added file 'places/artwork/search_background.sci' |
1343 | --- places/artwork/search_background.sci 1970-01-01 00:00:00 +0000 |
1344 | +++ places/artwork/search_background.sci 2011-02-22 03:27:59 +0000 |
1345 | @@ -0,0 +1,7 @@ |
1346 | +border.left: 11 |
1347 | +border.top: 10 |
1348 | +border.bottom: 10 |
1349 | +border.right: 11 |
1350 | +source: search_background.png |
1351 | +horizontalTileRule: Repeat |
1352 | +verticalTileRule: Repeat |
1353 | |
1354 | === modified file 'places/artwork/search_icon.png' |
1355 | Binary files places/artwork/search_icon.png 2010-11-28 03:03:12 +0000 and places/artwork/search_icon.png 2011-02-22 03:27:59 +0000 differ |
1356 | === removed file 'places/artwork/separator.png' |
1357 | Binary files places/artwork/separator.png 2010-10-15 03:25:21 +0000 and places/artwork/separator.png 1970-01-01 00:00:00 +0000 differ |
1358 | === added file 'places/artwork/tick.png' |
1359 | Binary files places/artwork/tick.png 1970-01-01 00:00:00 +0000 and places/artwork/tick.png 2011-02-22 03:27:59 +0000 differ |
1360 | === added file 'places/artwork/tick_box.png' |
1361 | Binary files places/artwork/tick_box.png 1970-01-01 00:00:00 +0000 and places/artwork/tick_box.png 2011-02-22 03:27:59 +0000 differ |
1362 | === modified file 'places/dash.qml' |
1363 | --- places/dash.qml 2011-02-22 03:27:59 +0000 |
1364 | +++ places/dash.qml 2011-02-22 03:27:59 +0000 |
1365 | @@ -28,7 +28,7 @@ |
1366 | It could be due to Qt bug QTBUG-13380: |
1367 | "Listview gets focus when it becomes visible" |
1368 | */ |
1369 | - search_bar.focus = true |
1370 | + search_entry.focus = true |
1371 | } |
1372 | |
1373 | function activatePlaceEntry(fileName, groupName, section) { |
1374 | @@ -85,18 +85,38 @@ |
1375 | /* Unhandled keys will always be forwarded to the search bar. That way |
1376 | the user can type and search from anywhere in the interface without |
1377 | necessarily focusing the search bar first. */ |
1378 | - Keys.forwardTo: [search_bar] |
1379 | - |
1380 | - SearchBar { |
1381 | - id: search_bar |
1382 | + Keys.forwardTo: [search_entry] |
1383 | + |
1384 | + |
1385 | + SearchEntry { |
1386 | + id: search_entry |
1387 | |
1388 | focus: true |
1389 | |
1390 | anchors.top: parent.top |
1391 | + anchors.topMargin: 10 |
1392 | anchors.left: parent.left |
1393 | - anchors.leftMargin: 3 |
1394 | - width: 616 |
1395 | - height: 47 |
1396 | + anchors.leftMargin: 16 |
1397 | + anchors.right: refine_search.left |
1398 | + anchors.rightMargin: 10 |
1399 | + |
1400 | + height: 53 |
1401 | + } |
1402 | + |
1403 | + SearchRefine { |
1404 | + id: refine_search |
1405 | + |
1406 | + /* SearchRefine is only to be displayed for places, not in the home page */ |
1407 | + visible: dashView.activePlaceEntry != "" |
1408 | + placeEntryModel: visible && currentPage != undefined ? currentPage.model : undefined |
1409 | + |
1410 | + anchors.top: search_entry.anchors.top |
1411 | + anchors.topMargin: search_entry.anchors.topMargin |
1412 | + height: parent.height |
1413 | + headerHeight: search_entry.height |
1414 | + width: 295 |
1415 | + anchors.right: parent.right |
1416 | + anchors.rightMargin: 19 |
1417 | } |
1418 | |
1419 | Button { |
1420 | @@ -122,14 +142,14 @@ |
1421 | Loader { |
1422 | id: pageLoader |
1423 | |
1424 | - anchors.top: search_bar.bottom |
1425 | - anchors.topMargin: 12 |
1426 | + anchors.top: search_entry.bottom |
1427 | + anchors.topMargin: 2 |
1428 | anchors.bottom: parent.bottom |
1429 | anchors.bottomMargin: 12 |
1430 | anchors.left: parent.left |
1431 | - anchors.leftMargin: 7 |
1432 | - anchors.right: parent.right |
1433 | - anchors.rightMargin: 8 |
1434 | + anchors.leftMargin: 20 |
1435 | + anchors.right: refine_search.folded ? parent.right : refine_search.left |
1436 | + anchors.rightMargin: refine_search.folded ? 0 : 15 |
1437 | } |
1438 | } |
1439 | } |
This merge request leaves the dash with several issues that will need to be dealt with later on: /bugs.launchpad .net/unity- 2d/+bug/ 708479
- background color is wrong (should be black with 69% alpha)
- border color around home items is wrong (should be black with 59% alpha)
- background color behind home items is wrong (should be black with 73% alpha)
- home page's open/close shortcuts buttons: hover and pressed states are wrong
- button for switching to fullscreen mode: hover and pressed states are wrong
- Dash view should use "Preferred Applications" icons where appropriate https:/