Merge lp:~unity-team/unity8/new-scopes into lp:unity8

Proposed by Michał Sawicz
Status: Rejected
Rejected by: Michał Sawicz
Proposed branch: lp:~unity-team/unity8/new-scopes
Merge into: lp:unity8
Diff against target: 2757 lines (+912/-577)
53 files modified
data/unity8.conf (+5/-0)
debian/control (+4/-1)
debian/unity8.install (+1/-0)
plugins/DashViews/listviewwithpageheader.cpp (+7/-0)
po/ug.po (+2/-1)
qml/Components/ApplicationManagerWrapper.qml (+8/-0)
qml/Components/ApplicationScreenshot.qml (+1/-2)
qml/Components/ListItems/Header.qml (+2/-14)
qml/Components/PageHeader.qml (+26/-2)
qml/Components/ResponsiveGridView.qml (+0/-1)
qml/Components/SeeMore.qml (+4/-2)
qml/Components/Showable.qml (+8/-0)
qml/Components/Stage.qml (+13/-8)
qml/Dash/Apps/RunningApplicationTile.qml (+2/-3)
qml/Dash/Card.qml (+18/-2)
qml/Dash/CardCarousel.qml (+78/-0)
qml/Dash/CardFilterGrid.qml (+59/-0)
qml/Dash/CardHeader.qml (+36/-19)
qml/Dash/CardTool.qml (+7/-2)
qml/Dash/Dash.qml (+49/-4)
qml/Dash/DashApps.qml (+4/-19)
qml/Dash/DashContent.qml (+48/-32)
qml/Dash/DashContentOpenEffect.qml (+0/-57)
qml/Dash/DashContentTabBarStyle.qml (+3/-0)
qml/Dash/DashFilterGrid.qml (+4/-2)
qml/Dash/DashPreviewPlaceholder.qml (+1/-1)
qml/Dash/DashRenderer.qml (+6/-0)
qml/Dash/GenericScopeView.qml (+64/-114)
qml/Dash/PreviewListView.qml (+59/-138)
qml/Dash/Previews/Preview.qml (+20/-15)
qml/Dash/Previews/PreviewActions.qml (+1/-1)
qml/Dash/Previews/PreviewAudioPlayback.qml (+3/-3)
qml/Dash/Previews/PreviewHeader.qml (+3/-1)
qml/Dash/Previews/PreviewImageGallery.qml (+10/-0)
qml/Dash/Previews/PreviewTextSummary.qml (+6/-3)
qml/Dash/Previews/PreviewWidgetFactory.qml (+1/-1)
qml/Dash/ScopeDelegateMapper.qml (+1/-1)
qml/Dash/ScopeItem.qml (+94/-0)
qml/Dash/SearchableResultModel.qml (+1/-1)
qml/Launcher/Launcher.qml (+0/-1)
qml/Launcher/LauncherPanel.qml (+0/-1)
qml/Panel/MenuContent.qml (+1/-0)
qml/ScopeTool.qml (+9/-1)
qml/Shell.qml (+156/-108)
qml/ShellOrientator.qml (+43/-0)
src/main.cpp (+11/-1)
tests/mocks/Unity/fake_unity_plugin.cpp (+8/-1)
tests/plugins/DashViews/organicgridtest.cpp (+2/-1)
tests/plugins/DashViews/verticaljournaltest.cpp (+2/-1)
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp (+8/-0)
tests/qmltests/Dash/Previews/tst_Preview.qml (+1/-1)
tests/qmltests/Dash/tst_GenericScopeView.qml (+11/-11)
tools/registry-tracker.cpp (+1/-0)
To merge this branch: bzr merge lp:~unity-team/unity8/new-scopes
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+198359@code.launchpad.net
To post a comment you must log in.
lp:~unity-team/unity8/new-scopes updated
563. By Michal Hruby

Merged trunk

564. By Michał Sawicz

merge trunk

565. By Michal Hruby

Merge trunk

566. By Michał Sawicz

Merge trunk.

567. By Michal Hruby

Merged trunk

568. By Michal Hruby

Bump module import version in scope tool

569. By Michał Sawicz

Get layout from category template.

570. By Michał Sawicz

Get components from the scope.

571. By Michał Sawicz

Initial Carousel integration.

572. By Michał Sawicz

Fix indentation, add name to the Card test suite.

573. By Michał Sawicz

Add copyright headers.

574. By Michał Sawicz

Merge trunk

575. By Michał Sawicz

Add name to tst_CardHeader.qml.

576. By Michał Karnicki

Horizontal Card layout.

577. By Michał Sawicz

Merge trunk.

578. By Michał Sawicz

Merge trunk.

579. By Michał Sawicz

Merge trunk.

580. By Michal Hruby

Update Unity plugin version req in PreviewListView.qml

581. By Michał Sawicz

Merge trunk.

582. By Michal Hruby

Merged trunk

583. By Michał Sawicz

Merge trunk.

584. By Michał Karnicki

Minimum number of items in the carousel is 5.

585. By Michał Sawicz

Merge trunk.

586. By Michal Hruby

Enable taps, pass correct params to preview and activate

587. By Michał Sawicz

Merge trunk.

588. By Michał Sawicz

Merge trunk.

589. By Michał Sawicz

Use CardTool in CardFilterGrid and CardCarousel.

590. By Michał Sawicz

Disable Card in CardCarousel to not eat any input.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:589
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~unity-team/unity8/new-scopes/+merge/198359/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity8-ci/2228/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/2889
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2633/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1099
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/750
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/752
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/752/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/750
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2535
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/2891
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/2891/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2634
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2634/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5059/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3615

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2228/rebuild

review: Needs Fixing (continuous-integration)
lp:~unity-team/unity8/new-scopes updated
591. By Michał Sawicz

lp:~saviq/unity8/fix-indicator-tests

592. By Michał Sawicz

lp:~saviq/unity8/card-tool

593. By Michał Sawicz

lp:~mterry/unity8/demo-users

594. By Michał Sawicz

lp:~unity-team/unity8/unity8.previews_audioPlayer

595. By Michał Sawicz

lp:~unity-team/unity8/unity8.previews_textSummary

596. By Michał Sawicz

lp:~aacid/unity8/image_gallery_preview_widget

597. By Michał Sawicz

lp:~ted/unity8/on-the-screen

598. By Michał Sawicz

lp:~unity-team/unity8/action_preview_widget

599. By Michał Sawicz

lp:~saviq/unity8/new-preview

600. By Michał Sawicz

lp:~unity-team/unity8/unity8-card-overlay

601. By Michał Sawicz

lp:~unity-team/unity8/header-alignment

602. By Michał Sawicz

lp:~unity-team/unity8/new-scopes-title-alignment

603. By Michał Sawicz

lp:~unity-team/unity8/newscopes-card-overlay

604. By Michał Sawicz

lp:~unity-team/unity8/newscopes-preview

605. By Albert Astals Cid

lp:~aacid/unity8/no_readonly_headerheight

606. By Albert Astals Cid

Merge lp:~unity-team/unity8/unity8-card-overlay again

607. By Michal Hruby

Display only top-level scopes when running on the device

608. By Michal Hruby

Pipe through stdout and stderr of the scopes

609. By Michał Karnicki

Merge newscopes-new-dash-look.

610. By Michal Hruby

Merge lp:~unity-team/unity8/unity8.preview_image

611. By Michal Hruby

Merge trunk

612. By Albert Astals Cid

Merge lp:~aacid/unity8/new-scopes-preview-fixes

613. By Michal Hruby

Merge trunk

614. By Michal Hruby

Re-merge lp:~unity-team/unity8/unity8.preview_image

615. By Michal Hruby

Merge lp:~aacid/unity8/apps-special-category

616. By Michal Hruby

Merge lp:~aacid/unity8/preview_header

617. By Michal Hruby

Merge lp:~unity-team/unity8/unity8.preview_video

618. By Michal Hruby

Re-merge lp:~unity-team/unity8/unity8.preview_video

619. By kevin gunn

merge in lp:~gerboland/unity8/sidestage-unlock-sidestage-appears

620. By kevin gunn

merge in lp:~gerboland/unity8/sidestage-unlock-sidestage-appears

621. By kevin gunn

merge in lp:~gerboland/unity8/sidestage-handle-input-area

622. By kevin gunn

whitespace update

623. By kevin gunn

update from trunk

624. By Albert Astals Cid

Merge lp:unity8

625. By Albert Astals Cid

Merge lp:~aacid/unity8/preview_progress

626. By Albert Astals Cid

Merge lp:~unity-team/unity8/new-scopes-fix-header-font

627. By Albert Astals Cid

Merge lp:~aacid/unity8/new-scopes-carousel-as-grid

628. By Albert Astals Cid

Merge lp:~aacid/unity8/fix-new-scopes-tab-name-missing

629. By Michal Hruby

Use PreviewStack and per-column widget models

630. By Albert Astals Cid

Merge lp:~aacid/unity8/new-scopes-header-fix

631. By Albert Astals Cid

Merge lp:~aacid/unity8/lvwph_resize_item_bug

632. By Albert Astals Cid

Merge lp:~aacid/unity8/new-scopes-preview-sometimes-disappears

633. By Michal Hruby

Remove blending rectangle, so previews aren't grey

634. By Michal Hruby

Merge lp:~unity-team/unity8/unity8-preview-summary-color

635. By Michal Hruby

Don't override scope list if already specified

636. By Michal Hruby

Fix the condition

637. By kevin gunn

merge in lp:~unity-team/unity8/rotate-n7 which is not to productized

638. By Michal Hruby

Merge lp:~aacid/unity8/misc_previewlist_fixes

639. By Michal Hruby

Re-merge lp:~unity-team/unity8/unity8-preview-summary-color

640. By Albert Astals Cid

Remerge lp:~unity-team/unity8/rotate-n7

641. By Albert Astals Cid

Merge lp:~aacid/unity8/new-scopes-dash-background-opacity

642. By Albert Astals Cid

Merge lp:~aacid/unity8/show_video_playback_screenshot_loading_indicator

643. By Michał Sawicz

Tweak recommended scopes.

644. By Albert Astals Cid

Merge lp:~unity-team/unity8/unity8-mascot-res-workaround

645. By Michał Sawicz

Make Click scope the default.

646. By Scott Sweeny

temporary fix for 'See more' and 'See less' text color in previews

647. By Michał Sawicz

Merge trunk.

648. By Michał Sawicz

Merge lp:~saviq/unity8/card-background

649. By Michał Sawicz

Fix running apps font.

650. By Michał Sawicz

Merge lp:~unity-team/unity8/new-scopes-scope-activation

651. By Michał Sawicz

Depend instead of Recommend the scopes, to make the image build work.

652. By Albert Astals Cid

Add back the workaround for not being able scroll the image gallery

Taken from AppPreview.qml

653. By Michał Karnicki

Update category label font color.

654. By Albert Astals Cid

Back button improvements

Move the back button to the header itself so it will be shown when the search is out too.
Make the back "button" bigger than the image

655. By Michał Karnicki

Change 'Running Apps' to 'Recent'.

656. By Michał Sawicz

Fix header colours and chevrons.

657. By Michał Sawicz

Directly activate scopes, too.

658. By Albert Astals Cid

Hotfix Dash header positioning

Make sure that after calling positionAtBeginning (what we do when swiping from an app back to the dash) the header is correctly in place
Also make sure the pageHeader position is not controlled by non curret scopes

659. By Michał Sawicz

Implement collapsed-rows support.

660. By Michał Sawicz

Clip dash when temporary visible.

661. By Michał Sawicz

Cache images in cards.

662. By Michał Sawicz

Resync.

663. By Michał Sawicz

Make sure SEARCH goes away when in previews.

664. By Michał Sawicz

Add preview columns support, fix spacing, clipping and cacheBuffer in previews.

665. By Albert Astals Cid

MouseArea -> AbstractButton to get haptics

666. By Jussi Pakkanen

Move downloads to their own threads so they don't muck about with the parent thread's event loop.

667. By Michał Sawicz

Merge trunk

668. By Michał Sawicz

Merge lp:~unity-team/unity8/themeing-font-and-mascot.

669. By Daniel d'Andrada

When focus is requested by the app manager, only call the correct stage.

Instead of activating both stages and letting the correct one work it out.

670. By Gerry Boland

[sidestage] hide side stage if all side stage apps are closed

671. By Michał Sawicz

Fix default background.

672. By Gerry Boland

[tablet] enable launcher in greeter when allowed

673. By Michał Sawicz

Add preview activity indicator and fix subsequent preview input.

674. By Michael Terry

Merge lp:~mterry/unity8/ensure-selected-greeter.

Ensure that the selected() signal is emitted by the greeter on startup, fixing the background on startup for the first user in tablet mode.

675. By Michał Sawicz

Make sure activity indicator is only on screen when preview available, and make image widget fit on screen.

676. By Michał Sawicz

Improve visuals and close preview on home button press.

677. By Michał Karnicki

Fix CardHeader title font weight.

678. By Michał Sawicz

Merge lp:~aacid/unity8/new-scopes-show-dash-app-running

679. By Gerry Boland

Prevent sidestage from popping out incorrectly when app launched indirectly

680. By Michał Sawicz

Update category chevrons.

681. By Michał Sawicz

Fix PageHeader centering.

682. By Albert Astals Cid

Merge lp:~aacid/unity8/new-scopes-dash-preview-fullscreen.

683. By Michał Sawicz

Merge lp:~mhr3/unity8/design-tweaks .

684. By Michał Karnicki

Add top/bottom gradients.

685. By Michał Sawicz

Merge trunk.

686. By Michał Karnicki

Don't show gradient in last category.

687. By Michał Sawicz

Revert r695, 'cause LazyImage gets confused with some images.

688. By Michał Sawicz

Fix whitespace.

689. By Michał Sawicz

Fix broken mereg.

690. By Michael Zanetti

Keep aspect ratio of app screenshots and crop them square.

691. By Michał Sawicz

Fix activity indicator.

692. By Michał Sawicz

Revert r690, 'cause it's racy.

693. By Michał Sawicz

Fix edge demos.

694. By Michał Sawicz

Merge fix in lp:~unity-team/unity8/unity8-category-gradients.

695. By Michał Sawicz

Add gradient to RunningApplicationsGrid, too, as it's not a DashRenderer...

696. By Michał Sawicz

Spurious logs...

697. By Michal Hruby

Merge trunk

698. By Michal Hruby

Fix missing line

699. By Michał Sawicz

Merge trunk.

700. By Michał Sawicz

Bring gradients back into DashRenderer, where they belong.

701. By Michał Sawicz

Merge lp:~aacid/unity8/new-scopes_do_not_request_previews_on_activate

702. By Albert Astals Cid

Merge lp:unity8

703. By Albert Astals Cid

Merge lp:~aacid/unity8/vjog_compiz_workaround

Revision history for this message
Michał Sawicz (saviq) wrote :

This is cleaned up to merge into trunk in: lp:~unity-team/unity8/new-scopes-clean-to-trunk

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/unity8.conf'
2--- data/unity8.conf 2014-02-27 21:56:42 +0000
3+++ data/unity8.conf 2014-03-07 12:41:18 +0000
4@@ -29,6 +29,11 @@
5 gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}"
6 fi
7
8+ if [ -z "$UNITY_SCOPES_LIST" ]; then
9+ # FIXME: remove once we have this in dconf
10+ initctl set-env UNITY_SCOPES_LIST="scopes;clickscope;musicaggregator;videoaggregator"
11+ fi
12+
13 # Remove the socket if still there
14 if [ -S "$MIR_SERVER_FILE" ]; then
15 rm "$MIR_SERVER_FILE"
16
17=== modified file 'debian/control'
18--- debian/control 2014-02-25 01:07:08 +0000
19+++ debian/control 2014-03-07 12:41:18 +0000
20@@ -96,7 +96,10 @@
21 libcap2-bin,
22 ${misc:Depends},
23 ${shlibs:Depends},
24-Recommends: ${unity-default-masterscopes},
25+ unity-scope-scopes,
26+ unity-scope-onlinemusic,
27+ unity-scope-mediascanner2,
28+ unity-scope-click,
29 Breaks: indicator-network (<< 0.5.1)
30 Replaces: ubuntu-touch-session (<< 0.82~)
31 Description: Unity 8 shell
32
33=== modified file 'debian/unity8.install'
34--- debian/unity8.install 2013-11-29 08:32:05 +0000
35+++ debian/unity8.install 2014-03-07 12:41:18 +0000
36@@ -10,6 +10,7 @@
37 usr/share/unity8/Notifications
38 usr/share/unity8/Panel
39 usr/share/unity8/Shell.qml
40+usr/share/unity8/ShellOrientator.qml
41 usr/share/unity8/SideStage
42 usr/share/unity8/graphics
43 data/unity8.conf usr/share/upstart/sessions/
44
45=== modified file 'plugins/DashViews/listviewwithpageheader.cpp'
46--- plugins/DashViews/listviewwithpageheader.cpp 2014-02-13 10:29:10 +0000
47+++ plugins/DashViews/listviewwithpageheader.cpp 2014-03-07 12:41:18 +0000
48@@ -366,6 +366,13 @@
49 m_previousContentY = m_visibleItems.first()->y() - headerHeight;
50 }
51 setContentY(m_visibleItems.first()->y() + m_clipItem->y() - headerHeight);
52+ if (m_headerItem) {
53+ // TODO This should not be needed and the code that adjust the m_headerItem position
54+ // in viewportMoved() should be enough but in some cases we have not found a way to reproduce
55+ // yet the code of viewportMoved() fails so here we make sure that at least if we are calling
56+ // positionAtBeginning the header item will be correctly positioned
57+ m_headerItem->setY(-m_minYExtent);
58+ }
59 }
60
61 void ListViewWithPageHeader::showHeader()
62
63=== modified file 'po/ug.po'
64--- po/ug.po 2014-02-19 05:44:29 +0000
65+++ po/ug.po 2014-03-07 12:41:18 +0000
66@@ -6,11 +6,12 @@
67 msgid ""
68 msgstr ""
69 "Project-Id-Version: unity\n"
70-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
71+"Report-Msgid-Bugs-To: \n"
72 "POT-Creation-Date: 2014-02-13 18:37+0000\n"
73 "PO-Revision-Date: 2014-02-15 12:09+0000\n"
74 "Last-Translator: Gheyret T.Kenji <Unknown>\n"
75 "Language-Team: Uyghur <ug@li.org>\n"
76+"Language: \n"
77 "MIME-Version: 1.0\n"
78 "Content-Type: text/plain; charset=UTF-8\n"
79 "Content-Transfer-Encoding: 8bit\n"
80
81=== modified file 'qml/Components/ApplicationManagerWrapper.qml'
82--- qml/Components/ApplicationManagerWrapper.qml 2013-10-11 11:43:11 +0000
83+++ qml/Components/ApplicationManagerWrapper.qml 2014-03-07 12:41:18 +0000
84@@ -166,4 +166,12 @@
85 }
86 return desktopFile.substring(left+1, right);
87 }
88+
89+ function setMainStageAppRect(item) {
90+ ApplicationManager.setMainStageAppRect(item);
91+ }
92+
93+ function setSideStageAppRect(item) {
94+ ApplicationManager.setSideStageAppRect(item);
95+ }
96 }
97
98=== modified file 'qml/Components/ApplicationScreenshot.qml'
99--- qml/Components/ApplicationScreenshot.qml 2013-09-04 23:50:13 +0000
100+++ qml/Components/ApplicationScreenshot.qml 2014-03-07 12:41:18 +0000
101@@ -53,8 +53,7 @@
102 ApplicationImage {
103 id: applicationImage
104 objectName: "screenshot image"
105- width: applicationScreenshot.application ? parent.width : 0
106- height: applicationScreenshot.application ? parent.height : 0
107+ anchors.fill: parent
108 visible: applicationScreenshot.application != null && ready
109 source: ApplicationManager.findApplication((application) ? application.appId : "")
110 }
111
112=== modified file 'qml/Components/ListItems/Header.qml'
113--- qml/Components/ListItems/Header.qml 2013-10-11 11:43:45 +0000
114+++ qml/Components/ListItems/Header.qml 2014-03-07 12:41:18 +0000
115@@ -36,7 +36,7 @@
116 right: parent.right
117 rightMargin: units.gu(0.5)
118 top: parent.top
119- bottom: bottomBorder.top
120+ bottom: parent.bottom
121 }
122
123 Label {
124@@ -47,14 +47,11 @@
125 verticalCenter: parent.verticalCenter
126 }
127
128- color: Theme.palette.selected.backgroundText //at 60%
129- opacity: 0.6
130+ color: "grey" // TODO karni: Update Ubuntu.Compoonents.Themes.Palette.
131 font.family: "Ubuntu"
132 fontSize: "medium"
133 elide: Text.ElideRight
134 textFormat: Text.PlainText
135- style: Text.Raised
136- styleColor: "black"
137 width: parent.width - image.width - image.leftMargin - anchors.leftMargin
138 }
139
140@@ -68,15 +65,6 @@
141 }
142 }
143
144- ThinDivider {
145- id: bottomBorder
146- anchors {
147- left: parent.left
148- right: parent.right
149- bottom: parent.bottom
150- }
151- }
152-
153 MouseArea {
154 anchors.fill: parent
155 onClicked: parent.clicked(mouse)
156
157=== modified file 'qml/Components/PageHeader.qml'
158--- qml/Components/PageHeader.qml 2014-01-27 18:12:05 +0000
159+++ qml/Components/PageHeader.qml 2014-03-07 12:41:18 +0000
160@@ -18,7 +18,7 @@
161 import Ubuntu.Components 0.1
162 import Ubuntu.Components.Popups 0.1
163 import Ubuntu.Components.ListItems 0.1 as ListItem
164-import Unity 0.1
165+import Unity 0.2
166
167 Item {
168 id: root
169@@ -27,6 +27,9 @@
170 property ListModel searchHistory
171 property Scope scope
172 property alias childItem: itemContainer.children
173+ property alias showBackButton: backButton.visible
174+
175+ signal backClicked
176
177 height: units.gu(8.5)
178 implicitHeight: units.gu(8.5)
179@@ -69,11 +72,32 @@
180
181 Behavior on contentY { NumberAnimation { duration: 200; easing.type: Easing.OutQuad } }
182
183+ AbstractButton {
184+ id: backButton
185+ visible: false
186+ height: header.height
187+ y: header.contentY
188+ anchors {
189+ left: parent.left
190+ leftMargin: visible ? units.gu(2) : 0
191+ }
192+ width: visible ? image.width + units.gu(2) : 0
193+ onClicked: root.backClicked();
194+ Image {
195+ id: image
196+ anchors.centerIn: parent
197+ source: "graphics/headerback.png"
198+ }
199+ }
200+
201 // FIXME this could potentially be simplified to avoid all the containers
202 Item {
203 id: headerContainer
204
205- width: parent.width
206+ anchors {
207+ left: backButton.right
208+ right: parent.right
209+ }
210 height: childrenRect.height
211
212 Item {
213
214=== modified file 'qml/Components/ResponsiveGridView.qml'
215--- qml/Components/ResponsiveGridView.qml 2014-01-27 18:03:45 +0000
216+++ qml/Components/ResponsiveGridView.qml 2014-03-07 12:41:18 +0000
217@@ -56,7 +56,6 @@
218 fill: parent
219 leftMargin: margin/2
220 rightMargin: margin/2
221- topMargin: verticalSpacing
222 }
223 clip: parent.height != totalContentHeight
224
225
226=== modified file 'qml/Components/SeeMore.qml'
227--- qml/Components/SeeMore.qml 2014-02-05 17:35:52 +0000
228+++ qml/Components/SeeMore.qml 2014-03-07 12:41:18 +0000
229@@ -34,7 +34,8 @@
230 objectName: "seeMoreLabel"
231 text: i18n.tr("See more")
232 opacity: !more ? 0.8 : 0.4
233- color: Theme.palette.selected.backgroundText
234+ // TODO: Fix requiring Palette update
235+ color: "grey" //Theme.palette.selected.backgroundText
236 font.weight: Font.Bold
237
238 MouseArea {
239@@ -56,7 +57,8 @@
240 objectName: "seeLessLabel"
241 text: i18n.tr("See less")
242 opacity: more ? 0.8 : 0.4
243- color: Theme.palette.selected.backgroundText
244+ // TODO: Fix requiring Palette update
245+ color: "grey" //Theme.palette.selected.backgroundText
246 font.weight: Font.Bold
247
248 MouseArea {
249
250=== modified file 'qml/Components/Showable.qml'
251--- qml/Components/Showable.qml 2013-10-01 18:18:52 +0000
252+++ qml/Components/Showable.qml 2014-03-07 12:41:18 +0000
253@@ -107,6 +107,9 @@
254 if (!hideAnimation.running) {
255 hideAnimation.restart()
256 }
257+ if (__skipShowAnimation) {
258+ hideAnimation.complete();
259+ }
260 } else {
261 visible = false
262 required = false
263@@ -115,6 +118,11 @@
264 shown = false
265 }
266
267+ function hideNow() {
268+ __skipShowAnimation = true;
269+ hide();
270+ }
271+
272 Connections {
273 target: hideAnimation ? hideAnimation: null
274 onRunningChanged: {
275
276=== modified file 'qml/Components/Stage.qml'
277--- qml/Components/Stage.qml 2013-10-22 15:56:37 +0000
278+++ qml/Components/Stage.qml 2014-03-07 12:41:18 +0000
279@@ -65,7 +65,9 @@
280
281 function activateApplication(desktopFile, addDelay) {
282 var application = applicationManager.getApplicationFromDesktopFile(desktopFile, stage.type);
283- if (application != null && application == stage.focusedApplication) {
284+ if (application == null) {
285+ return;
286+ } else if (application == stage.focusedApplication) {
287 stage.show();
288 return;
289 }
290@@ -84,11 +86,6 @@
291 }
292 }
293
294- Connections {
295- target: applicationManager
296- onFocusRequested: activateApplication(appId)
297- }
298-
299 /* Keep a reference to the focused application so that we can safely
300 unfocus it when the stage is not fully shown and refocus it when the stage
301 is fully shown again.
302@@ -142,6 +139,14 @@
303 }
304 }
305
306+ Timer {
307+ id: hideScreenshotsAfterBriefDelay
308+ // Since Mir & Qt have independent event loops, Mir often applies a focus request a frame later than when Qt
309+ // asks for it. To work around, delay removing the screenshots a touch so Mir has definitely shown the app.
310+ interval: 10
311+ onTriggered: stage.__hideScreenshots();
312+ }
313+
314 function __hideScreenshots() {
315 newApplicationScreenshot.clearApplication();
316 oldApplicationScreenshot.clearApplication();
317@@ -177,7 +182,7 @@
318 applicationManager.focusApplication(application);
319 }
320 if (!delayedHideScreenshots.running) {
321- stage.__hideScreenshots();
322+ hideScreenshotsAfterBriefDelay.start();
323 }
324 } else {
325 /* FIXME: calling ApplicationManager::focusApplication does not focus
326@@ -252,7 +257,7 @@
327 delayedHideScreenshots.start();
328 } else {
329 stage.focusedApplicationWhenUsingScreenshots = null;
330- stage.__hideScreenshots();
331+ hideScreenshotsAfterBriefDelay.start();
332 }
333 }
334 }
335
336=== added file 'qml/Components/graphics/headerback@27.png'
337Binary files qml/Components/graphics/headerback@27.png 1970-01-01 00:00:00 +0000 and qml/Components/graphics/headerback@27.png 2014-03-07 12:41:18 +0000 differ
338=== modified file 'qml/Dash/Apps/RunningApplicationTile.qml'
339--- qml/Dash/Apps/RunningApplicationTile.qml 2013-10-28 14:12:24 +0000
340+++ qml/Dash/Apps/RunningApplicationTile.qml 2014-03-07 12:41:18 +0000
341@@ -108,10 +108,9 @@
342 }
343 text: (application) ? application.name : ""
344
345- color: Theme.palette.selected.backgroundText
346+ // TODO karni (for each Label): Update Ubuntu.Components.Themes.Palette and use theme color instead
347+ color: "grey"
348 opacity: 0.9
349- style: Text.Raised
350- styleColor: "black"
351 fontSize: "small"
352 elide: Text.ElideMiddle
353 horizontalAlignment: Text.AlignHCenter
354
355=== modified file 'qml/Dash/Card.qml'
356--- qml/Dash/Card.qml 2014-02-28 10:45:19 +0000
357+++ qml/Dash/Card.qml 2014-03-07 12:41:18 +0000
358@@ -17,7 +17,7 @@
359 import QtQuick 2.0
360 import Ubuntu.Components 0.1
361
362-Item {
363+AbstractButton {
364 id: root
365 property var template
366 property var components
367@@ -25,7 +25,7 @@
368
369 property alias fontScale: header.fontScale
370 property alias headerAlignment: header.headerAlignment
371- readonly property alias headerHeight: header.height
372+ property alias headerHeight: header.height
373
374 property bool showHeader: true
375
376@@ -87,6 +87,7 @@
377 height: template && template["card-layout"] === "horizontal" ? header.height : width / artShape.aspect
378 objectName: "artImage"
379 source: cardData && cardData["art"] || ""
380+ cache: true
381 // FIXME uncomment when having investigated / fixed the crash
382 //sourceSize.width: width > height ? width : 0
383 //sourceSize.height: height > width ? height : 0
384@@ -163,6 +164,9 @@
385 titleWeight: components && components["subtitle"] ? Font.DemiBold : Font.Normal
386
387 opacity: showHeader ? 1 : 0
388+ inOverlay: root.template && root.template["overlay"] === true
389+ fontColor: inOverlay ? "white" : summary.color
390+ useMascotShape: !background.visible && !inOverlay
391
392 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
393 }
394@@ -183,5 +187,17 @@
395 text: cardData && cardData["summary"] || ""
396 height: text ? implicitHeight : 0
397 fontSize: "small"
398+ color: getFontColor(background.color)
399+
400+ function getLuminance(color) {
401+ return 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b;
402+ }
403+
404+ // TODO karni: Change "grey" to Ubuntu.Components.Palette color once updated.
405+ function getFontColor(backgroundColor) {
406+ if (backgroundColor === undefined) return "grey";
407+ var luminance = getLuminance(backgroundColor);
408+ return luminance < 0.7 ? "white" : "grey"
409+ }
410 }
411 }
412
413=== added file 'qml/Dash/CardCarousel.qml'
414--- qml/Dash/CardCarousel.qml 1970-01-01 00:00:00 +0000
415+++ qml/Dash/CardCarousel.qml 2014-03-07 12:41:18 +0000
416@@ -0,0 +1,78 @@
417+/*
418+ * Copyright (C) 2013 Canonical, Ltd.
419+ *
420+ * This program is free software; you can redistribute it and/or modify
421+ * it under the terms of the GNU General Public License as published by
422+ * the Free Software Foundation; version 3.
423+ *
424+ * This program is distributed in the hope that it will be useful,
425+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
426+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
427+ * GNU General Public License for more details.
428+ *
429+ * You should have received a copy of the GNU General Public License
430+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
431+ */
432+
433+import QtQuick 2.0
434+import Ubuntu.Components 0.1
435+import "../Components"
436+
437+
438+DashRenderer {
439+ id: cardCarousel
440+
441+ property alias cacheBuffer: carousel.cacheBuffer
442+ property alias itemComponent: carousel.itemComponent
443+ property alias minimumTileWidth: carousel.minimumTileWidth
444+ property alias selectedItemScaleFactor: carousel.selectedItemScaleFactor
445+ property alias tileAspectRatio: carousel.tileAspectRatio
446+
447+ currentItem: carousel.currentItem
448+ height: carousel.implicitHeight + units.gu(6)
449+ verticalSpacing: units.gu(3)
450+
451+ CardTool {
452+ id: cardTool
453+
454+ template: cardCarousel.template
455+ components: cardCarousel.components
456+ viewWidth: cardCarousel.width
457+ }
458+
459+ Carousel {
460+ id: carousel
461+ anchors.fill: parent
462+ tileAspectRatio: cardCarousel.components && cardCarousel.components["art"]["aspect-ratio"] || 1.0
463+ // FIXME we need to "reverse" the carousel to make the selected item the size
464+ // and push others back.
465+ minimumTileWidth: cardTool.cardWidth / selectedItemScaleFactor
466+ selectedItemScaleFactor: 1.38
467+ cacheBuffer: 1404 // 18px * 13gu * 6
468+ model: cardCarousel.model
469+ highlightIndex: cardCarousel.highlightIndex
470+
471+ onClicked: cardCarousel.clicked(index, itemY)
472+ onPressAndHold: cardCarousel.pressAndHold(index, itemY)
473+
474+ property real fontScale: 1 / selectedItemScaleFactor
475+ property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
476+
477+ itemComponent: Card {
478+ id: card
479+ objectName: "delegate" + index
480+ headerHeight: carousel.headerHeight
481+ cardData: model
482+ template: cardCarousel.template
483+ components: cardCarousel.components
484+
485+ property bool explicitlyScaled
486+ property var model
487+
488+ enabled: false
489+ showHeader: explicitlyScaled
490+
491+ fontScale: carousel.fontScale
492+ }
493+ }
494+}
495
496=== added file 'qml/Dash/CardFilterGrid.qml'
497--- qml/Dash/CardFilterGrid.qml 1970-01-01 00:00:00 +0000
498+++ qml/Dash/CardFilterGrid.qml 2014-03-07 12:41:18 +0000
499@@ -0,0 +1,59 @@
500+/*
501+ * Copyright (C) 2013 Canonical, Ltd.
502+ *
503+ * This program is free software; you can redistribute it and/or modify
504+ * it under the terms of the GNU General Public License as published by
505+ * the Free Software Foundation; version 3.
506+ *
507+ * This program is distributed in the hope that it will be useful,
508+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
509+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
510+ * GNU General Public License for more details.
511+ *
512+ * You should have received a copy of the GNU General Public License
513+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
514+ */
515+
516+import QtQuick 2.0
517+import Ubuntu.Components 0.1
518+
519+DashFilterGrid {
520+ id: genericFilterGrid
521+
522+ minimumHorizontalSpacing: units.gu(1)
523+ delegateWidth: cardTool.cardWidth
524+ delegateHeight: cardTool.cardHeight
525+ verticalSpacing: units.gu(1)
526+ collapsedRowCount: Math.min(2, template && template["collapsed-rows"] || 2)
527+
528+ CardTool {
529+ id: cardTool
530+
531+ template: genericFilterGrid.template
532+ // We can't trust the template since it may happen it is carousel
533+ // that is being should as a grid because of the lack of elements
534+ categoryLayout: "grid"
535+ components: genericFilterGrid.components
536+ }
537+
538+ delegate: Item {
539+ width: genericFilterGrid.cellWidth
540+ height: genericFilterGrid.cellHeight
541+ Card {
542+ id: card
543+ width: cardTool.cardWidth
544+ height: cardTool.cardHeight
545+ headerHeight: cardTool.headerHeight
546+ anchors.horizontalCenter: parent.horizontalCenter
547+ objectName: "delegate" + index
548+ cardData: model
549+ template: genericFilterGrid.template
550+ components: genericFilterGrid.components
551+
552+ headerAlignment: cardTool.headerAlignment
553+
554+ onClicked: genericFilterGrid.clicked(index, card.y)
555+ onPressAndHold: genericFilterGrid.pressAndHold(index, card.y)
556+ }
557+ }
558+}
559
560=== modified file 'qml/Dash/CardHeader.qml'
561--- qml/Dash/CardHeader.qml 2014-02-21 10:50:36 +0000
562+++ qml/Dash/CardHeader.qml 2014-03-07 12:41:18 +0000
563@@ -27,12 +27,17 @@
564 property alias altPrice: altPriceLabel.text
565
566 property alias titleWeight: titleLabel.font.weight
567+ property alias titleSize: titleLabel.fontSize
568
569 // FIXME: Saviq, used to scale fonts down in Carousel
570 property real fontScale: 1.0
571
572 property alias headerAlignment: titleLabel.horizontalAlignment
573
574+ property bool inOverlay: false
575+ property bool useMascotShape: true
576+ property color fontColor: "grey"
577+
578 visible: mascotImage.status === Image.Ready || title || price
579 height: row.height > 0 ? row.height + row.margins * 2 : 0
580
581@@ -42,13 +47,13 @@
582
583 property real margins: units.gu(1)
584
585+ spacing: mascotShape.visible || mascotImage.visible || inOverlay ? margins : 0
586 anchors {
587 top: parent.top; left: parent.left; right: parent.right
588 margins: margins
589 leftMargin: spacing
590 rightMargin: spacing
591 }
592- spacing: mascotShape.visible || (template && template["overlay"]) ? margins : 0
593
594 UbuntuShape {
595 id: mascotShape
596@@ -57,35 +62,44 @@
597 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
598 width: units.gu(6)
599 height: units.gu(5.625)
600- visible: image.status === Image.Ready
601- readonly property int maxSize: Math.max(width, height)
602-
603- image: Image {
604- id: mascotImage
605-
606- sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
607- fillMode: Image.PreserveAspectCrop
608- horizontalAlignment: Image.AlignHCenter
609- verticalAlignment: Image.AlignVCenter
610- }
611+ anchors.verticalCenter: parent.verticalCenter
612+ visible: useMascotShape && image && image.status === Image.Ready
613+ readonly property int maxSize: Math.max(width, height) * 4
614+
615+ image: useMascotShape ? mascotImage : null
616+ }
617+
618+ Image {
619+ id: mascotImage
620+
621+ width: source ? mascotShape.width : 0
622+ height: mascotShape.height
623+ anchors.verticalCenter: parent.verticalCenter
624+ visible: !useMascotShape && status === Image.Ready
625+
626+ sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
627+ fillMode: Image.PreserveAspectCrop
628+ horizontalAlignment: Image.AlignHCenter
629+ verticalAlignment: Image.AlignVCenter
630 }
631
632 Column {
633 objectName: "column"
634 width: parent.width - x
635- spacing: units.gu(0.5)
636+ spacing: units.gu(0.25)
637+ anchors.verticalCenter: parent.verticalCenter
638
639 Label {
640 id: titleLabel
641 objectName: "titleLabel"
642 anchors { left: parent.left; right: parent.right }
643 elide: Text.ElideRight
644- font.weight: Font.DemiBold
645+ font.weight: Font.Normal
646+ fontSize: "small"
647 wrapMode: Text.Wrap
648 maximumLineCount: 2
649- fontSize: "small"
650 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
651- color: template["overlay"] === true ? "white" : Theme.palette.selected.backgroundText
652+ color: fontColor
653 }
654
655 Label {
656@@ -93,11 +107,11 @@
657 objectName: "subtitleLabel"
658 anchors { left: parent.left; right: parent.right }
659 elide: Text.ElideRight
660+ fontSize: "small"
661 font.weight: Font.Light
662 visible: titleLabel.text && text
663- fontSize: "x-small"
664 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
665- color: template["overlay"] === true ? "white" : Theme.palette.selected.backgroundText
666+ color: fontColor
667 }
668
669 Row {
670@@ -118,7 +132,7 @@
671 width: parent.labelWidth
672 elide: Text.ElideRight
673 font.weight: Font.DemiBold
674- color: Theme.palette.selected.foreground
675+ color: "#ff990000"
676 visible: text
677 }
678
679@@ -128,6 +142,8 @@
680 width: parent.labelWidth
681 elide: Text.ElideRight
682 horizontalAlignment: parent.labels === 3 ? Text.AlignHCenter : Text.AlignRight
683+ font.strikeout: true
684+ color: "black"
685 visible: text
686 }
687
688@@ -136,6 +152,7 @@
689 width: parent.labelWidth
690 elide: Text.ElideRight
691 horizontalAlignment: Text.AlignRight
692+ color: fontColor
693 visible: text
694 }
695 }
696
697=== modified file 'qml/Dash/CardTool.qml'
698--- qml/Dash/CardTool.qml 2014-02-07 14:45:19 +0000
699+++ qml/Dash/CardTool.qml 2014-03-07 12:41:18 +0000
700@@ -43,6 +43,11 @@
701 */
702 property var viewWidth
703
704+ /*!
705+ \brief The category layout for this card tool
706+ */
707+ property string categoryLayout: template ? template["category-layout"] : ""
708+
709 // FIXME: Saviq
710 // Only way for the card below to actually be laid out completely.
711 // If invisible or in "data" array, some components are not taken into account.
712@@ -56,7 +61,7 @@
713 If undefined, should use implicit width of the actual card.
714 */
715 readonly property var cardWidth: {
716- switch (template !== undefined && template["category-layout"]) {
717+ switch (categoryLayout) {
718 case "grid":
719 case "vertical-journal":
720 if (template["card-layout"] === "horizontal") return units.gu(38);
721@@ -84,7 +89,7 @@
722 If undefined, should use implicit height of the actual card.
723 */
724 readonly property var cardHeight: {
725- switch (template !== undefined && template["category-layout"]) {
726+ switch (categoryLayout) {
727 case "journal":
728 if (template["card-size"] >= 12 && template["card-size"] <= 38) return units.gu(template["card-size"]);
729 return units.gu(18.5);
730
731=== modified file 'qml/Dash/Dash.qml'
732--- qml/Dash/Dash.qml 2014-02-18 11:54:25 +0000
733+++ qml/Dash/Dash.qml 2014-03-07 12:41:18 +0000
734@@ -1,5 +1,5 @@
735 /*
736- * Copyright (C) 2013 Canonical, Ltd.
737+ * Copyright (C) 2013, 2014 Canonical, Ltd.
738 *
739 * This program is free software; you can redistribute it and/or modify
740 * it under the terms of the GNU General Public License as published by
741@@ -16,7 +16,7 @@
742
743 import QtQuick 2.0
744 import Ubuntu.Components 0.1
745-import Unity 0.1
746+import Unity 0.2
747 import Utils 0.1
748 import "../Components"
749
750@@ -27,8 +27,9 @@
751 visible: shown
752
753 property ListModel searchHistory: SearchHistoryModel {}
754+ property bool searchable: !dashContent.previewOpen && !scopeItem.previewOpen
755
756- property string showScopeOnLoaded: "home.scope"
757+ property string showScopeOnLoaded: "clickscope"
758 property real contentScale: 1.0
759
760 function setCurrentScope(scopeId, animate, reset) {
761@@ -39,6 +40,8 @@
762 return
763 }
764
765+ dashContent.closePreview();
766+
767 if (scopeIndex == dashContent.currentIndex && !reset) {
768 // the scope is already the current one
769 return
770@@ -61,10 +64,19 @@
771 DashContent {
772 id: dashContent
773 objectName: "dashContent"
774- anchors.fill: parent
775+ width: parent.width
776+ height: parent.height
777 model: filteredScopes
778 scopes: scopes
779 searchHistory: dash.searchHistory
780+ visible: x != -width
781+ onGotoScope: {
782+ dash.setCurrentScope(scopeId, true, false);
783+ }
784+ onOpenScope: {
785+ scopeItem.scope = scope;
786+ x = -width;
787+ }
788 onScopeLoaded: {
789 if (scopeId == dash.showScopeOnLoaded) {
790 dash.setCurrentScope(scopeId, false, false)
791@@ -72,6 +84,39 @@
792 }
793 }
794 scale: dash.contentScale
795+ clip: scale != 1.0 || scopeItem.visible
796+ Behavior on x {
797+ UbuntuNumberAnimation {
798+ onRunningChanged: {
799+ if (!running && dashContent.x == 0) {
800+ dashContent.closeScope(scopeItem.scope);
801+ scopeItem.scope = null;
802+ }
803+ }
804+ }
805+ }
806+ }
807+
808+ ScopeItem {
809+ id: scopeItem
810+ anchors.left: dashContent.right
811+ width: parent.width
812+ height: parent.height
813+ searchHistory: dash.searchHistory
814+ scale: dash.contentScale
815 clip: scale != 1.0
816+ visible: scope != null
817+ onBack: {
818+ dashContent.x = 0;
819+ }
820+ onGotoScope: {
821+ // TODO
822+ console.log("gotoScope from an openScope scope is not implemented");
823+ }
824+ onOpenScope: {
825+ // TODO
826+ console.log("openScope from an openScope scope is not implemented");
827+ }
828+
829 }
830 }
831
832=== modified file 'qml/Dash/DashApps.qml'
833--- qml/Dash/DashApps.qml 2013-12-02 13:23:28 +0000
834+++ qml/Dash/DashApps.qml 2014-03-07 12:41:18 +0000
835@@ -29,28 +29,13 @@
836 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
837 property var sideStageApplicationModel: shell.applicationManager.sideStageApplications
838
839- ListModel {
840- id: dummyVisibilityModifier
841-
842- ListElement { name: "running-apps" }
843- }
844-
845- SortFilterProxyModel {
846- id: runningApplicationsModel
847-
848- property var firstModel: mainStageApplicationsModel
849- property var secondModel: sideStageApplicationModel
850- property bool canEnableTerminationMode: scopeView.isCurrent
851-
852- model: dummyVisibilityModifier
853- filterRole: 0
854- filterRegExp: invertMatch ? ((mainStageApplicationsModel.count === 0 &&
855- sideStageApplicationModel.count === 0) ? RegExp("running-apps") : RegExp("")) : RegExp("disabled")
856- invertMatch: scopeView.scope.searchQuery.length == 0
857+ QtObject {
858+ id: countObject
859+ property int count: scopeView.scope.searchQuery.length == 0 ? (mainStageApplicationsModel.count + sideStageApplicationModel.count) : 0
860 }
861
862 onScopeChanged: {
863- scopeView.scope.categories.overrideResults("recent", runningApplicationsModel);
864+ scopeView.scope.categories.addSpecialCategory("running.apps.category", "Recent", "", "{ \"template\": { \"category-layout\": \"running-apps\" } }", countObject);
865 enableHeightBehaviorOnNextCreation = (mainStageApplicationsModel.count + sideStageApplicationModel.count == 0)
866 }
867 }
868
869=== modified file 'qml/Dash/DashContent.qml'
870--- qml/Dash/DashContent.qml 2014-02-18 11:54:25 +0000
871+++ qml/Dash/DashContent.qml 2014-03-07 12:41:18 +0000
872@@ -1,5 +1,5 @@
873 /*
874- * Copyright (C) 2013 Canonical, Ltd.
875+ * Copyright (C) 2013, 2014 Canonical, Ltd.
876 *
877 * This program is free software; you can redistribute it and/or modify
878 * it under the terms of the GNU General Public License as published by
879@@ -16,7 +16,7 @@
880
881 import QtQuick 2.0
882 import Ubuntu.Components 0.1
883-import Unity 0.1
884+import Unity 0.2
885 import "../Components"
886
887 Item {
888@@ -25,6 +25,7 @@
889 property var model: null
890 property var scopes: null
891 property alias currentIndex: dashContentList.currentIndex
892+ property alias previewOpen: previewListView.open
893
894 property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
895 property ListModel searchHistory
896@@ -33,6 +34,8 @@
897 signal movementEnded()
898 signal scopeLoaded(string scopeId)
899 signal positionedAtBeginning()
900+ signal gotoScope(string scopeId)
901+ signal openScope(var scope)
902
903 // If we set the current scope index before the scopes have been added,
904 // then we need to wait until the loaded signals gets emitted from the scopes
905@@ -77,15 +80,27 @@
906 }
907 }
908
909+ function closeScope(scope) {
910+ dashContentList.currentItem.theScope.closeScope(scope)
911+ }
912+
913+ function closePreview() {
914+ previewListView.open = false;
915+ }
916+
917 Item {
918 id: dashContentListHolder
919- anchors.fill: parent
920+
921+ x: previewListView.open ? -width : 0
922+ Behavior on x { UbuntuNumberAnimation { } }
923+ width: parent.width
924+ height: parent.height
925
926 ListView {
927 id: dashContentList
928 objectName: "dashContentList"
929
930- interactive: dashContent.scopes.loaded && !previewListView.onScreen && !currentItem.moving
931+ interactive: dashContent.scopes.loaded && !previewListView.open && !currentItem.moving
932
933 anchors.fill: parent
934 model: dashContent.model
935@@ -100,6 +115,7 @@
936 cacheBuffer: 1073741823
937 onMovementStarted: dashContent.movementStarted()
938 onMovementEnded: dashContent.movementEnded()
939+ clip: parent.x != 0
940
941 // If the number of items is less than the current index, then need to reset to another item.
942 onCountChanged: {
943@@ -133,21 +149,30 @@
944 onLoaded: {
945 item.scope = Qt.binding(function() { return scope })
946 item.isCurrent = Qt.binding(function() { return visible && ListView.isCurrentItem })
947- item.tabBarHeight = pageHeader.implicitHeight;
948- item.pageHeader = pageHeader;
949- item.openEffect = openEffect;
950+ item.tabBarHeight = dashPageHeader.implicitHeight;
951+ item.pageHeader = dashPageHeader;
952 item.previewListView = previewListView;
953 dashContentList.movementStarted.connect(item.movementStarted)
954 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
955 dashContent.scopeLoaded(item.scope.id)
956 }
957+ Connections {
958+ target: isCurrent ? scope : null
959+ onGotoScope: {
960+ // Note here scopeId is the signal parameter and not the loader property
961+ dashContent.gotoScope(scopeId);
962+ }
963+ onOpenScope: {
964+ dashContent.openScope(scope);
965+ }
966+ }
967
968 Component.onDestruction: active = false
969 }
970 }
971
972 PageHeader {
973- id: pageHeader
974+ id: dashPageHeader
975 objectName: "pageHeader"
976 width: parent.width
977 searchEntryEnabled: true
978@@ -157,12 +182,16 @@
979 childItem: TabBar {
980 id: tabBar
981 objectName: "tabbar"
982- height: units.gu(7)
983+ height: units.gu(6.5)
984 width: parent.width
985 selectionMode: false
986 style: DashContentTabBarStyle {}
987
988- model: dashContentList.model
989+ // TODO This together with the __styleInstance onModelChanged below
990+ // are a workaround for the first tab sometimes not showing the text.
991+ // But Tabs are going away in the future so not sure if makes
992+ // sense invetigating what's the problem at this stage
993+ model: dashContentList.model.count > 0 ? dashContentList.model : null
994
995 onSelectedIndexChanged: {
996 dashContentList.currentIndex = selectedIndex;
997@@ -176,36 +205,23 @@
998 }
999
1000 Connections {
1001- target: model
1002- onCountChanged: {
1003- if (tabBar.selectedIndex < 0 && model.count > 0)
1004- tabBar.selectedIndex = 0;
1005+ target: __styleInstance
1006+ onModelChanged: {
1007+ tabBar.selectedIndex = -1;
1008+ tabBar.selectedIndex = 0;
1009 }
1010 }
1011-
1012- Component.onCompleted: {
1013- __styleInstance.headerTextStyle = Text.Raised
1014- __styleInstance.headerTextStyleColor = "black"
1015- }
1016 }
1017 }
1018 }
1019
1020- DashContentOpenEffect {
1021- id: openEffect
1022- anchors {
1023- fill: parent
1024- bottomMargin: -bottomOverflow
1025- }
1026- sourceItem: dashContentListHolder
1027- previewListView: previewListView
1028- }
1029-
1030 PreviewListView {
1031 id: previewListView
1032- openEffect: openEffect
1033- categoryView: dashContentList.currentItem ? dashContentList.currentItem.categoryView : null
1034+ visible: x != width
1035 scope: dashContentList.currentItem ? dashContentList.currentItem.theScope : null
1036- anchors.fill: parent
1037+ pageHeader: dashPageHeader
1038+ width: parent.width
1039+ height: parent.height
1040+ anchors.left: dashContentListHolder.right
1041 }
1042 }
1043
1044=== removed file 'qml/Dash/DashContentOpenEffect.qml'
1045--- qml/Dash/DashContentOpenEffect.qml 2013-11-05 16:06:09 +0000
1046+++ qml/Dash/DashContentOpenEffect.qml 1970-01-01 00:00:00 +0000
1047@@ -1,57 +0,0 @@
1048-/*
1049- * Copyright (C) 2013 Canonical, Ltd.
1050- *
1051- * This program is free software; you can redistribute it and/or modify
1052- * it under the terms of the GNU General Public License as published by
1053- * the Free Software Foundation; version 3.
1054- *
1055- * This program is distributed in the hope that it will be useful,
1056- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1057- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1058- * GNU General Public License for more details.
1059- *
1060- * You should have received a copy of the GNU General Public License
1061- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1062- */
1063-
1064-import QtQuick 2.0
1065-import Ubuntu.Components 0.1
1066-import "../Components"
1067-
1068-OpenEffect {
1069- property PreviewListView previewListView: null
1070-
1071- objectName: "openEffect"
1072- anchors {
1073- fill: parent
1074- bottomMargin: -bottomOverflow
1075- }
1076-
1077- enabled: gap > 0.0
1078-
1079- topGapPx: (1 - gap) * positionPx
1080- topOpacity: (1 - gap * 1.2)
1081- bottomGapPx: positionPx + gap * (targetBottomGapPx - positionPx)
1082- bottomOverflow: units.gu(20)
1083- live: !expansionAnimation.running
1084-
1085- property int targetBottomGapPx: height - units.gu(8) - bottomOverflow
1086- property real gap: previewListView.open ? 1.0 : 0.0
1087-
1088- Behavior on gap {
1089- NumberAnimation {
1090- id: expansionAnimation
1091- duration: 200
1092- easing.type: Easing.InOutQuad
1093- onRunningChanged: {
1094- if (!previewListView.open && !running) {
1095- previewListView.onScreen = false
1096- }
1097- }
1098- }
1099- }
1100- Behavior on positionPx {
1101- enabled: previewListView.open
1102- UbuntuNumberAnimation {}
1103- }
1104-}
1105
1106=== modified file 'qml/Dash/DashContentTabBarStyle.qml'
1107--- qml/Dash/DashContentTabBarStyle.qml 2013-12-02 15:58:26 +0000
1108+++ qml/Dash/DashContentTabBarStyle.qml 2014-03-07 12:41:18 +0000
1109@@ -18,4 +18,7 @@
1110
1111 TabBarStyle {
1112 indicatorImageSource: "graphics/tabbarchevron.png"
1113+ // TODO karni: These should come from updated Ubuntu Palette.
1114+ headerTextColor: "#88888888"
1115+ headerTextSelectedColor: "#888888"
1116 }
1117
1118=== modified file 'qml/Dash/DashFilterGrid.qml'
1119--- qml/Dash/DashFilterGrid.qml 2013-12-10 15:39:51 +0000
1120+++ qml/Dash/DashFilterGrid.qml 2014-03-07 12:41:18 +0000
1121@@ -26,11 +26,14 @@
1122 property alias delegate: filterGrid.delegate
1123 property alias delegateWidth: filterGrid.delegateWidth
1124 property alias delegateHeight: filterGrid.delegateHeight
1125+ property alias verticalSpacing: filterGrid.verticalSpacing
1126 property alias maximumNumberOfColumns: filterGrid.maximumNumberOfColumns
1127 property alias minimumHorizontalSpacing: filterGrid.minimumHorizontalSpacing
1128+ property alias collapsedRowCount: filterGrid.collapsedRowCount
1129+
1130+ property FilterGrid grid: filterGrid
1131
1132 collapsedHeight: filterGrid.collapsedHeight
1133- collapsedRowCount: filterGrid.collapsedRowCount
1134 columns: filterGrid.columns
1135 rows: filter ? filterGrid.collapsedRowCount : filterGrid.uncollapsedRowCount
1136 currentItem: filterGrid.currentItem
1137@@ -38,7 +41,6 @@
1138 height: filterGrid.height
1139 margins: filterGrid.margins
1140 uncollapsedHeight: filterGrid.uncollapsedHeight
1141- verticalSpacing: filterGrid.verticalSpacing
1142
1143 function startFilterAnimation(filter) {
1144 filterGrid.startFilterAnimation(filter)
1145
1146=== modified file 'qml/Dash/DashPreviewPlaceholder.qml'
1147--- qml/Dash/DashPreviewPlaceholder.qml 2013-09-30 12:17:20 +0000
1148+++ qml/Dash/DashPreviewPlaceholder.qml 2014-03-07 12:41:18 +0000
1149@@ -20,6 +20,6 @@
1150 DashPreview {
1151 ActivityIndicator {
1152 anchors.centerIn: parent
1153- running: true
1154+ running: visible
1155 }
1156 }
1157
1158=== modified file 'qml/Dash/DashRenderer.qml'
1159--- qml/Dash/DashRenderer.qml 2013-12-10 15:39:51 +0000
1160+++ qml/Dash/DashRenderer.qml 2014-03-07 12:41:18 +0000
1161@@ -62,4 +62,10 @@
1162
1163 function startFilterAnimation(filter) {
1164 }
1165+
1166+ /// Category template definition from the scope
1167+ property var template
1168+
1169+ /// Component mapping and configuration from the scope
1170+ property var components
1171 }
1172
1173=== modified file 'qml/Dash/GenericScopeView.qml'
1174--- qml/Dash/GenericScopeView.qml 2014-02-28 10:46:49 +0000
1175+++ qml/Dash/GenericScopeView.qml 2014-03-07 12:41:18 +0000
1176@@ -17,7 +17,7 @@
1177 import QtQuick 2.0
1178 import Ubuntu.Components 0.1
1179 import Utils 0.1
1180-import Unity 0.1
1181+import Unity 0.2
1182 import "../Components"
1183 import "../Components/ListItems" as ListItems
1184
1185@@ -30,7 +30,6 @@
1186 property alias moving: categoryView.moving
1187 property int tabBarHeight: 0
1188 property PageHeader pageHeader: null
1189- property OpenEffect openEffect: null
1190 property Item previewListView: null
1191
1192 signal movementStarted
1193@@ -55,7 +54,7 @@
1194 Binding {
1195 target: scope
1196 property: "isActive"
1197- value: isCurrent && !previewListView.onScreen
1198+ value: isCurrent && !previewListView.open
1199 }
1200
1201 Timer {
1202@@ -115,10 +114,9 @@
1203 objectName: "categoryListView"
1204 anchors.fill: parent
1205 model: scopeView.categories
1206- forceNoClip: previewListView.onScreen
1207+ forceNoClip: previewListView.open
1208
1209 property string expandedCategoryId: ""
1210- signal correctExpandedCategory();
1211
1212 onContentYChanged: pageHeader.positionRealHeader();
1213 onOriginYChanged: pageHeader.positionRealHeader();
1214@@ -133,6 +131,7 @@
1215 id: baseItem
1216 objectName: "dashCategory" + category
1217 highlightWhenPressed: false
1218+ showDivider: false
1219
1220 readonly property bool expandable: rendererLoader.item ? rendererLoader.item.expandable : false
1221 readonly property bool filtered: rendererLoader.item ? rendererLoader.item.filter : true
1222@@ -147,7 +146,7 @@
1223 right: parent.right
1224 }
1225
1226- source: getRenderer(model.renderer, model.contentType, model.rendererHint, results)
1227+ source: getRenderer(model.renderer, results)
1228
1229 onLoaded: {
1230 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
1231@@ -155,9 +154,10 @@
1232 scopeView.enableHeightBehaviorOnNextCreation = false;
1233 }
1234 if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
1235- // TODO: the running apps grid doesn't support standard scope results model yet
1236- item.firstModel = Qt.binding(function() { return results.firstModel })
1237- item.secondModel = Qt.binding(function() { return results.secondModel })
1238+ // TODO: this is still a kludge :D Ideally add some kind of hook so that we
1239+ // can do this from DashApps.qml or think a better way that needs no special casing
1240+ item.firstModel = Qt.binding(function() { return mainStageApplicationsModel })
1241+ item.secondModel = Qt.binding(function() { return sideStageApplicationModel })
1242 item.canEnableTerminationMode = Qt.binding(function() { return scopeView.isCurrent })
1243 } else {
1244 item.model = Qt.binding(function() { return results })
1245@@ -170,6 +170,9 @@
1246 }
1247 }
1248 updateDelegateCreationRange();
1249+ // FIXME: should be "template", not "renderer"
1250+ item.template = Qt.binding(function() { return model.renderer });
1251+ item.components = Qt.binding(function() { return model.components });
1252 }
1253
1254 Component.onDestruction: {
1255@@ -181,39 +184,24 @@
1256 Connections {
1257 target: rendererLoader.item
1258 onClicked: {
1259- // Prepare the preview in case activate() triggers a preview only
1260- openEffect.positionPx = Math.max(mapToItem(categoryView, 0, itemY).y, pageHeader.height + categoryView.stickyHeaderHeight);
1261- previewListView.categoryId = categoryId
1262- previewListView.categoryDelegate = rendererLoader.item
1263- previewListView.model = target.model;
1264- previewListView.init = true;
1265- previewListView.currentIndex = index;
1266-
1267- var item = target.model.get(index);
1268-
1269- if ((scopeView.scope.id == "applications.scope" && categoryId == "installed")
1270- || (scopeView.scope.id == "home.scope" && categoryId == "applications.scope")) {
1271- scopeView.scope.activate(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
1272- item.comment, item.dndUri, item.metadata)
1273+ if (scopeView.scope.id === "scopes" || (scopeView.scope.id == "clickscope" && categoryId == "local")) {
1274+ // TODO Technically it is possible that calling activate() will make the scope emit
1275+ // previewRequested so that we show a preview but there's no scope that does that yet
1276+ // so it's not implemented
1277+ var item = target.model.get(index);
1278+ scopeView.scope.activate(item.result)
1279 } else {
1280+ previewListView.model = target.model;
1281+ previewListView.currentIndex = -1
1282+ previewListView.currentIndex = index;
1283 previewListView.open = true
1284-
1285- scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
1286- item.comment, item.dndUri, item.metadata)
1287 }
1288 }
1289 onPressAndHold: {
1290- openEffect.positionPx = Math.max(mapToItem(categoryView, 0, itemY).y, pageHeader.height + categoryView.stickyHeaderHeight);
1291- previewListView.categoryId = categoryId
1292- previewListView.categoryDelegate = rendererLoader.item
1293 previewListView.model = target.model;
1294- previewListView.init = true;
1295+ previewListView.currentIndex = -1
1296 previewListView.currentIndex = index;
1297 previewListView.open = true
1298-
1299- var item = target.model.get(index)
1300- scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
1301- item.comment, item.dndUri, item.metadata)
1302 }
1303 }
1304 Connections {
1305@@ -221,9 +209,6 @@
1306 onExpandedCategoryIdChanged: {
1307 collapseAllButExpandedCategory();
1308 }
1309- onCorrectExpandedCategory: {
1310- collapseAllButExpandedCategory();
1311- }
1312 function collapseAllButExpandedCategory() {
1313 var item = rendererLoader.item;
1314 if (item.expandable) {
1315@@ -275,6 +260,31 @@
1316 }
1317 }
1318 }
1319+
1320+ Image {
1321+ visible: index != 0
1322+ anchors {
1323+ top: parent.top
1324+ left: parent.left
1325+ right: parent.right
1326+ }
1327+ fillMode: Image.Stretch
1328+ source: "graphics/dash_divider_top_lightgrad.png"
1329+ z: -1
1330+ }
1331+
1332+ Image {
1333+ // FIXME Should not rely on count field of model, SortfilterProxyModel in this case.
1334+ visible: index != categoryView.model.count - 1
1335+ anchors {
1336+ bottom: parent.bottom
1337+ left: parent.left
1338+ right: parent.right
1339+ }
1340+ fillMode: Image.Stretch
1341+ source: "graphics/dash_divider_top_darkgrad.png"
1342+ z: -1
1343+ }
1344 }
1345
1346 onHeightChanged: rendererLoader.updateDelegateCreationRange();
1347@@ -302,95 +312,35 @@
1348 pageHeader: Item {
1349 implicitHeight: scopeView.tabBarHeight
1350 onHeightChanged: {
1351- if (scopeView.pageHeader) {
1352+ if (scopeView.pageHeader && scopeView.isCurrent) {
1353 scopeView.pageHeader.height = height;
1354 }
1355 }
1356 onYChanged: positionRealHeader();
1357
1358 function positionRealHeader() {
1359- if (scopeView.pageHeader) {
1360+ if (scopeView.pageHeader && scopeView.isCurrent) {
1361 scopeView.pageHeader.y = y + parent.y;
1362 }
1363 }
1364 }
1365 }
1366
1367- function getDefaultRendererId(contentType) {
1368- switch (contentType) {
1369- default: return "grid";
1370- }
1371- }
1372-
1373- function getRenderer(rendererId, contentType, rendererHint, results) {
1374- if (rendererId == "default") {
1375- rendererId = getDefaultRendererId(contentType);
1376- }
1377- if (rendererId == "carousel") {
1378- // Selectively disable carousel, 6 is fixed for now, should change on the form factor
1379- if (results.count <= 6)
1380- rendererId = "grid"
1381- }
1382- switch (rendererId) {
1383- case "carousel": {
1384- switch (contentType) {
1385- case "music": return "Music/MusicCarousel.qml";
1386- case "video": return "Video/VideoCarousel.qml";
1387- default: return "Generic/GenericCarousel.qml";
1388- }
1389- }
1390- case "grid": {
1391- switch (contentType) {
1392- case "apps": {
1393- if (rendererHint == "toggled")
1394- return "Apps/DashPluginFilterGrid.qml";
1395- else
1396- return "Generic/GenericFilterGrid.qml";
1397- }
1398- case "music": return "Music/MusicFilterGrid.qml";
1399- case "video": return "Video/VideoFilterGrid.qml";
1400- case "weather": return "Generic/WeatherFilterGrid.qml";
1401- default: return "Generic/GenericFilterGrid.qml";
1402- }
1403- }
1404- case "special": {
1405- switch (contentType) {
1406- case "apps": return "Apps/RunningApplicationsGrid.qml";
1407- default: return "Generic/GenericFilterGrid.qml";
1408- }
1409- }
1410- default: return "Generic/GenericFilterGrid.qml";
1411- }
1412- }
1413-
1414- Connections {
1415- target: scopeView.scope
1416- onPreviewReady: {
1417- if (previewListView.init) {
1418- // Preview was triggered because of a click on the item. Need to expand now.
1419- if (!previewListView.open) {
1420- previewListView.open = true
1421- }
1422-
1423- var index = previewListView.currentIndex
1424- previewListView.currentIndex = -1
1425- previewListView.currentIndex = index
1426- previewListView.init = false
1427- }
1428- previewListView.currentItem.previewData = preview
1429- }
1430- }
1431-
1432- // TODO: Move as InverseMouseArea to DashPreview
1433- MouseArea {
1434- objectName: "closePreviewMouseArea"
1435- enabled: previewListView.onScreen
1436- anchors {
1437- fill: parent
1438- topMargin: openEffect.bottomGapPx
1439- }
1440- onClicked: {
1441- previewListView.open = false;
1442+ function getRenderer(template, results) {
1443+ var layout = template["category-layout"];
1444+
1445+ if (layout == "running-apps") {
1446+ return "Apps/RunningApplicationsGrid.qml";
1447+ }
1448+
1449+ if (layout === "carousel") {
1450+ // TODO: Selectively disable carousel, 4 is fixed for now, should change depending on form factor
1451+ if (results.count <= 4) layout = "grid";
1452+ }
1453+ switch (layout) {
1454+ case "carousel": return "CardCarousel.qml";
1455+ case "grid":
1456+ default: return "CardFilterGrid.qml";
1457 }
1458 }
1459 }
1460
1461=== modified file 'qml/Dash/PreviewListView.qml'
1462--- qml/Dash/PreviewListView.qml 2014-01-28 15:57:51 +0000
1463+++ qml/Dash/PreviewListView.qml 2014-03-07 12:41:18 +0000
1464@@ -16,53 +16,53 @@
1465
1466 import QtQuick 2.0
1467 import Ubuntu.Components 0.1
1468-import Unity 0.1
1469+import Unity 0.2
1470 import "../Components"
1471+import "Previews" as Previews
1472
1473 Item {
1474- property OpenEffect openEffect: null
1475- property ScopeListView categoryView: null
1476+ id: root
1477+
1478 property Scope scope: null
1479+ property var pageHeader: null
1480
1481 property alias open: previewListView.open
1482- property alias onScreen: previewListView.onScreen
1483- property alias categoryId: previewListView.categoryId
1484- property alias categoryDelegate: previewListView.categoryDelegate
1485- property alias init: previewListView.init
1486 property alias model: previewListView.model
1487 property alias currentIndex: previewListView.currentIndex
1488 property alias currentItem: previewListView.currentItem
1489 property alias count: previewListView.count
1490
1491- Image {
1492- objectName: "pointerArrow"
1493- anchors {
1494- top: previewListView.bottom
1495- left: parent.left
1496- leftMargin: previewListView.categoryDelegate !== undefined && previewListView.categoryDelegate.currentItem ?
1497- previewListView.categoryDelegate.currentItem.center + (-width + margins) / 2 : 0
1498+ PageHeader {
1499+ id: header
1500+ width: parent.width
1501+ searchEntryEnabled: false
1502+ scope: root.scope
1503+ height: units.gu(8.5)
1504+ showBackButton: true
1505+ onBackClicked: root.open = false
1506
1507- Behavior on leftMargin {
1508- SmoothedAnimation {
1509- duration: UbuntuAnimation.FastDuration
1510- }
1511+ childItem: Label {
1512+ id: label
1513+ anchors {
1514+ left: parent.left
1515+ right: parent.right
1516+ verticalCenter: parent.verticalCenter
1517 }
1518+ text: scope ? i18n.tr("%1 Preview").arg(scope.name) : ""
1519+ color: "#888888"
1520+ font.family: "Ubuntu"
1521+ font.weight: Font.Light
1522+ fontSize: "x-large"
1523+ elide: Text.ElideRight
1524 }
1525- height: units.gu(1)
1526- width: units.gu(2)
1527- property int margins: previewListView.categoryDelegate ? previewListView.categoryDelegate.margins : 0
1528- opacity: previewListView.open ? .5 : 0
1529-
1530- source: "graphics/tooltip_arrow.png"
1531 }
1532
1533 ListView {
1534 id: previewListView
1535 objectName: "previewListView"
1536- height: openEffect.bottomGapPx - openEffect.topGapPx
1537 anchors {
1538- top: parent.top
1539- topMargin: openEffect.topGapPx
1540+ top: header.bottom
1541+ bottom: parent.bottom
1542 left: parent.left
1543 right: parent.right
1544 }
1545@@ -77,71 +77,17 @@
1546
1547 // To be set before opening the preview
1548 property string categoryId: ""
1549- property var categoryDelegate
1550
1551 // because the ListView is built asynchronous, setting the
1552 // currentIndex directly won't work. We need to refresh it
1553 // when the first preview is ready to be displayed.
1554 property bool init: true
1555
1556- PreviewDelegateMapper {
1557- id: previewDelegateMapper
1558- }
1559-
1560- onCurrentIndexChanged: positionListView();
1561-
1562- function positionListView() {
1563- if (!open) {
1564- return;
1565- }
1566-
1567- var row = Math.floor(currentIndex / categoryDelegate.columns);
1568- if (categoryDelegate.collapsedRowCount <= row) {
1569- categoryView.expandedCategoryId = categoryId
1570- }
1571-
1572- categoryDelegate.highlightIndex = currentIndex
1573-
1574- if (!init && model !== undefined) {
1575- var item = model.get(currentIndex)
1576- scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title, item.comment, item.dndUri, item.metadata)
1577- }
1578-
1579- // Adjust contentY in case we need to change to it to show the next row
1580- if (categoryDelegate.rows > 1) {
1581- var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
1582-
1583- // Find new contentY and effect.postionPx
1584- var newContentY = itemY - openEffect.positionPx - categoryDelegate.verticalSpacing;
1585-
1586- // Make sure the item is not covered by a header. Move the effect split down if necessary
1587- var headerHeight = pageHeader.height + categoryView.stickyHeaderHeight;
1588- var effectAdjust = Math.max(openEffect.positionPx, headerHeight);
1589-
1590- // Make sure we don't overscroll the listview. If yes, adjust effect position
1591- if (newContentY < 0) {
1592- effectAdjust += newContentY;
1593- newContentY = 0;
1594- }
1595- if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
1596- effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
1597- newContentY = categoryView.contentHeight - categoryView.height;
1598- }
1599-
1600- openEffect.positionPx = effectAdjust;
1601- categoryView.contentY = newContentY;
1602- }
1603- }
1604-
1605 property bool open: false
1606- property bool onScreen: false
1607
1608 onOpenChanged: {
1609 if (open) {
1610- onScreen = true;
1611- categoryDelegate.highlightIndex = currentIndex;
1612 pageHeader.unfocus();
1613- positionListView();
1614 } else {
1615 // Cancel any pending preview requests or actions
1616 if (previewListView.currentItem.previewData !== undefined) {
1617@@ -149,68 +95,43 @@
1618 }
1619 scope.cancelActivation();
1620 model = undefined;
1621- categoryView.correctExpandedCategory();
1622- categoryDelegate.highlightIndex = -1;
1623 }
1624 }
1625
1626- Rectangle {
1627- anchors.fill: parent
1628- color: Qt.rgba(0, 0, 0, .3)
1629- z: -1
1630- }
1631-
1632- delegate: Loader {
1633- id: previewLoader
1634- objectName: "previewLoader" + index
1635+ delegate: Item {
1636 height: previewListView.height
1637 width: previewListView.width
1638- asynchronous: true
1639- source: previewListView.onScreen ?
1640- (previewData !== undefined ? previewDelegateMapper.map(previewData.rendererName) : "DashPreviewPlaceholder.qml") : ""
1641-
1642- onPreviewDataChanged: {
1643- if (previewData !== undefined && source.toString().indexOf("DashPreviewPlaceholder.qml") != -1) {
1644- previewLoader.opacity = 0;
1645- }
1646- }
1647-
1648- onSourceChanged: {
1649- if (previewData !== undefined) {
1650- fadeIn.start()
1651- }
1652- }
1653-
1654- PropertyAnimation {
1655- id: fadeIn
1656- target: previewLoader
1657- property: "opacity"
1658- from: 0.0
1659- to: 1.0
1660- duration: UbuntuAnimation.BriskDuration
1661- }
1662-
1663- property var previewData
1664- property bool valid: item !== null
1665-
1666- onLoaded: {
1667- if (previewListView.onScreen && previewData !== undefined) {
1668- item.previewData = Qt.binding(function() { return previewData })
1669- item.isCurrent = Qt.binding(function() { return ListView.isCurrentItem })
1670- }
1671- }
1672-
1673- Connections {
1674- ignoreUnknownSignals: true
1675- target: item
1676- onClose: {
1677- previewListView.open = false
1678- }
1679- }
1680-
1681- function closePreviewSpinner() {
1682- if (item) {
1683- item.showProcessingAction = false;
1684+
1685+ readonly property bool ready: preview.previewModel.loaded
1686+
1687+ Previews.Preview {
1688+ id: preview
1689+ objectName: "preview" + index
1690+ anchors.fill: parent
1691+
1692+ isCurrent: parent.ListView.isCurrentItem
1693+
1694+ previewModel: {
1695+ var previewStack = root.scope.preview(result);
1696+ return previewStack.get(0);
1697+ }
1698+
1699+ // onClose: {
1700+ // previewListView.open = false
1701+ // }
1702+
1703+ }
1704+
1705+ MouseArea {
1706+ id: processingMouseArea
1707+ objectName: "processingMouseArea"
1708+ anchors.fill: parent
1709+ enabled: !preview.previewModel.loaded || preview.previewModel.processingAction
1710+
1711+ ActivityIndicator {
1712+ anchors.centerIn: parent
1713+ visible: root.open && parent.enabled
1714+ running: visible
1715 }
1716 }
1717 }
1718
1719=== modified file 'qml/Dash/Previews/Preview.qml'
1720--- qml/Dash/Previews/Preview.qml 2014-02-12 09:36:33 +0000
1721+++ qml/Dash/Previews/Preview.qml 2014-03-07 12:41:18 +0000
1722@@ -39,7 +39,8 @@
1723 clip: true
1724
1725 Connections {
1726- target: shell.applicationManager
1727+ target: shell.applicationManager || null
1728+ ignoreUnknownSignals: true
1729 onMainStageFocusedApplicationChanged: {
1730 root.close();
1731 }
1732@@ -48,7 +49,11 @@
1733 }
1734 }
1735
1736- onPreviewModelChanged: processingMouseArea.enabled = false
1737+ Binding {
1738+ target: previewModel
1739+ property: "widgetColumnCount"
1740+ value: row.columns
1741+ }
1742
1743 MouseArea {
1744 anchors.fill: parent
1745@@ -60,18 +65,21 @@
1746 spacing: units.gu(1)
1747 anchors { fill: parent; margins: spacing }
1748
1749+ property int columns: width >= units.gu(80) ? 2 : 1
1750+ property real columnWidth: width / columns
1751+
1752 Repeater {
1753- model: 1
1754+ model: previewModel
1755
1756 delegate: ListView {
1757 id: column
1758 anchors { top: parent.top; bottom: parent.bottom }
1759- width: row.width
1760+ width: row.columnWidth
1761 spacing: row.spacing
1762 bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
1763
1764- model: previewModel
1765- cacheBuffer: units.gu(40)
1766+ model: columnModel
1767+ cacheBuffer: height
1768
1769 Behavior on contentY { UbuntuNumberAnimation { } }
1770
1771@@ -80,10 +88,14 @@
1772 widgetType: model.type
1773 widgetData: model.properties
1774 isCurrentPreview: root.isCurrent
1775- anchors { left: parent.left; right: parent.right }
1776+ anchors {
1777+ left: parent.left
1778+ right: parent.right
1779+ leftMargin: units.gu(1)
1780+ rightMargin: units.gu(1)
1781+ }
1782
1783 onTriggered: {
1784- processingMouseArea.enabled = true;
1785 previewModel.triggered(widgetId, actionId, data);
1786 }
1787
1788@@ -94,11 +106,4 @@
1789 }
1790 }
1791 }
1792-
1793- MouseArea {
1794- id: processingMouseArea
1795- objectName: "processingMouseArea"
1796- anchors.fill: parent
1797- enabled: false
1798- }
1799 }
1800
1801=== modified file 'qml/Dash/Previews/PreviewActions.qml'
1802--- qml/Dash/Previews/PreviewActions.qml 2014-02-12 09:11:54 +0000
1803+++ qml/Dash/Previews/PreviewActions.qml 2014-03-07 12:41:18 +0000
1804@@ -24,7 +24,7 @@
1805 PreviewWidget {
1806 id: root
1807
1808- height: row.height
1809+ height: row.height + units.gu(1)
1810
1811 Row {
1812 id: row
1813
1814=== modified file 'qml/Dash/Previews/PreviewAudioPlayback.qml'
1815--- qml/Dash/Previews/PreviewAudioPlayback.qml 2014-02-05 12:37:20 +0000
1816+++ qml/Dash/Previews/PreviewAudioPlayback.qml 2014-03-07 12:41:18 +0000
1817@@ -139,7 +139,7 @@
1818 objectName: "trackTitleLabel"
1819 anchors { top: parent.top; left: parent.left; right: parent.right }
1820 opacity: 0.9
1821- color: Theme.palette.selected.backgroundText
1822+ color: "grey"//Theme.palette.selected.backgroundText // TODO karni: Use updated Palette.
1823 fontSize: "small"
1824 horizontalAlignment: Text.AlignLeft
1825 text: modelData["title"]
1826@@ -152,7 +152,7 @@
1827 anchors { top: trackTitleLabel.bottom; left: parent.left; right: parent.right }
1828 visible: text !== ""
1829 opacity: 0.9
1830- color: Theme.palette.selected.backgroundText
1831+ color: "lightgrey"//Theme.palette.selected.backgroundText // TODO karni: Use updated Palette.
1832 fontSize: "small"
1833 horizontalAlignment: Text.AlignLeft
1834 text: modelData["subtitle"] || ""
1835@@ -192,7 +192,7 @@
1836 anchors.verticalCenter: parent.verticalCenter
1837 width: parent.column3Width
1838 opacity: 0.9
1839- color: Theme.palette.selected.backgroundText
1840+ color: "grey"//Theme.palette.selected.backgroundText // TODO karni: Use updated Palette.
1841 fontSize: "small"
1842 horizontalAlignment: Text.AlignRight
1843 text: audio.lengthToString(modelData["length"])
1844
1845=== modified file 'qml/Dash/Previews/PreviewHeader.qml'
1846--- qml/Dash/Previews/PreviewHeader.qml 2014-02-07 14:08:40 +0000
1847+++ qml/Dash/Previews/PreviewHeader.qml 2014-03-07 12:41:18 +0000
1848@@ -34,5 +34,7 @@
1849 title: root.widgetData["title"] || ""
1850 subtitle: root.widgetData["subtitle"] || ""
1851 width: parent.width
1852+
1853+ titleSize: "large"
1854 }
1855-}
1856\ No newline at end of file
1857+}
1858
1859=== modified file 'qml/Dash/Previews/PreviewImageGallery.qml'
1860--- qml/Dash/Previews/PreviewImageGallery.qml 2014-02-05 12:08:18 +0000
1861+++ qml/Dash/Previews/PreviewImageGallery.qml 2014-03-07 12:41:18 +0000
1862@@ -32,6 +32,16 @@
1863 orientation: ListView.Horizontal
1864 cacheBuffer: width * 3
1865 model: root.widgetData["sources"]
1866+ clip: true
1867+
1868+ // FIXME: Because of ListViews inside ListViews inside Flickables inside ListViews (and some more)
1869+ // we finally reached the point where this ListView doesn't correctly get swipe input any more but
1870+ // instead the parent ListView is the one that is swiped. This MouseArea sort of creates a blocking
1871+ // layer to make sure this ListView can be swiped, regardless of what's behind it.
1872+ MouseArea {
1873+ anchors.fill: parent
1874+ enabled: parent.contentWidth > parent.width
1875+ }
1876
1877 LazyImage {
1878 objectName: "placeholderScreenshot"
1879
1880=== modified file 'qml/Dash/Previews/PreviewTextSummary.qml'
1881--- qml/Dash/Previews/PreviewTextSummary.qml 2014-02-06 10:23:05 +0000
1882+++ qml/Dash/Previews/PreviewTextSummary.qml 2014-03-07 12:41:18 +0000
1883@@ -38,7 +38,8 @@
1884 right: parent.right
1885 }
1886 fontSize: "large"
1887- color: Theme.palette.selected.backgroundText
1888+ // TODO karni: Yet another fix requiring Palette update.
1889+ color: "grey" //Theme.palette.selected.backgroundText
1890 visible: text !== ""
1891 opacity: .8
1892 text: widgetData["title"] || ""
1893@@ -58,8 +59,10 @@
1894 }
1895 height: (!seeMore.visible || seeMore.more) ? contentHeight : contentHeight / lineCount * (maximumCollapsedLineCount - 2)
1896 clip: true
1897- fontSize: "medium"
1898- color: Theme.palette.selected.backgroundText
1899+ fontSize: "small"
1900+ lineHeight: 1.2
1901+ // TODO karni: Yet another fix requiring Palette update.
1902+ color: "grey" //Theme.palette.selected.backgroundText
1903 opacity: .8
1904 text: widgetData["text"]
1905 wrapMode: Text.Wrap
1906
1907=== modified file 'qml/Dash/Previews/PreviewWidgetFactory.qml'
1908--- qml/Dash/Previews/PreviewWidgetFactory.qml 2014-02-21 11:24:12 +0000
1909+++ qml/Dash/Previews/PreviewWidgetFactory.qml 2014-03-07 12:41:18 +0000
1910@@ -46,7 +46,7 @@
1911 case "audio": return "PreviewAudioPlayback.qml";
1912 case "gallery": return "PreviewImageGallery.qml";
1913 case "header": return "PreviewHeader.qml";
1914- case "image": return "PreviewZoomableImage.qml"
1915+ case "image": return "PreviewZoomableImage.qml";
1916 case "progress": return "PreviewProgress.qml";
1917 case "rating-input": return "PreviewRatingInput.qml";
1918 case "reviews": return "PreviewRatingDisplay.qml";
1919
1920=== modified file 'qml/Dash/ScopeDelegateMapper.qml'
1921--- qml/Dash/ScopeDelegateMapper.qml 2013-10-11 10:12:35 +0000
1922+++ qml/Dash/ScopeDelegateMapper.qml 2014-03-07 12:41:18 +0000
1923@@ -17,7 +17,7 @@
1924 import QtQuick 2.0
1925
1926 QtObject {
1927- property var scopeDelegateMapping: {"applications.scope": "DashApps.qml",
1928+ property var scopeDelegateMapping: {"clickscope": "DashApps.qml",
1929 "home.scope": "DashHome.qml"
1930 }
1931 property string genericScope: "GenericScopeView.qml"
1932
1933=== added file 'qml/Dash/ScopeItem.qml'
1934--- qml/Dash/ScopeItem.qml 1970-01-01 00:00:00 +0000
1935+++ qml/Dash/ScopeItem.qml 2014-03-07 12:41:18 +0000
1936@@ -0,0 +1,94 @@
1937+/*
1938+ * Copyright (C) 2014 Canonical, Ltd.
1939+ *
1940+ * This program is free software; you can redistribute it and/or modify
1941+ * it under the terms of the GNU General Public License as published by
1942+ * the Free Software Foundation; version 3.
1943+ *
1944+ * This program is distributed in the hope that it will be useful,
1945+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1946+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1947+ * GNU General Public License for more details.
1948+ *
1949+ * You should have received a copy of the GNU General Public License
1950+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1951+ */
1952+
1953+import QtQuick 2.0
1954+import Ubuntu.Components 0.1
1955+import Unity 0.2
1956+import "../Components"
1957+
1958+Item {
1959+ id: root
1960+
1961+ property alias scope: scopeView.scope
1962+ property alias previewOpen: previewListView.open
1963+
1964+ property ListModel searchHistory
1965+
1966+ signal back
1967+ signal gotoScope(string scopeId)
1968+ signal openScope(var scope)
1969+
1970+ Item {
1971+ id: scopeViewHolder
1972+
1973+ x: previewListView.open ? -width : 0
1974+ Behavior on x { UbuntuNumberAnimation { } }
1975+ width: parent.width
1976+ height: parent.height
1977+
1978+ GenericScopeView {
1979+ id: scopeView
1980+ width: parent.width
1981+ height: parent.height
1982+ isCurrent: scope != null
1983+ tabBarHeight: scopeItemPageHeader.implicitHeight
1984+ pageHeader: scopeItemPageHeader
1985+ previewListView: previewListView
1986+
1987+ Connections {
1988+ target: scopeView.isCurrent ? scope : null
1989+ onGotoScope: root.gotoScope(scopeId);
1990+ onOpenScope: root.openScope(scope);
1991+ }
1992+ }
1993+
1994+ PageHeader {
1995+ id: scopeItemPageHeader
1996+ width: parent.width
1997+ searchEntryEnabled: true
1998+ searchHistory: root.searchHistory
1999+ scope: root.scope
2000+ height: units.gu(8.5)
2001+ showBackButton: true
2002+ onBackClicked: root.back();
2003+
2004+ childItem: Label {
2005+ id: label
2006+ anchors {
2007+ left: parent.left
2008+ right: parent.right
2009+ verticalCenter: parent.verticalCenter
2010+ }
2011+ text: scope ? scope.name : ""
2012+ color: "#888888"
2013+ font.family: "Ubuntu"
2014+ font.weight: Font.Light
2015+ fontSize: "x-large"
2016+ elide: Text.ElideRight
2017+ }
2018+ }
2019+ }
2020+
2021+ PreviewListView {
2022+ id: previewListView
2023+ visible: x != width
2024+ pageHeader: scopeItemPageHeader
2025+ scope: root.scope
2026+ width: parent.width
2027+ height: parent.height
2028+ anchors.left: scopeViewHolder.right
2029+ }
2030+}
2031
2032=== modified file 'qml/Dash/SearchableResultModel.qml'
2033--- qml/Dash/SearchableResultModel.qml 2013-09-30 12:17:20 +0000
2034+++ qml/Dash/SearchableResultModel.qml 2014-03-07 12:41:18 +0000
2035@@ -15,7 +15,7 @@
2036 */
2037
2038 import Utils 0.1
2039-import Unity 0.1
2040+import Unity 0.2
2041
2042 SortFilterProxyModel {
2043 id: root
2044
2045=== added file 'qml/Dash/graphics/dash_divider_top_darkgrad@27.png'
2046Binary files qml/Dash/graphics/dash_divider_top_darkgrad@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/dash_divider_top_darkgrad@27.png 2014-03-07 12:41:18 +0000 differ
2047=== added file 'qml/Dash/graphics/dash_divider_top_lightgrad@27.png'
2048Binary files qml/Dash/graphics/dash_divider_top_lightgrad@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/dash_divider_top_lightgrad@27.png 2014-03-07 12:41:18 +0000 differ
2049=== renamed file 'qml/Dash/graphics/header_handlearrow2@20.png' => 'qml/Dash/graphics/header_handlearrow2@27.png'
2050Binary files qml/Dash/graphics/header_handlearrow2@20.png 2013-08-08 14:34:00 +0000 and qml/Dash/graphics/header_handlearrow2@27.png 2014-03-07 12:41:18 +0000 differ
2051=== renamed file 'qml/Dash/graphics/header_handlearrow@20.png' => 'qml/Dash/graphics/header_handlearrow@27.png'
2052Binary files qml/Dash/graphics/header_handlearrow@20.png 2013-08-08 14:34:00 +0000 and qml/Dash/graphics/header_handlearrow@27.png 2014-03-07 12:41:18 +0000 differ
2053=== added file 'qml/Dash/graphics/paper_landscape@27.png'
2054Binary files qml/Dash/graphics/paper_landscape@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/paper_landscape@27.png 2014-03-07 12:41:18 +0000 differ
2055=== added file 'qml/Dash/graphics/paper_portrait@27.png'
2056Binary files qml/Dash/graphics/paper_portrait@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/paper_portrait@27.png 2014-03-07 12:41:18 +0000 differ
2057=== modified file 'qml/Dash/graphics/tabbarchevron@27.png'
2058Binary files qml/Dash/graphics/tabbarchevron@27.png 2013-12-02 15:58:26 +0000 and qml/Dash/graphics/tabbarchevron@27.png 2014-03-07 12:41:18 +0000 differ
2059=== modified file 'qml/Launcher/Launcher.qml'
2060--- qml/Launcher/Launcher.qml 2013-12-04 13:41:51 +0000
2061+++ qml/Launcher/Launcher.qml 2014-03-07 12:41:18 +0000
2062@@ -18,7 +18,6 @@
2063 import "../Components"
2064 import Ubuntu.Components 0.1
2065 import Ubuntu.Gestures 0.1
2066-import Unity 0.1
2067 import Unity.Launcher 0.1
2068
2069 Item {
2070
2071=== modified file 'qml/Launcher/LauncherPanel.qml'
2072--- qml/Launcher/LauncherPanel.qml 2013-12-04 13:41:51 +0000
2073+++ qml/Launcher/LauncherPanel.qml 2014-03-07 12:41:18 +0000
2074@@ -17,7 +17,6 @@
2075 import QtQuick 2.0
2076 import Ubuntu.Components 0.1
2077 import Ubuntu.Components.ListItems 0.1 as ListItems
2078-import Unity 0.1
2079 import Unity.Launcher 0.1
2080 import Ubuntu.Components.Popups 0.1
2081 import "../Components/ListItems"
2082
2083=== modified file 'qml/Panel/MenuContent.qml'
2084--- qml/Panel/MenuContent.qml 2014-01-14 16:44:35 +0000
2085+++ qml/Panel/MenuContent.qml 2014-03-07 12:41:18 +0000
2086@@ -26,6 +26,7 @@
2087 MainView {
2088 id: content
2089
2090+ nativeOrientationAngle: 0 // stop contents being re-rotated when shell in landscape
2091 property QtObject indicatorsModel: null
2092 property bool __contentActive: false
2093 readonly property int currentMenuIndex: tabs.selectedTabIndex
2094
2095=== modified file 'qml/ScopeTool.qml'
2096--- qml/ScopeTool.qml 2014-01-10 10:42:44 +0000
2097+++ qml/ScopeTool.qml 2014-03-07 12:41:18 +0000
2098@@ -18,7 +18,7 @@
2099 import Ubuntu.Components 0.1
2100 import Ubuntu.Components.Popups 0.1
2101 import Utils 0.1
2102-import Unity 0.1
2103+import Unity 0.2
2104 import "Components"
2105 import "Dash"
2106
2107@@ -61,6 +61,14 @@
2108 color: "#FCFCFC"
2109 }
2110
2111+ Image {
2112+ anchors.fill: dashContent
2113+ source: root.width > root.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
2114+ fillMode: Image.PreserveAspectCrop
2115+ horizontalAlignment: Image.AlignRight
2116+ verticalAlignment: Image.AlignTop
2117+ }
2118+
2119 DashContent {
2120 id: dashContent
2121
2122
2123=== modified file 'qml/Shell.qml'
2124--- qml/Shell.qml 2014-03-04 11:42:38 +0000
2125+++ qml/Shell.qml 2014-03-07 12:41:18 +0000
2126@@ -37,6 +37,7 @@
2127
2128 FocusScope {
2129 id: shell
2130+ objectName: "shell"
2131
2132 // this is only here to select the width / height of the window if not running fullscreen
2133 property bool tablet: false
2134@@ -77,10 +78,11 @@
2135 // FIXME: if application focused before shell starts, shell draws on top of it only.
2136 // We should detect already running applications on shell start and bring them to the front.
2137 applicationManager.unfocusCurrentApplication();
2138+
2139+ applicationManager.setMainStageAppRect(mainStageAppRect);
2140+ applicationManager.setSideStageAppRect(sideStageAppRect);
2141 }
2142
2143- readonly property bool applicationFocused: !!applicationManager.mainStageFocusedApplication
2144- || !!applicationManager.sideStageFocusedApplication
2145 // Used for autopilot testing.
2146 readonly property string currentFocusedAppId: ApplicationManager.focusedApplicationId
2147
2148@@ -116,6 +118,11 @@
2149 }
2150 }
2151
2152+ Connections {
2153+ target: applicationManager
2154+ onFocusRequested: activateApplication(appId)
2155+ }
2156+
2157 GSettings {
2158 id: backgroundSettings
2159 schema.id: "org.gnome.desktop.background"
2160@@ -125,27 +132,6 @@
2161 shell.background = gSettingsPicture
2162 }
2163
2164- // This is a dummy image that is needed to determine if the picture url
2165- // in backgroundSettings points to a valid picture file.
2166- // We can't do this with the real background image because setting a
2167- // new source in onStatusChanged triggers a binding loop detection
2168- // inside Image, which causes it not to render even though a valid source
2169- // would be set. We don't mind about this image staying black and just
2170- // use it for verification to populate the source for the real
2171- // background image.
2172- Image {
2173- source: shell.background
2174- height: 0
2175- width: 0
2176- sourceSize.height: 0
2177- sourceSize.width: 0
2178- onStatusChanged: {
2179- if (status == Image.Error && source != shell.defaultBackground) {
2180- shell.background = defaultBackground
2181- }
2182- }
2183- }
2184-
2185 VolumeControl {
2186 id: volumeControl
2187 }
2188@@ -161,67 +147,94 @@
2189 // Whether the underlay is fully covered by opaque UI elements.
2190 property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
2191
2192- readonly property bool applicationRunning: ((mainStage.applications && mainStage.applications.count > 0)
2193- || (sideStage.applications && sideStage.applications.count > 0))
2194+ readonly property bool mainStageApplicationRunning: mainStage.applications && mainStage.applications.count > 0
2195+ readonly property bool sideStageApplicationRunning: sideStage.applications && sideStage.applications.count > 0
2196
2197 // Whether the user should see the topmost application surface (if there's one at all).
2198- readonly property bool applicationSurfaceShouldBeSeen: applicationRunning && !stages.fullyHidden
2199+ readonly property bool mainStageApplicationShown: mainStageApplicationRunning && !stages.fullyHidden
2200 && !mainStage.usingScreenshots // but want sideStage animating over app surface
2201
2202
2203
2204 // NB! Application surfaces are stacked behing the shell one. So they can only be seen by the user
2205 // through the translucent parts of the shell surface.
2206- visible: !fullyCovered && !applicationSurfaceShouldBeSeen
2207-
2208- CrossFadeImage {
2209- id: backgroundImage
2210- objectName: "backgroundImage"
2211-
2212- anchors.fill: parent
2213- source: shell.background
2214- fillMode: Image.PreserveAspectCrop
2215- }
2216-
2217- Rectangle {
2218- anchors.fill: parent
2219- color: "black"
2220- opacity: dash.disappearingAnimationProgress
2221- }
2222-
2223- Dash {
2224- id: dash
2225- objectName: "dash"
2226-
2227- available: !greeter.shown && !lockscreen.shown
2228- hides: [stages, launcher, panel.indicators]
2229- shown: disappearingAnimationProgress !== 1.0
2230- enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
2231- // FIXME: unfocus all applications when going back to the dash
2232- onEnabledChanged: {
2233- if (enabled) {
2234- shell.applicationManager.unfocusCurrentApplication()
2235- }
2236- }
2237-
2238- anchors {
2239- fill: parent
2240- topMargin: panel.panelHeight
2241- }
2242-
2243- contentScale: 1.0 - 0.2 * disappearingAnimationProgress
2244- opacity: 1.0 - disappearingAnimationProgress
2245- property real disappearingAnimationProgress: {
2246- if (greeter.shown) {
2247- return greeter.showProgress;
2248+ visible: !fullyCovered && !mainStageApplicationShown
2249+
2250+ Item {
2251+ id: underlayClipper
2252+ clip: !parent.mainStageApplicationShown && parent.sideStageApplicationRunning && stagesOuterContainer.showProgress > 0
2253+ width: {
2254+ if (clip) {
2255+ var w = parent.width - sideStage.width
2256+ w += stagesOuterContainer.x + stages.x + (sideStage.x - sideStageRevealer.openedValue)
2257+ return Math.min(w, parent.width);
2258 } else {
2259- return stagesOuterContainer.showProgress;
2260- }
2261- }
2262-
2263- // FIXME: only necessary because stagesOuterContainer.showProgress and
2264- // greeterRevealer.animatedProgress are not animated
2265- Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
2266+ return parent.width;
2267+ }
2268+ }
2269+ height: parent.height
2270+
2271+ Image {
2272+ anchors.fill: dash
2273+ source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
2274+ fillMode: Image.PreserveAspectCrop
2275+ horizontalAlignment: Image.AlignRight
2276+ verticalAlignment: Image.AlignTop
2277+ }
2278+
2279+ Dash {
2280+ id: dash
2281+ objectName: "dash"
2282+
2283+ available: !greeter.shown && !lockscreen.shown
2284+ hides: [stages, launcher, panel.indicators]
2285+ shown: disappearingAnimationProgress !== 1.0
2286+ enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
2287+ // FIXME: unfocus all applications when going back to the dash
2288+ onEnabledChanged: {
2289+ if (enabled) {
2290+ shell.applicationManager.unfocusCurrentApplication()
2291+ }
2292+ }
2293+
2294+ width: underlay.width
2295+ height: underlay.height - y
2296+ y: panel.panelHeight
2297+
2298+ contentScale: 1.0 - 0.2 * disappearingAnimationProgress
2299+ opacity: 1.0 - disappearingAnimationProgress
2300+ property real disappearingAnimationProgress: {
2301+ if (greeter.shown) {
2302+ return greeter.showProgress;
2303+ } else {
2304+ if (underlayClipper.clip)
2305+ return 0;
2306+ else
2307+ return stagesOuterContainer.showProgress;
2308+ }
2309+ }
2310+
2311+ // FIXME: only necessary because stagesOuterContainer.showProgress and
2312+ // greeterRevealer.animatedProgress are not animated
2313+ Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
2314+ }
2315+
2316+ Rectangle {
2317+ width: underlay.width
2318+ height: underlay.height
2319+ color: "black"
2320+ opacity: 0.5 * ((sideStage.x - sideStageRevealer.closedValue) / (sideStageRevealer.openedValue - sideStageRevealer.closedValue))
2321+ visible: sideStageHideButton.enabled
2322+ }
2323+
2324+ AbstractButton {
2325+ id: sideStageHideButton
2326+ enabled: mainStage.applications.count == 0 && sideStage.shown
2327+ anchors.fill: parent
2328+ onClicked: {
2329+ sideStage.hide();
2330+ }
2331+ }
2332 }
2333 }
2334
2335@@ -230,7 +243,7 @@
2336
2337 width: parent.width
2338 height: parent.height
2339- x: launcher.progress
2340+ x: mainStage.applications.count > 0 ? launcher.progress : 0
2341 Behavior on x {SmoothedAnimation{velocity: 600}}
2342
2343 property real showProgress:
2344@@ -242,6 +255,16 @@
2345
2346 x: width
2347
2348+ function doLauncherHide() {
2349+ if (mainStage.applications.count > 0) {
2350+ hide();
2351+ } else {
2352+ if (sideStage.shown) {
2353+ sideStage.hide();
2354+ }
2355+ }
2356+ }
2357+
2358 property bool fullyShown: shown && x == 0 && parent.x == 0
2359 property bool fullyHidden: !shown && x == width
2360 available: !greeter.shown
2361@@ -326,11 +349,6 @@
2362 rightEdgeDraggingAreaWidth: shell.edgeSize
2363 normalApplicationY: shell.panelHeight
2364
2365- onShownChanged: {
2366- if (!shown && mainStage.applications.count == 0) {
2367- stages.hide();
2368- }
2369- }
2370 // FIXME: when hiding the side stage, refocus the main stage
2371 // application so that it goes in front of the side stage
2372 // application and hides it
2373@@ -355,12 +373,29 @@
2374 width: units.gu(40)
2375 height: stages.height
2376 handleExpanded: sideStageRevealer.pressed
2377+
2378+ Connections {
2379+ target: sideStage.applications
2380+ onCountChanged: {
2381+ if (sideStage.applications.count == 0) {
2382+ if (sideStage.shown) { // if all SS app closed, hide side stage
2383+ sideStage.hide();
2384+ } else {
2385+ // Sidestage is hidden and there is no main app, make sure the
2386+ // stages is totally hidden too
2387+ if (mainStage.applications.count == 0) {
2388+ stages.hideNow();
2389+ }
2390+ }
2391+ }
2392+ }
2393+ }
2394 }
2395
2396 Revealer {
2397 id: sideStageRevealer
2398
2399- enabled: mainStage.applications.count > 0 && sideStage.applications.count > 0
2400+ enabled: sideStage.applications.count > 0
2401 && sideStage.available
2402 direction: Qt.RightToLeft
2403 openedValue: parent.width - sideStage.width
2404@@ -378,6 +413,26 @@
2405 orientation: Qt.Horizontal
2406 }
2407
2408+ // Defines the rectangle occupied by an application on the main or side stage.
2409+ // Used only to inform the ApplicationManager. Can be removed when the proper
2410+ // architecture is in place (unity8 as mir compositor).
2411+ Item {
2412+ id: mainStageAppRect
2413+ x: mainStage.x
2414+ y: mainStage.y + mainStage.normalApplicationY
2415+ width: mainStage.width
2416+ height: mainStage.height
2417+ visible: false; enabled: false
2418+ }
2419+ Item {
2420+ id: sideStageAppRect
2421+ x: sideStageRevealer.openedValue
2422+ y: sideStage.y + sideStage.normalApplicationY
2423+ width: sideStage.width
2424+ height: sideStage.height
2425+ visible: false; enabled: false
2426+ }
2427+
2428 DragHandle {
2429 id: stagesDragHandle
2430
2431@@ -461,7 +516,7 @@
2432 hides: [launcher, panel.indicators, hud]
2433 shown: true
2434
2435- defaultBackground: shell.background
2436+ defaultBackground: shell.defaultBackground
2437
2438 y: panel.panelHeight
2439 width: parent.width
2440@@ -474,7 +529,9 @@
2441
2442 function removeApplicationFocus() {
2443 greeter.previousMainApp = applicationManager.mainStageFocusedApplication;
2444- greeter.previousSideApp = applicationManager.sideStageFocusedApplication;
2445+ if (sideStage.fullyShown) { // if side stage hidden, don't focus it on restore
2446+ greeter.previousSideApp = applicationManager.sideStageFocusedApplication;
2447+ }
2448 applicationManager.unfocusCurrentApplication();
2449 }
2450
2451@@ -543,8 +600,14 @@
2452 }
2453
2454 InputFilterArea {
2455- anchors.fill: parent
2456- blockInput: !applicationFocused || greeter.shown || lockscreen.shown || launcher.shown
2457+ width: {
2458+ if (applicationManager.sideStageFocusedApplication && sideStage.shown)
2459+ return parent.width - sideStage.width;
2460+ else
2461+ return parent.width;
2462+ }
2463+ height: parent.height
2464+ blockInput: !applicationManager.mainStageFocusedApplication || greeter.shown || lockscreen.shown || launcher.shown
2465 || panel.indicators.shown || hud.shown
2466 }
2467
2468@@ -571,7 +634,7 @@
2469 function showHome() {
2470 var animate = !greeter.shown && !stages.shown
2471 greeter.hide()
2472- dash.setCurrentScope("home.scope", animate, false)
2473+ dash.setCurrentScope("clickscope", animate, false)
2474 stages.hide()
2475 }
2476
2477@@ -594,7 +657,7 @@
2478 contentEnabled: edgeDemo.panelContentEnabled
2479 }
2480 fullscreenMode: shell.fullscreenMode
2481- searchVisible: !greeter.shown && !lockscreen.shown && dash.shown
2482+ searchVisible: !greeter.shown && !lockscreen.shown && dash.shown && dash.searchable
2483
2484 InputFilterArea {
2485 anchors {
2486@@ -646,7 +709,7 @@
2487 theHud: hud
2488 anchors.fill: parent
2489 enabled: hud.available
2490- applicationIsOnForeground: applicationFocused
2491+ applicationIsOnForeground: (stages.shown && mainStage.applications.count > 0) || (stages.shown && sideStage.shown)
2492 }
2493
2494 InputFilterArea {
2495@@ -668,7 +731,7 @@
2496 anchors.bottom: parent.bottom
2497 width: parent.width
2498 dragAreaWidth: shell.edgeSize
2499- available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
2500+ available: !greeter.locked && edgeDemo.launcherEnabled
2501
2502 onShowDashHome: {
2503 if (edgeDemo.running)
2504@@ -678,11 +741,11 @@
2505 }
2506 onDash: {
2507 if (stages.shown) {
2508- stages.hide();
2509+ stages.doLauncherHide();
2510 launcher.hide();
2511 }
2512 }
2513- onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
2514+ onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
2515 onLauncherApplicationSelected:{
2516 if (edgeDemo.running)
2517 return;
2518@@ -762,21 +825,6 @@
2519 value: "unity8"
2520 }
2521
2522- OSKController {
2523- anchors.topMargin: panel.panelHeight
2524- anchors.fill: parent // as needs to know the geometry of the shell
2525- }
2526-
2527- //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
2528- MouseArea {
2529- anchors.bottom: parent.bottom
2530- anchors.left: parent.left
2531- anchors.right: parent.right
2532- height: shell.applicationManager ? shell.applicationManager.keyboardHeight : 0
2533-
2534- enabled: shell.applicationManager && shell.applicationManager.keyboardVisible
2535- }
2536-
2537 Label {
2538 anchors.centerIn: parent
2539 visible: applicationManager.fake
2540@@ -797,7 +845,7 @@
2541 launcher: launcher
2542 dash: dash
2543 indicators: panel.indicators
2544- underlay: underlay
2545+ underlay: underlayClipper
2546 }
2547
2548 Connections {
2549
2550=== added file 'qml/ShellOrientator.qml'
2551--- qml/ShellOrientator.qml 1970-01-01 00:00:00 +0000
2552+++ qml/ShellOrientator.qml 2014-03-07 12:41:18 +0000
2553@@ -0,0 +1,43 @@
2554+/*
2555+ * Copyright (C) 2014 Canonical, Ltd.
2556+ *
2557+ * This program is free software; you can redistribute it and/or modify
2558+ * it under the terms of the GNU General Public License as published by
2559+ * the Free Software Foundation; version 3.
2560+ *
2561+ * This program is distributed in the hope that it will be useful,
2562+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2563+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2564+ * GNU General Public License for more details.
2565+ *
2566+ * You should have received a copy of the GNU General Public License
2567+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2568+ */
2569+
2570+import QtQuick 2.0
2571+import QtQuick.Window 2.0
2572+import Unity.Application 0.1
2573+
2574+Item {
2575+ id: orientator
2576+
2577+ // this is only here to select the width / height of the window if not running fullscreen
2578+ property bool tablet: false
2579+ width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
2580+ height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
2581+
2582+ Item {
2583+ anchors.fill: parent
2584+ rotation: Screen.angleBetween(nativeOrientation, Screen.primaryOrientation)
2585+ Shell {
2586+ x: (parent.rotation == 0) ? 0 : (parent.width - parent.height) / 2
2587+ y: (parent.rotation == 0) ? 0 : -(parent.width - parent.height) / 2
2588+ width: (parent.rotation == 0) ? parent.width : parent.height
2589+ height: (parent.rotation == 0) ? parent.height : parent.width
2590+ }
2591+ }
2592+
2593+ OSKController {
2594+ anchors.fill: parent // as needs to know the geometry of the shell
2595+ }
2596+}
2597
2598=== modified file 'src/main.cpp'
2599--- src/main.cpp 2014-02-27 11:54:16 +0000
2600+++ src/main.cpp 2014-03-07 12:41:18 +0000
2601@@ -98,6 +98,16 @@
2602 view->setFlags(Qt::FramelessWindowHint);
2603 }
2604
2605+ const QByteArray orientation = qgetenv("NATIVE_ORIENTATION");
2606+ Qt::ScreenOrientation orientationAngle = Qt::PrimaryOrientation;
2607+ if (orientation == "landscape") {
2608+ orientationAngle = Qt::LandscapeOrientation;
2609+ } else if (!orientation.isEmpty() && orientation != "portrait") {
2610+ qDebug() << "Unknown NATIVE_ORIENTATION setting, ignoring";
2611+ }
2612+
2613+ view->rootContext()->setContextProperty("nativeOrientation", orientationAngle);
2614+
2615 // You will need this if you want to interact with touch-only components using a mouse
2616 // Needed only when manually testing on a desktop.
2617 MouseTouchAdaptor *mouseTouchAdaptor = 0;
2618@@ -115,7 +125,7 @@
2619 nativeInterface->setProperty("ubuntuSessionType", 1);
2620 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
2621
2622- QUrl source(::qmlDirectory()+"Shell.qml");
2623+ QUrl source(::qmlDirectory()+"ShellOrientator.qml");
2624 prependImportPaths(view->engine(), ::overrideImportPaths());
2625 appendImportPaths(view->engine(), ::fallbackImportPaths());
2626
2627
2628=== modified file 'tests/mocks/Unity/fake_unity_plugin.cpp'
2629--- tests/mocks/Unity/fake_unity_plugin.cpp 2014-02-07 09:55:56 +0000
2630+++ tests/mocks/Unity/fake_unity_plugin.cpp 2014-03-07 12:41:18 +0000
2631@@ -48,5 +48,12 @@
2632 qmlRegisterUncreatableType<CategoryResults>(uri, 0, 1, "CategoryResults", "Can't create");
2633 qmlRegisterType<DeeListModel>(uri, 0, 1, "DeeListModel");
2634
2635- qmlRegisterType<scopes_ng::PreviewModel>(uri, 0, 1, "FakePreviewModel");
2636+ // same for version 0.2
2637+ qmlRegisterUncreatableType<Preview>(uri, 0, 2, "Preview", "Can't create Preview object in QML.");
2638+ qmlRegisterType<Scopes>(uri, 0, 2, "Scopes");
2639+ qmlRegisterType<Scope>(uri, 0, 2, "Scope");
2640+ qmlRegisterType<Categories>(uri, 0, 2, "Categories");
2641+ qmlRegisterUncreatableType<CategoryResults>(uri, 0, 2, "CategoryResults", "Can't create");
2642+ qmlRegisterType<DeeListModel>(uri, 0, 2, "DeeListModel");
2643+ qmlRegisterType<scopes_ng::PreviewModel>(uri, 0, 2, "FakePreviewModel");
2644 }
2645
2646=== modified file 'tests/plugins/DashViews/organicgridtest.cpp'
2647--- tests/plugins/DashViews/organicgridtest.cpp 2014-01-14 12:25:52 +0000
2648+++ tests/plugins/DashViews/organicgridtest.cpp 2014-03-07 12:41:18 +0000
2649@@ -134,11 +134,12 @@
2650 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/organicgridtest.qml"));
2651
2652 view->show();
2653+ QTest::qWaitForWindowExposed(view);
2654 view->resize(470, 400);
2655- QTest::qWaitForWindowExposed(view);
2656
2657 grid = dynamic_cast<OrganicGrid*>(view->rootObject()->findChild<QObject*>("grid"));
2658 grid->setModel(model);
2659+ QTRY_COMPARE(grid->width(), 470.);
2660
2661 checkInitialPositions();
2662 }
2663
2664=== modified file 'tests/plugins/DashViews/verticaljournaltest.cpp'
2665--- tests/plugins/DashViews/verticaljournaltest.cpp 2014-01-17 10:08:23 +0000
2666+++ tests/plugins/DashViews/verticaljournaltest.cpp 2014-03-07 12:41:18 +0000
2667@@ -135,11 +135,12 @@
2668 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/verticaljournaltest.qml"));
2669
2670 view->show();
2671- view->resize(470, 400);
2672 QTest::qWaitForWindowExposed(view);
2673+ view->resize(470, 400);
2674
2675 vj = dynamic_cast<VerticalJournal*>(view->rootObject()->findChild<QObject*>("vj"));
2676 vj->setModel(model);
2677+ QTRY_COMPARE(vj->width(), 470.);
2678
2679 checkInitialPositions();
2680 }
2681
2682=== modified file 'tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp'
2683--- tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp 2014-02-24 16:05:07 +0000
2684+++ tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp 2014-03-07 12:41:18 +0000
2685@@ -103,6 +103,14 @@
2686 {
2687 GestureTest::init();
2688
2689+ // We shouldn't need the three lines below, but a compiz/unity7
2690+ // regression means we don't pass the test without them because
2691+ // the window doesn't have the proper size. Can be removed in the
2692+ // future if the regression is fixed and tests pass again
2693+ m_view->resize(m_view->rootObject()->width(), m_view->rootObject()->height());
2694+ QTRY_COMPARE(m_view->width(), (int)m_view->rootObject()->width());
2695+ QTRY_COMPARE(m_view->height(), (int)m_view->rootObject()->height());
2696+
2697 fakeTimeSource.reset(new FakeTimeSource);
2698 fakeTimer = new FakeTimer(fakeTimeSource);
2699 }
2700
2701=== modified file 'tests/qmltests/Dash/Previews/tst_Preview.qml'
2702--- tests/qmltests/Dash/Previews/tst_Preview.qml 2014-02-12 08:22:16 +0000
2703+++ tests/qmltests/Dash/Previews/tst_Preview.qml 2014-03-07 12:41:18 +0000
2704@@ -18,7 +18,7 @@
2705 import QtTest 1.0
2706 import "../../../../qml/Dash/Previews"
2707 import Unity.Test 0.1 as UT
2708-import Unity 0.1 as Unity
2709+import Unity 0.2 as Unity
2710
2711 Rectangle {
2712 id: root
2713
2714=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
2715--- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-02-05 08:20:25 +0000
2716+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-03-07 12:41:18 +0000
2717@@ -301,18 +301,18 @@
2718 }
2719
2720 function test_getRendererCarouselGridFallback() {
2721- var rendererId = "carousel"
2722- var contentType = ""
2723- var rendererHint = ""
2724+ var template = new Object()
2725+ template["category-layout"] = "carousel"
2726 var results = new Object()
2727-
2728- results.count = 7
2729- var renderer = genericScopeView.getRenderer(rendererId, contentType, rendererHint, results)
2730- compare(renderer, "Generic/GenericCarousel.qml")
2731-
2732- results.count = 6
2733- renderer = genericScopeView.getRenderer(rendererId, contentType, rendererHint, results)
2734- compare(renderer, "Generic/GenericFilterGrid.qml")
2735+ var renderer
2736+
2737+ results.count = 5
2738+ renderer = genericScopeView.getRenderer(template, results)
2739+ compare(renderer, "CardCarousel.qml")
2740+
2741+ results.count = 4
2742+ renderer = genericScopeView.getRenderer(template, results)
2743+ compare(renderer, "CardFilterGrid.qml")
2744 }
2745
2746 function test_showPreviewCarousel() {
2747
2748=== modified file 'tools/registry-tracker.cpp'
2749--- tools/registry-tracker.cpp 2013-12-20 15:27:59 +0000
2750+++ tools/registry-tracker.cpp 2014-03-07 12:41:18 +0000
2751@@ -112,5 +112,6 @@
2752 QStringList arguments;
2753 arguments << m_runtime_config.fileName();
2754
2755+ m_registry.setProcessChannelMode(QProcess::ForwardedChannels);
2756 m_registry.start(registryBin, arguments);
2757 }

Subscribers

People subscribed via source and target branches