Merge lp:~cimi/unity8/card_touchdown into lp:unity8

Proposed by Andrea Cimitan
Status: Rejected
Rejected by: Michał Sawicz
Proposed branch: lp:~cimi/unity8/card_touchdown
Merge into: lp:unity8
Diff against target: 605 lines (+232/-145)
9 files modified
plugins/Dash/CardCreator.js (+21/-1)
tests/plugins/Dash/cardcreator/1.res (+40/-32)
tests/plugins/Dash/cardcreator/2.res (+60/-51)
tests/plugins/Dash/cardcreator/3.res (+36/-28)
tests/plugins/Dash/cardcreator/4.res (+39/-31)
tests/plugins/Dash/cardcreator/5.res (+8/-0)
tests/plugins/Dash/cardcreator/6.res (+8/-0)
tests/plugins/Dash/cardcreatortest.cpp (+8/-2)
tests/qmltests/Dash/tst_Card.qml (+12/-0)
To merge this branch: bzr merge lp:~cimi/unity8/card_touchdown
Reviewer Review Type Date Requested Status
Michał Sawicz Disapprove
Albert Astals Cid (community) Abstain
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+221113@code.launchpad.net

Commit message

Add touchdown effect

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
Nope
 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
 * Did you make sure that your branch does not contain spurious tags?
Yes
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
 * If you changed the UI, has there been a design review?
Nope, but is consistent with the rest of the OS

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~cimi/unity8/card_touchdown updated
920. By Andrea Cimitan

Merged trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

This has the unfortunate problem of making a problem we have in the App cards (the art overflows the arth holder) very obvious, so i don't think we should merge this before fixing the other issue.

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

@Albert, not sure what you mean, it looks fine for app cards?

Hmm I think we need more design guidance here. The different way in which the touchdown happens depending on card layout is weird.

It's most visible in horizontal, where only the art shows the effect, even when you're tapping outside of it.

Also, there should be snap animation on when this kicks in.

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

Ah indeed, visible with settings app icon, for example, which is of different aspect ratio.

Revision history for this message
Albert Astals Cid (aacid) wrote :

The mismatch in the touchdown vs icon is fixed by https://code.launchpad.net/~aacid/unity8/obeyArtShapeFixedSize/+merge/222294 in case that one gets approved

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~cimi/unity8/card_touchdown updated
921. By Andrea Cimitan

Merged albert branch with fixes for icon size

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Hey, I recorded the touchdown effect on all the different card configs we have and we'd need a few answers probably...

http://people.canonical.com/~msawicz/unity8/screencast_00000.mp4

We need some rules as to what should be affected by the push-down effect (just the art, background force background when there's none etc.).

Revision history for this message
Michał Sawicz (saviq) wrote :
lp:~cimi/unity8/card_touchdown updated
922. By Andrea Cimitan

New effect

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~cimi/unity8/card_touchdown updated
923. By Andrea Cimitan

[ Michał Sawicz ]
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Albert Astals ]
* Add VerticalJournal integration to Dash/scopes/QML (LP: #1326467)
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Mirco Müller ]
* Added the frontend-part of sound-hint support for notifications with
  updated QML-tests.
* New rebuild forced
[ Albert Astals ]
* Departments support (LP: #1320847)
[ Pawel Stolowski ]
* Extend the hack for click scope categories with the upcoming 'store'
  category: single-tap on results from the 'store' category should
  activate them, instead of requesting a preview. (LP: #1326292)
[ Albert Astals ]
* Drop the " Preview" suffix from Preview title As requested in
  https://bugs.launchpad.net/unity8/+bug/1316671 (LP: #1316671)
[ Michael Terry ]
* Revert split greeter for now. We will bring it back as an option
  for Desktop, but use a big hammer revert right now to get Touch back
  in shape.
[ CI bot ]
* Fix build problems. Reviewed by: Michael Terry (LP: #1328850)
[ Michał Sawicz ]
* Make lockscreen buttons translatable.
[ Albert Astals ]
* Correctly mark these functions as overrides
* Remove connections to non existant signal
* Better test name
* Improvements for headerless categories LVPWH: No section name -> no
  header LVPWH: New hasSectionHeader context property for delegates
  GSV: Add topMargin if no hasSectionHeader (LP: #1326415)
* Make tryVerticalJournal, tryHorizontalJournal and tryOrganicGrid
  work again
[ Michael Zanetti ]
* Don't crash when we get an invalid app from ApplicationManager (LP:
  #1309162)
[ Andrea Cimitan ]
* Workaround for lp1324159 (LP: #1322233, #1324159)
[ CI bot ]
* Resync trunk
[ Florian Boucault ]
* Application startup: changed splash rectangle to be black instead of
  white and added a neat little animation. (LP: #1124265)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Looks like you got trailing space cleared from the .res files...

Other than that looks fine, with one not-needed newline (see inline).

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/plugins/Dash/cardcreator/1.res
Text conflict in tests/plugins/Dash/cardcreator/2.res
Text conflict in tests/plugins/Dash/cardcreator/3.res
Text conflict in tests/plugins/Dash/cardcreator/4.res
4 conflicts encountered.

review: Needs Fixing
lp:~cimi/unity8/card_touchdown updated
924. By Andrea Cimitan

[ thomas-voss ]
* Explicitly select gcc version.
[ Michael Terry ]
* Allow running the dialer-app in emergency mode when the screen is
  locked.
[ Michał Sawicz ]
* Add missing nameOwner property to mock UnityMenuModel.
[ Albert Astals ]
* Fix name, There's nothing called pageHeader in this file
[ Nick Dedekind ]
* Added environment variable to upstart conf for mir trusted socket
* Removed indicator menu dismissal on menu activation (LP: #1337771)
[ Michał Sawicz ]
* Only generate .qmltypes files manually, no need to do it build-time.
  It didn't work when cross-compiling either, and required builders to
  have otherwise unnecessary environment.
* Fix CardCreator test. It got broken with a merge that got landed
  along side of it.
[ Ying-Chun Liu ]
* Add reboot/shutdown (LP: #1234062)
[ Albert Astals ]
* Make the departments test more stable
[ Mirco Müller ]
* Fixes gap at top of sim-unlock/fullscreen notification (point 1.),
  fixes blocking overlay if underlying UnityMenuModel vanishes from
  DBus (point 2.). The third bullet-point of the bug-report, lockup of
  shell-UI, could not be reproduced. (LP: #1308011)
[ Michael Terry ]
* Expose a new greeter DBus property, IsActive, which tells apps and
  indicators when the integrated-greeter screen is active. Useful for
  switching UI modes when the screen is locked.
* Allow the session to bring up the greeter/lockscreen over DBus. The
  emergency dialer will need this support in order to cancel bringing
  it up.
[ Michael Zanetti ]
* Fixes gap at top of sim-unlock/fullscreen notification (point 1.),
  fixes blocking overlay if underlying UnityMenuModel vanishes from
  DBus (point 2.). The third bullet-point of the bug-report, lockup of
  shell-UI, could not be reproduced. (LP: #1308011)
[ Michał Sawicz ]
* Activate all results in click scope by default. (LP: #1341262)
[ Mirco Müller ]
* Added support for utilization of the ComboButton SDK-element for
  snap-decision notifications with many actions.
[ Michal Hruby ]
* Fix FTBFS when using latest unity-api.
[ Michał Sawicz ]
* Refactor carousel item activation.
* Refactor ScopeItem into GenericScopeView.
* Add initial support for scope customizations.
* Make rating stars in PreviewReviewDisplay.qml non-interactive. (LP:
  #1337508)
[ Nick Dedekind ]
* Added active call hint A hint is displayed in the indicator panel
  when an call is active on the Telephony Serivce
[ Albert Astals ]
* We need to boostrap height also when we have 1 item ^_^ (LP:
  #1337408)
* Add initial support for scope customizations.
* CardCreator: Give a correct implicitHeight if we only have art The
  hasSubtitle change is really unrelated and not needed here, just
  sneaking it in to not create yet another review. (LP: #1330899)
* Fake Scopes Plugin: Register PreviewModelInterface
[ Michael Zanetti ]
* make the launcher's drag'n'drop indicator more prominent (LP:
  #1332042)
* make launcher items live having them non-live is not really required
  and reveals an issue in combination with UbuntuShape (LP: #1302761)
* Fade out launcher in place instead of moving it to the left on long
  left edge swipes. (LP: #1332096)
* update launcher icon glow as requested by design (LP: #1336725)
* update header in dash to use the new header from the SDK (LP:
  #1335491)
* fix testPreview with larger GRID_UNIT_PX values
* clip the corner of pinned icons in the launcher as per new design
* update launcher background according to latest design (LP: #1336314)
* Update Launcher's home button design according to new spec. (LP:
  #1329331)
[ CI bot ]
* make launcher items live having them non-live is not really required
  and reveals an issue in combination with UbuntuShape (LP: #1302761)
[ Nick Dedekind ]
* Added support for TransferMenu
[ Michał Sawicz ]
* Initial code for a payment button widget, to handle purchasing apps
  from the click scope.
[ Nick Dedekind ]
* Moved [Message]MenuItemFacotory from Unity.Indicators plugin to qml
  folder.
[ Albert Astals ]
* EasingCurve: Initialize members
* Fix valgrind warning by not emitting reset on model destructor That
  won't be supported until Qt 5.4 More info at https://bugreports.qt-
  project.org/browse/QTBUG-39780 Warning was ==16693== Invalid read of
  size 8 ==16693== at 0x72B19A0: QQmlContext::isValid() const
  (qqmlcontext.cpp:231) ==16693== by 0x736C82B:
  QQmlDelegateModelPrivate::emitChanges() (qqmldelegatemodel.cpp:1412)
  ==16693== by 0x7372AE6: QQmlDelegateModel::_q_modelReset()
  (qqmldelegatemodel.cpp:1463) ==16693== by 0x7397224:
  QQmlDelegateModel::qt_static_metacall(QObject*, QMetaObject::Call,
  int, void**) (moc_qqmldelegatemodel_p.cpp:196) ==16693== by
  0x739769E: QQmlDelegateModel::qt_metacall(QMetaObject::Call, int,
  void**) (moc_qqmldelegatemodel_p.cpp:292) ==16693== by 0x66379CC:
  QMetaObject::activate(QObject*, int, int, void**) (in
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==16693== by
  0x65AEEFD: QAbstractItemModel::endResetModel() (in /usr/lib/x86_64-
  linux-gnu/libQt5Core.so.5.3.0) ==16693== by 0x23461EFD:
  FakeIndicatorsModel::unload() (fakeindicatorsmodel.cpp:53) ==16693==
  by 0x23461E13: FakeIndicatorsModel::~FakeIndicatorsModel()
  (fakeindicatorsmodel.cpp:34) ==16693== by 0x2345C073:
  QQmlPrivate::QQmlElement<FakeIndicatorsModel>::~QQmlElement() (in
  /home/tsdgeos_work/phablet/unity8/investigate_test_shell_crash/build
  dir/tests/mocks/Unity/Indicators/libIndicatorsFakeQml.so) ==16693==
  by 0x2345C0A3:
  QQmlPrivate::QQmlElement<FakeIndicatorsModel>::~QQmlElement()
  (qqmlprivate.h:106) ==16693== by 0x663636B:
  QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-
  gnu/libQt5Core.so.5.3.0) ==16693== Address 0x1862d448 is 8 bytes
  inside a block of size 16 free'd ==16693== at 0x4C2C2BC: operator
  delete(void*) (vg_replace_malloc.c:503) ==16693== by 0x72B21B8:
  QQmlContextData::destroy() (qqmlcontext.cpp:647) ==16693== by
  0x7293458: QQmlPrivate::qdeclarativeelement_destructor(QObject*)
  (qqmlengine.cpp:612) ==16693== by 0x6C0CADD:
  QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement()
  (qqmlprivate.h:105) ==16693== by 0x663636B:
  QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-
  gnu/libQt5Core.so.5.3.0) ==16693== by 0x663F0EB: QObject::~QObject()
  (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==16693== by
  0x6BF64B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064) ==16693==
  by 0x6C0CAE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement()
  (qqmlprivate.h:106) ==16693== by 0x663636B:
  QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-
  gnu/libQt5Core.so.5.3.0) ==16693== by 0x663F0EB: QObject::~QObject()
  (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==16693== by
  0x6BF64B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064) ==16693==
  by 0x6C0CAE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement()
  (qqmlprivate.h:106) (LP: #1332598)
[ Michael Zanetti ]
* drop launcher item spacing (LP: #1332022)
* change wording in launcher quicklist (LP: #1332035)
[ Alejandro J. Cura ]
* Initial code for a payment button widget, to handle purchasing apps
  from the click scope.
[ Rodney Dawes ]
* Initial code for a payment button widget, to handle purchasing apps
  from the click scope.
[ Renato Araujo Oliveira Filho ]
* Create IndicatorsLight.qml component used to control indicator led.
  A blue led will pulse if the message indicator is blue and screen is
  off.
* debian/control:
  list qtdeclarative5-ubuntu-ui-toolkit-plugin-gles as an alternative
  choice, since provides are not versionned, should restore installability
  on amd64 and i386
[ Michał Sawicz ]
* Adapt to suru theme.
[ Michael Terry ]
* Fix path in launcher mock after moving our mock icons, to avoid a
  lot of "icon not found" warnings during qmluitests.
* Fix the testMultiGreeter qmluitest. Incoming method variables are
  apparently read-only in Qt5.3. (LP: #1332488)
[ CI bot ]
* Resync trunk
[ Michał Sawicz ]
* Adapt scope mock to new api and quiet unused variable warnings.
* Fix dynamic overlay height. (LP: #1334879)
* Don't center items in CardVerticalJournal, kind of beats the
  purpose... Also don't bind unnecessarily.
[ Ying-Chun Liu ]
* Fix LP:1330957 Fix some failed test cases. (LP: #1330957)
[ Albert Astals ]
* Don't seem to need this waitForRendering And makes test fail in 5.3
[ Alberto Aguirre ]
* Update Powerd plugin and Shell.qml to accommodate changes in the
  display power state notification.
[ Ying-Chun Liu ]
* Add logout support. Reviewed by: Daniel d'Andrada (LP: #1302213)

925. By Andrea Cimitan

Removed newline

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Merge fixed

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

Unmerged revisions

925. By Andrea Cimitan

Removed newline

924. By Andrea Cimitan

[ thomas-voss ]
* Explicitly select gcc version.
[ Michael Terry ]
* Allow running the dialer-app in emergency mode when the screen is
  locked.
[ Michał Sawicz ]
* Add missing nameOwner property to mock UnityMenuModel.
[ Albert Astals ]
* Fix name, There's nothing called pageHeader in this file
[ Nick Dedekind ]
* Added environment variable to upstart conf for mir trusted socket
* Removed indicator menu dismissal on menu activation (LP: #1337771)
[ Michał Sawicz ]
* Only generate .qmltypes files manually, no need to do it build-time.
  It didn't work when cross-compiling either, and required builders to
  have otherwise unnecessary environment.
* Fix CardCreator test. It got broken with a merge that got landed
  along side of it.
[ Ying-Chun Liu ]
* Add reboot/shutdown (LP: #1234062)
[ Albert Astals ]
* Make the departments test more stable
[ Mirco Müller ]
* Fixes gap at top of sim-unlock/fullscreen notification (point 1.),
  fixes blocking overlay if underlying UnityMenuModel vanishes from
  DBus (point 2.). The third bullet-point of the bug-report, lockup of
  shell-UI, could not be reproduced. (LP: #1308011)
[ Michael Terry ]
* Expose a new greeter DBus property, IsActive, which tells apps and
  indicators when the integrated-greeter screen is active. Useful for
  switching UI modes when the screen is locked.
* Allow the session to bring up the greeter/lockscreen over DBus. The
  emergency dialer will need this support in order to cancel bringing
  it up.
[ Michael Zanetti ]
* Fixes gap at top of sim-unlock/fullscreen notification (point 1.),
  fixes blocking overlay if underlying UnityMenuModel vanishes from
  DBus (point 2.). The third bullet-point of the bug-report, lockup of
  shell-UI, could not be reproduced. (LP: #1308011)
[ Michał Sawicz ]
* Activate all results in click scope by default. (LP: #1341262)
[ Mirco Müller ]
* Added support for utilization of the ComboButton SDK-element for
  snap-decision notifications with many actions.
[ Michal Hruby ]
* Fix FTBFS when using latest unity-api.
[ Michał Sawicz ]
* Refactor carousel item activation.
* Refactor ScopeItem into GenericScopeView.
* Add initial support for scope customizations.
* Make rating stars in PreviewReviewDisplay.qml non-interactive. (LP:
  #1337508)
[ Nick Dedekind ]
* Added active call hint A hint is displayed in the indicator panel
  when an call is active on the Telephony Serivce
[ Albert Astals ]
* We need to boostrap height also when we have 1 item ^_^ (LP:
  #1337408)
* Add initial support for scope customizations.
* CardCreator: Give a correct implicitHeight if we only have art The
  hasSubtitle change is really unrelated and not needed here, just
  sneaking it in to not create yet another review. (LP: #1330899)
* Fake Scopes Plugin: Register PreviewModelInterface
[ Michael Zanetti ]
* make the launcher's drag'n'drop indicator more prominent (LP:
  #1332042)
* make launcher items live having them non-live is not really required
  and reveals an issue in combination with UbuntuShape (LP: #1302761)
* Fade out launcher in place instead of moving it to the left on long
  left edge swipes. (LP: #1332096)
* update launcher icon glow as requested by design (LP: #1336725)
* update header in dash to use the new header from the SDK (LP:
  #1335491)
* fix testPreview with larger GRID_UNIT_PX values
* clip the corner of pinned icons in the launcher as per new design
* update launcher background according to latest design (LP: #1336314)
* Update Launcher's home button design according to new spec. (LP:
  #1329331)
[ CI bot ]
* make launcher items live having them non-live is not really required
  and reveals an issue in combination with UbuntuShape (LP: #1302761)
[ Nick Dedekind ]
* Added support for TransferMenu
[ Michał Sawicz ]
* Initial code for a payment button widget, to handle purchasing apps
  from the click scope.
[ Nick Dedekind ]
* Moved [Message]MenuItemFacotory from Unity.Indicators plugin to qml
  folder.
[ Albert Astals ]
* EasingCurve: Initialize members
* Fix valgrind warning by not emitting reset on model destructor That
  won't be supported until Qt 5.4 More info at https://bugreports.qt-
  project.org/browse/QTBUG-39780 Warning was ==16693== Invalid read of
  size 8 ==16693== at 0x72B19A0: QQmlContext::isValid() const
  (qqmlcontext.cpp:231) ==16693== by 0x736C82B:
  QQmlDelegateModelPrivate::emitChanges() (qqmldelegatemodel.cpp:1412)
  ==16693== by 0x7372AE6: QQmlDelegateModel::_q_modelReset()
  (qqmldelegatemodel.cpp:1463) ==16693== by 0x7397224:
  QQmlDelegateModel::qt_static_metacall(QObject*, QMetaObject::Call,
  int, void**) (moc_qqmldelegatemodel_p.cpp:196) ==16693== by
  0x739769E: QQmlDelegateModel::qt_metacall(QMetaObject::Call, int,
  void**) (moc_qqmldelegatemodel_p.cpp:292) ==16693== by 0x66379CC:
  QMetaObject::activate(QObject*, int, int, void**) (in
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==16693== by
  0x65AEEFD: QAbstractItemModel::endResetModel() (in /usr/lib/x86_64-
  linux-gnu/libQt5Core.so.5.3.0) ==16693== by 0x23461EFD:
  FakeIndicatorsModel::unload() (fakeindicatorsmodel.cpp:53) ==16693==
  by 0x23461E13: FakeIndicatorsModel::~FakeIndicatorsModel()
  (fakeindicatorsmodel.cpp:34) ==16693== by 0x2345C073:
  QQmlPrivate::QQmlElement<FakeIndicatorsModel>::~QQmlElement() (in
  /home/tsdgeos_work/phablet/unity8/investigate_test_shell_crash/build
  dir/tests/mocks/Unity/Indicators/libIndicatorsFakeQml.so) ==16693==
  by 0x2345C0A3:
  QQmlPrivate::QQmlElement<FakeIndicatorsModel>::~QQmlElement()
  (qqmlprivate.h:106) ==16693== by 0x663636B:
  QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-
  gnu/libQt5Core.so.5.3.0) ==16693== Address 0x1862d448 is 8 bytes
  inside a block of size 16 free'd ==16693== at 0x4C2C2BC: operator
  delete(void*) (vg_replace_malloc.c:503) ==16693== by 0x72B21B8:
  QQmlContextData::destroy() (qqmlcontext.cpp:647) ==16693== by
  0x7293458: QQmlPrivate::qdeclarativeelement_destructor(QObject*)
  (qqmlengine.cpp:612) ==16693== by 0x6C0CADD:
  QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement()
  (qqmlprivate.h:105) ==16693== by 0x663636B:
  QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-
  gnu/libQt5Core.so.5.3.0) ==16693== by 0x663F0EB: QObject::~QObject()
  (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==16693== by
  0x6BF64B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064) ==16693==
  by 0x6C0CAE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement()
  (qqmlprivate.h:106) ==16693== by 0x663636B:
  QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-
  gnu/libQt5Core.so.5.3.0) ==16693== by 0x663F0EB: QObject::~QObject()
  (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==16693== by
  0x6BF64B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064) ==16693==
  by 0x6C0CAE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement()
  (qqmlprivate.h:106) (LP: #1332598)
[ Michael Zanetti ]
* drop launcher item spacing (LP: #1332022)
* change wording in launcher quicklist (LP: #1332035)
[ Alejandro J. Cura ]
* Initial code for a payment button widget, to handle purchasing apps
  from the click scope.
[ Rodney Dawes ]
* Initial code for a payment button widget, to handle purchasing apps
  from the click scope.
[ Renato Araujo Oliveira Filho ]
* Create IndicatorsLight.qml component used to control indicator led.
  A blue led will pulse if the message indicator is blue and screen is
  off.
* debian/control:
  list qtdeclarative5-ubuntu-ui-toolkit-plugin-gles as an alternative
  choice, since provides are not versionned, should restore installability
  on amd64 and i386
[ Michał Sawicz ]
* Adapt to suru theme.
[ Michael Terry ]
* Fix path in launcher mock after moving our mock icons, to avoid a
  lot of "icon not found" warnings during qmluitests.
* Fix the testMultiGreeter qmluitest. Incoming method variables are
  apparently read-only in Qt5.3. (LP: #1332488)
[ CI bot ]
* Resync trunk
[ Michał Sawicz ]
* Adapt scope mock to new api and quiet unused variable warnings.
* Fix dynamic overlay height. (LP: #1334879)
* Don't center items in CardVerticalJournal, kind of beats the
  purpose... Also don't bind unnecessarily.
[ Ying-Chun Liu ]
* Fix LP:1330957 Fix some failed test cases. (LP: #1330957)
[ Albert Astals ]
* Don't seem to need this waitForRendering And makes test fail in 5.3
[ Alberto Aguirre ]
* Update Powerd plugin and Shell.qml to accommodate changes in the
  display power state notification.
[ Ying-Chun Liu ]
* Add logout support. Reviewed by: Daniel d'Andrada (LP: #1302213)

923. By Andrea Cimitan

[ Michał Sawicz ]
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Albert Astals ]
* Add VerticalJournal integration to Dash/scopes/QML (LP: #1326467)
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Mirco Müller ]
* Added the frontend-part of sound-hint support for notifications with
  updated QML-tests.
* New rebuild forced
[ Albert Astals ]
* Departments support (LP: #1320847)
[ Pawel Stolowski ]
* Extend the hack for click scope categories with the upcoming 'store'
  category: single-tap on results from the 'store' category should
  activate them, instead of requesting a preview. (LP: #1326292)
[ Albert Astals ]
* Drop the " Preview" suffix from Preview title As requested in
  https://bugs.launchpad.net/unity8/+bug/1316671 (LP: #1316671)
[ Michael Terry ]
* Revert split greeter for now. We will bring it back as an option
  for Desktop, but use a big hammer revert right now to get Touch back
  in shape.
[ CI bot ]
* Fix build problems. Reviewed by: Michael Terry (LP: #1328850)
[ Michał Sawicz ]
* Make lockscreen buttons translatable.
[ Albert Astals ]
* Correctly mark these functions as overrides
* Remove connections to non existant signal
* Better test name
* Improvements for headerless categories LVPWH: No section name -> no
  header LVPWH: New hasSectionHeader context property for delegates
  GSV: Add topMargin if no hasSectionHeader (LP: #1326415)
* Make tryVerticalJournal, tryHorizontalJournal and tryOrganicGrid
  work again
[ Michael Zanetti ]
* Don't crash when we get an invalid app from ApplicationManager (LP:
  #1309162)
[ Andrea Cimitan ]
* Workaround for lp1324159 (LP: #1322233, #1324159)
[ CI bot ]
* Resync trunk
[ Florian Boucault ]
* Application startup: changed splash rectangle to be black instead of
  white and added a neat little animation. (LP: #1124265)

922. By Andrea Cimitan

New effect

921. By Andrea Cimitan

Merged albert branch with fixes for icon size

920. By Andrea Cimitan

Merged trunk

919. By Andrea Cimitan

Fixed tests and holder shape

918. By Andrea Cimitan

Added touchdown effect and tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/CardCreator.js'
2--- plugins/Dash/CardCreator.js 2014-07-09 19:44:44 +0000
3+++ plugins/Dash/CardCreator.js 2014-07-24 16:23:16 +0000
4@@ -224,7 +224,7 @@
5 }\n';
6
7 // %1 is used as anchors of titleLabel
8-// %1 is used as color of titleLabel
9+// %2 is used as color of titleLabel
10 // %3 is used as extra condition for visible of titleLabel
11 var kTitleLabelCode = 'Label { \n\
12 id: titleLabel; \n\
13@@ -242,6 +242,16 @@
14 horizontalAlignment: root.headerAlignment; \n\
15 }\n';
16
17+// %1 is used as anchors of touchdown effect
18+var kTouchdownCode = 'UbuntuShape { \n\
19+ id: touchdown; \n\
20+ objectName: "touchdown"; \n\
21+ anchors { %1 } \n\
22+ visible: root.pressed; \n\
23+ radius: "medium"; \n\
24+ borderSource: "radius_pressed.sci" \n\
25+ }\n';
26+
27 // %1 is used as anchors of subtitleLabel
28 // %2 is used as color of subtitleLabel
29 var kSubtitleLabelCode = 'Label { \n\
30@@ -504,6 +514,16 @@
31 code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(color);
32 }
33
34+ var touchdownAnchors;
35+ if (hasBackground) {
36+ touchdownAnchors = 'fill: backgroundLoader';
37+ } else if (hasArt && !hasMascot && !hasSummary) {
38+ touchdownAnchors = 'fill: artShapeHolder';
39+ } else {
40+ touchdownAnchors = 'fill: root'
41+ }
42+ code += kTouchdownCode.arg(touchdownAnchors);
43+
44 if (hasSummary) {
45 code += 'implicitHeight: summary.y + summary.height + (summary.text ? units.gu(1) : 0);\n';
46 } else if (hasHeaderRow) {
47
48=== modified file 'tests/plugins/Dash/cardcreator/1.res'
49--- tests/plugins/Dash/cardcreator/1.res 2014-07-08 12:37:34 +0000
50+++ tests/plugins/Dash/cardcreator/1.res 2014-07-24 16:23:16 +0000
51@@ -15,59 +15,59 @@
52 implicitWidth: childrenRect.width;
53 onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
54 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
55-Item {
56- id: artShapeHolder;
57+Item {
58+ id: artShapeHolder;
59 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
60 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
61 anchors { horizontalCenter: parent.horizontalCenter; }
62- Loader {
63- id: artShapeLoader;
64- objectName: "artShapeLoader";
65- active: cardData && cardData["art"] || false;
66- asynchronous: root.asynchronous;
67- visible: status == Loader.Ready;
68- sourceComponent: UbuntuShape {
69- id: artShape;
70- objectName: "artShape";
71+ Loader {
72+ id: artShapeLoader;
73+ objectName: "artShapeLoader";
74+ active: cardData && cardData["art"] || false;
75+ asynchronous: root.asynchronous;
76+ visible: status == Loader.Ready;
77+ sourceComponent: UbuntuShape {
78+ id: artShape;
79+ objectName: "artShape";
80 radius: "medium";
81- visible: image.status == Image.Ready;
82+ visible: image.status == Image.Ready;
83 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
84 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
85 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
86 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
87 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
88 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
89- function updateWidthHeightBindings() {
90+ function updateWidthHeightBindings() {
91 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
92 width = root.fixedArtShapeSize.width;
93 height = root.fixedArtShapeSize.height;
94 } else if (aspectSmallerThanImageAspect) {
95- width = Qt.binding(function() { return !visible ? 0 : image.width });
96- height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect });
97- } else {
98- width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
99- height = Qt.binding(function() { return !visible ? 0 : image.height });
100- }
101- }
102- image: Image {
103- objectName: "artImage";
104- source: cardData && cardData["art"] || "";
105- cache: true;
106- asynchronous: root.asynchronous;
107- fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
108- readonly property real aspect: implicitWidth / implicitHeight;
109- width: root.width;
110+ width = Qt.binding(function() { return !visible ? 0 : image.width });
111+ height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect });
112+ } else {
113+ width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
114+ height = Qt.binding(function() { return !visible ? 0 : image.height });
115+ }
116+ }
117+ image: Image {
118+ objectName: "artImage";
119+ source: cardData && cardData["art"] || "";
120+ cache: true;
121+ asynchronous: root.asynchronous;
122+ fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
123+ readonly property real aspect: implicitWidth / implicitHeight;
124+ width: root.width;
125 height: width / artShape.aspect;
126- }
127- }
128- }
129+ }
130+ }
131+ }
132 }
133 readonly property int headerHeight: titleLabel.height;
134 Label {
135 id: titleLabel;
136 objectName: "titleLabel";
137 anchors { right: parent.right;left: parent.left;
138-top: artShapeHolder.bottom;
139+top: artShapeHolder.bottom;
140 topMargin: units.gu(1);
141 leftMargin: units.gu(1);
142 }
143@@ -82,5 +82,13 @@
144 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
145 horizontalAlignment: root.headerAlignment;
146 }
147+UbuntuShape {
148+ id: touchdown;
149+ objectName: "touchdown";
150+ anchors { fill: artShapeHolder }
151+ visible: root.pressed;
152+ radius: "medium";
153+ borderSource: "radius_pressed.sci"
154+}
155 implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
156 }
157
158=== modified file 'tests/plugins/Dash/cardcreator/2.res'
159--- tests/plugins/Dash/cardcreator/2.res 2014-07-08 12:53:51 +0000
160+++ tests/plugins/Dash/cardcreator/2.res 2014-07-24 16:23:16 +0000
161@@ -14,37 +14,37 @@
162 property bool showHeader: true;
163 implicitWidth: childrenRect.width;
164 Loader {
165- id: backgroundLoader;
166- objectName: "backgroundLoader";
167- anchors.fill: parent;
168- asynchronous: root.asynchronous;
169- visible: status == Loader.Ready;
170- sourceComponent: UbuntuShape {
171- objectName: "background";
172- radius: "medium";
173- color: getColor(0) || "white";
174- gradientColor: getColor(1) || color;
175- anchors.fill: parent;
176- image: backgroundImage.source ? backgroundImage : null;
177- property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b;
178- property Image backgroundImage: Image {
179- objectName: "backgroundImage";
180- source: {
181- if (cardData && typeof cardData["background"] === "string") return cardData["background"];
182- else if (template && typeof template["card-background"] === "string") return template["card-background"];
183- else return "";
184- }
185- }
186- function getColor(index) {
187- if (cardData && typeof cardData["background"] === "object"
188- && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
189- return cardData["background"]["elements"][index];
190- } else if (template && typeof template["card-background"] === "object"
191- && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
192- return template["card-background"]["elements"][index];
193- } else return undefined;
194- }
195- }
196+ id: backgroundLoader;
197+ objectName: "backgroundLoader";
198+ anchors.fill: parent;
199+ asynchronous: root.asynchronous;
200+ visible: status == Loader.Ready;
201+ sourceComponent: UbuntuShape {
202+ objectName: "background";
203+ radius: "medium";
204+ color: getColor(0) || "white";
205+ gradientColor: getColor(1) || color;
206+ anchors.fill: parent;
207+ image: backgroundImage.source ? backgroundImage : null;
208+ property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b;
209+ property Image backgroundImage: Image {
210+ objectName: "backgroundImage";
211+ source: {
212+ if (cardData && typeof cardData["background"] === "string") return cardData["background"];
213+ else if (template && typeof template["card-background"] === "string") return template["card-background"];
214+ else return "";
215+ }
216+ }
217+ function getColor(index) {
218+ if (cardData && typeof cardData["background"] === "object"
219+ && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
220+ return cardData["background"]["elements"][index];
221+ } else if (template && typeof template["card-background"] === "object"
222+ && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
223+ return template["card-background"]["elements"][index];
224+ } else return undefined;
225+ }
226+ }
227 }
228 readonly property size artShapeSize: Qt.size(-1, -1);
229 readonly property int headerHeight: row.height;
230@@ -58,28 +58,29 @@
231 topMargin: units.gu(1);
232 left: parent.left;
233 }
234- anchors.right: parent.right;
235+ anchors.right: parent.right;
236 anchors.margins: margins;
237-data: [ Image {
238- id: mascotImage;
239- objectName: "mascotImage";
240+data: [ Image {
241+ id: mascotImage;
242+ objectName: "mascotImage";
243 anchors { verticalCenter: parent.verticalCenter; }
244- readonly property int maxSize: Math.max(width, height) * 4;
245- source: cardData && cardData["mascot"];
246- width: units.gu(6);
247- height: units.gu(5.625);
248- sourceSize { width: maxSize; height: maxSize }
249- fillMode: Image.PreserveAspectCrop;
250- horizontalAlignment: Image.AlignHCenter;
251- verticalAlignment: Image.AlignVCenter;
252- visible: showHeader;
253+ readonly property int maxSize: Math.max(width, height) * 4;
254+ source: cardData && cardData["mascot"];
255+ width: units.gu(6);
256+ height: units.gu(5.625);
257+ sourceSize { width: maxSize; height: maxSize }
258+ fillMode: Image.PreserveAspectCrop;
259+ horizontalAlignment: Image.AlignHCenter;
260+ verticalAlignment: Image.AlignVCenter;
261+ visible: showHeader;
262 }
263 ,
264-Column {
265- anchors.verticalCenter: parent.verticalCenter;
266- spacing: units.dp(2);
267+Column {
268+ anchors.verticalCenter: parent.verticalCenter;
269+ spacing: units.dp(2);
270 width: parent.width - x;
271- data: [ Label {
272+ data: [
273+Label {
274 id: titleLabel;
275 objectName: "titleLabel";
276 anchors { left: parent.left; right: parent.right }
277@@ -95,9 +96,9 @@
278 horizontalAlignment: root.headerAlignment;
279 }
280 ,
281-Label {
282- id: subtitleLabel;
283- objectName: "subtitleLabel";
284+Label {
285+ id: subtitleLabel;
286+ objectName: "subtitleLabel";
287 anchors { left: parent.left; right: parent.right }
288
289 elide: Text.ElideRight;
290@@ -113,5 +114,13 @@
291 }
292 ]
293 }
294+UbuntuShape {
295+ id: touchdown;
296+ objectName: "touchdown";
297+ anchors { fill: backgroundLoader }
298+ visible: root.pressed;
299+ radius: "medium";
300+ borderSource: "radius_pressed.sci"
301+}
302 implicitHeight: row.y + row.height + units.gu(1);
303 }
304
305=== modified file 'tests/plugins/Dash/cardcreator/3.res'
306--- tests/plugins/Dash/cardcreator/3.res 2014-07-08 12:37:34 +0000
307+++ tests/plugins/Dash/cardcreator/3.res 2014-07-24 16:23:16 +0000
308@@ -15,22 +15,22 @@
309 implicitWidth: childrenRect.width;
310 onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
311 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
312-Item {
313- id: artShapeHolder;
314+Item {
315+ id: artShapeHolder;
316 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
317 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
318 anchors { horizontalCenter: parent.horizontalCenter; }
319- Loader {
320- id: artShapeLoader;
321- objectName: "artShapeLoader";
322- active: cardData && cardData["art"] || false;
323- asynchronous: root.asynchronous;
324- visible: status == Loader.Ready;
325- sourceComponent: UbuntuShape {
326- id: artShape;
327- objectName: "artShape";
328- radius: "medium";
329- visible: image.status == Image.Ready;
330+ Loader {
331+ id: artShapeLoader;
332+ objectName: "artShapeLoader";
333+ active: cardData && cardData["art"] || false;
334+ asynchronous: root.asynchronous;
335+ visible: status == Loader.Ready;
336+ sourceComponent: UbuntuShape {
337+ id: artShape;
338+ objectName: "artShape";
339+ radius: "medium";
340+ visible: image.status == Image.Ready;
341 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
342 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
343 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
344@@ -48,26 +48,26 @@
345 width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
346 height = Qt.binding(function() { return !visible ? 0 : image.height });
347 }
348- }
349- image: Image {
350- objectName: "artImage";
351- source: cardData && cardData["art"] || "";
352- cache: true;
353- asynchronous: root.asynchronous;
354- fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
355- readonly property real aspect: implicitWidth / implicitHeight;
356- width: root.width;
357+ }
358+ image: Image {
359+ objectName: "artImage";
360+ source: cardData && cardData["art"] || "";
361+ cache: true;
362+ asynchronous: root.asynchronous;
363+ fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
364+ readonly property real aspect: implicitWidth / implicitHeight;
365+ width: root.width;
366 height: width / artShape.aspect;
367- }
368- }
369- }
370+ }
371+ }
372+ }
373 }
374 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
375 Label {
376 id: titleLabel;
377 objectName: "titleLabel";
378 anchors { right: parent.right;left: parent.left;
379-top: artShapeHolder.bottom;
380+top: artShapeHolder.bottom;
381 topMargin: units.gu(1);
382 leftMargin: units.gu(1);
383 }
384@@ -82,6 +82,7 @@
385 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
386 horizontalAlignment: root.headerAlignment;
387 }
388+
389 Label {
390 id: subtitleLabel;
391 objectName: "subtitleLabel";
392@@ -89,8 +90,7 @@
393 leftMargin: titleLabel.leftMargin;
394 right: titleLabel.right;
395 top: titleLabel.bottom;
396- topMargin: units.dp(2);
397- }
398+ topMargin: units.dp(2); }
399 elide: Text.ElideRight;
400 fontSize: "small";
401 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
402@@ -100,5 +100,13 @@
403 font.weight: Font.Light;
404 horizontalAlignment: root.headerAlignment;
405 }
406+UbuntuShape {
407+ id: touchdown;
408+ objectName: "touchdown";
409+ anchors { fill: artShapeHolder }
410+ visible: root.pressed;
411+ radius: "medium";
412+ borderSource: "radius_pressed.sci"
413+}
414 implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
415 }
416
417=== modified file 'tests/plugins/Dash/cardcreator/4.res'
418--- tests/plugins/Dash/cardcreator/4.res 2014-07-08 12:37:34 +0000
419+++ tests/plugins/Dash/cardcreator/4.res 2014-07-24 16:23:16 +0000
420@@ -25,44 +25,44 @@
421 topMargin: units.gu(1);
422 left: parent.left;
423 }
424- anchors.right: parent.right;
425+ anchors.right: parent.right;
426 anchors.margins: margins;
427-data: [ Loader {
428- id: mascotShapeLoader;
429- objectName: "mascotShapeLoader";
430- asynchronous: root.asynchronous;
431- active: mascotImage.status === Image.Ready;
432- visible: showHeader && active && status == Loader.Ready;
433- width: units.gu(6);
434- height: units.gu(5.625);
435- sourceComponent: UbuntuShape { image: mascotImage }
436+data: [ Loader {
437+ id: mascotShapeLoader;
438+ objectName: "mascotShapeLoader";
439+ asynchronous: root.asynchronous;
440+ active: mascotImage.status === Image.Ready;
441+ visible: showHeader && active && status == Loader.Ready;
442+ width: units.gu(6);
443+ height: units.gu(5.625);
444+ sourceComponent: UbuntuShape { image: mascotImage }
445 anchors { verticalCenter: parent.verticalCenter; }
446 }
447
448 ,
449-Image {
450- id: mascotImage;
451- objectName: "mascotImage";
452+Image {
453+ id: mascotImage;
454+ objectName: "mascotImage";
455 anchors { verticalCenter: parent.verticalCenter; }
456- readonly property int maxSize: Math.max(width, height) * 4;
457- source: cardData && cardData["mascot"];
458- width: units.gu(6);
459- height: units.gu(5.625);
460- sourceSize { width: maxSize; height: maxSize }
461- fillMode: Image.PreserveAspectCrop;
462- horizontalAlignment: Image.AlignHCenter;
463- verticalAlignment: Image.AlignVCenter;
464- visible: false;
465+ readonly property int maxSize: Math.max(width, height) * 4;
466+ source: cardData && cardData["mascot"];
467+ width: units.gu(6);
468+ height: units.gu(5.625);
469+ sourceSize { width: maxSize; height: maxSize }
470+ fillMode: Image.PreserveAspectCrop;
471+ horizontalAlignment: Image.AlignHCenter;
472+ verticalAlignment: Image.AlignVCenter;
473+ visible: false;
474 }
475
476 ,
477-Column {
478- anchors.verticalCenter: parent.verticalCenter;
479- spacing: units.dp(2);
480+Column {
481+ anchors.verticalCenter: parent.verticalCenter;
482+ spacing: units.dp(2);
483 width: parent.width - x;
484-data: [ Label {
485- id: titleLabel;
486- objectName: "titleLabel";
487+data: [ Label {
488+ id: titleLabel;
489+ objectName: "titleLabel";
490 anchors { left: parent.left; right: parent.right }
491 elide: Text.ElideRight;
492 fontSize: "small";
493@@ -76,9 +76,9 @@
494 horizontalAlignment: root.headerAlignment;
495 }
496 ,
497-Label {
498- id: subtitleLabel;
499- objectName: "subtitleLabel";
500+Label {
501+ id: subtitleLabel;
502+ objectName: "subtitleLabel";
503 anchors { left: parent.left; right: parent.right }
504
505 elide: Text.ElideRight;
506@@ -94,5 +94,13 @@
507 }
508 ]
509 }
510+UbuntuShape {
511+ id: touchdown;
512+ objectName: "touchdown";
513+ anchors { fill: root }
514+ visible: root.pressed;
515+ radius: "medium";
516+ borderSource: "radius_pressed.sci"
517+}
518 implicitHeight: row.y + row.height + units.gu(1);
519 }
520
521=== modified file 'tests/plugins/Dash/cardcreator/5.res'
522--- tests/plugins/Dash/cardcreator/5.res 2014-07-08 12:37:34 +0000
523+++ tests/plugins/Dash/cardcreator/5.res 2014-07-24 16:23:16 +0000
524@@ -141,5 +141,13 @@
525 font.weight: Font.Light;
526 horizontalAlignment: root.headerAlignment;
527 }
528+UbuntuShape {
529+ id: touchdown;
530+ objectName: "touchdown";
531+ anchors { fill: artShapeHolder }
532+ visible: root.pressed;
533+ radius: "medium";
534+ borderSource: "radius_pressed.sci"
535+}
536 implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
537 }
538
539=== modified file 'tests/plugins/Dash/cardcreator/6.res'
540--- tests/plugins/Dash/cardcreator/6.res 2014-07-10 18:03:16 +0000
541+++ tests/plugins/Dash/cardcreator/6.res 2014-07-24 16:23:16 +0000
542@@ -63,5 +63,13 @@
543 }
544 }
545 readonly property int headerHeight: 0;
546+UbuntuShape {
547+ id: touchdown;
548+ objectName: "touchdown";
549+ anchors { fill: artShapeHolder }
550+ visible: root.pressed;
551+ radius: "medium";
552+ borderSource: "radius_pressed.sci"
553+}
554 implicitHeight: artShapeHolder.height;
555 }
556
557=== modified file 'tests/plugins/Dash/cardcreatortest.cpp'
558--- tests/plugins/Dash/cardcreatortest.cpp 2014-05-06 13:09:08 +0000
559+++ tests/plugins/Dash/cardcreatortest.cpp 2014-07-24 16:23:16 +0000
560@@ -19,6 +19,7 @@
561 #include <QQuickItem>
562 #include <QQuickView>
563 #include <QtTestGui>
564+#include <QDebug>
565
566 class CardCreatorTest : public QObject
567 {
568@@ -73,8 +74,13 @@
569 QFile testResultFile(testDirPath + resultFileName);
570 QVERIFY(testResultFile.open(QIODevice::ReadOnly));
571 QTextStream ts2(&testResultFile);
572- const QString expectedResult = ts2.readAll();
573- QCOMPARE(cardStringResult.toString().simplified(), expectedResult.simplified());
574+ const QStringList expectedLines = ts2.readAll().trimmed().replace(QRegExp("\n\\s*\n"),"\n").split("\n");
575+ const QStringList cardStringResultLines = cardStringResult.toString().trimmed().replace(QRegExp("\n\\s*\n"),"\n").split("\n");
576+ //QCOMPARE(cardStringResultLines.size(), expectedLines.size());
577+ for (int i = 0; i < expectedLines.size(); ++i) {
578+ //qDebug() << cardStringResultLines[i].simplified() << expectedLines[i].simplified();
579+ QCOMPARE(cardStringResultLines[i].simplified(), expectedLines[i].simplified());
580+ }
581
582 QVariant createCardComponentResult;
583 QMetaObject::invokeMethod(view->rootObject(), "createCardComponent", Q_RETURN_ARG(QVariant, createCardComponentResult), Q_ARG(QVariant, templateJSON), Q_ARG(QVariant, componentsJSON));
584
585=== modified file 'tests/qmltests/Dash/tst_Card.qml'
586--- tests/qmltests/Dash/tst_Card.qml 2014-06-27 08:47:04 +0000
587+++ tests/qmltests/Dash/tst_Card.qml 2014-07-24 16:23:16 +0000
588@@ -473,5 +473,17 @@
589 compare(shape !== null, data.shape);
590 tryCompare(mascotImage, "visible", !data.shape);
591 }
592+
593+ function test_touchdown_visibility() {
594+ selector.selectedIndex = 0;
595+
596+ var touchdown = findChild(card, "touchdown");
597+
598+ compare(touchdown.visible, false);
599+ mousePress(card, card.width/2, card.height/2);
600+ compare(touchdown.visible, true);
601+ mouseRelease(card, card.width/2, card.height/2);
602+ compare(touchdown.visible, false);
603+ }
604 }
605 }

Subscribers

People subscribed via source and target branches