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
=== modified file 'plugins/Dash/CardCreator.js'
--- plugins/Dash/CardCreator.js 2014-07-09 19:44:44 +0000
+++ plugins/Dash/CardCreator.js 2014-07-24 16:23:16 +0000
@@ -224,7 +224,7 @@
224 }\n';224 }\n';
225225
226// %1 is used as anchors of titleLabel226// %1 is used as anchors of titleLabel
227// %1 is used as color of titleLabel227// %2 is used as color of titleLabel
228// %3 is used as extra condition for visible of titleLabel228// %3 is used as extra condition for visible of titleLabel
229var kTitleLabelCode = 'Label { \n\229var kTitleLabelCode = 'Label { \n\
230 id: titleLabel; \n\230 id: titleLabel; \n\
@@ -242,6 +242,16 @@
242 horizontalAlignment: root.headerAlignment; \n\242 horizontalAlignment: root.headerAlignment; \n\
243 }\n';243 }\n';
244244
245// %1 is used as anchors of touchdown effect
246var kTouchdownCode = 'UbuntuShape { \n\
247 id: touchdown; \n\
248 objectName: "touchdown"; \n\
249 anchors { %1 } \n\
250 visible: root.pressed; \n\
251 radius: "medium"; \n\
252 borderSource: "radius_pressed.sci" \n\
253 }\n';
254
245// %1 is used as anchors of subtitleLabel255// %1 is used as anchors of subtitleLabel
246// %2 is used as color of subtitleLabel256// %2 is used as color of subtitleLabel
247var kSubtitleLabelCode = 'Label { \n\257var kSubtitleLabelCode = 'Label { \n\
@@ -504,6 +514,16 @@
504 code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(color);514 code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(color);
505 }515 }
506516
517 var touchdownAnchors;
518 if (hasBackground) {
519 touchdownAnchors = 'fill: backgroundLoader';
520 } else if (hasArt && !hasMascot && !hasSummary) {
521 touchdownAnchors = 'fill: artShapeHolder';
522 } else {
523 touchdownAnchors = 'fill: root'
524 }
525 code += kTouchdownCode.arg(touchdownAnchors);
526
507 if (hasSummary) {527 if (hasSummary) {
508 code += 'implicitHeight: summary.y + summary.height + (summary.text ? units.gu(1) : 0);\n';528 code += 'implicitHeight: summary.y + summary.height + (summary.text ? units.gu(1) : 0);\n';
509 } else if (hasHeaderRow) {529 } else if (hasHeaderRow) {
510530
=== modified file 'tests/plugins/Dash/cardcreator/1.res'
--- tests/plugins/Dash/cardcreator/1.res 2014-07-08 12:37:34 +0000
+++ tests/plugins/Dash/cardcreator/1.res 2014-07-24 16:23:16 +0000
@@ -15,59 +15,59 @@
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } 16onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18Item { 18Item {
19 id: artShapeHolder; 19 id: artShapeHolder;
20 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;20 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
21 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;21 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
22 anchors { horizontalCenter: parent.horizontalCenter; }22 anchors { horizontalCenter: parent.horizontalCenter; }
23 Loader { 23 Loader {
24 id: artShapeLoader; 24 id: artShapeLoader;
25 objectName: "artShapeLoader"; 25 objectName: "artShapeLoader";
26 active: cardData && cardData["art"] || false; 26 active: cardData && cardData["art"] || false;
27 asynchronous: root.asynchronous; 27 asynchronous: root.asynchronous;
28 visible: status == Loader.Ready; 28 visible: status == Loader.Ready;
29 sourceComponent: UbuntuShape { 29 sourceComponent: UbuntuShape {
30 id: artShape; 30 id: artShape;
31 objectName: "artShape"; 31 objectName: "artShape";
32 radius: "medium";32 radius: "medium";
33 visible: image.status == Image.Ready; 33 visible: image.status == Image.Ready;
34 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;34 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
35 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;35 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
36 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;36 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
37 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }37 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
38 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();38 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
39 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }39 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
40 function updateWidthHeightBindings() { 40 function updateWidthHeightBindings() {
41 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {41 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
42 width = root.fixedArtShapeSize.width;42 width = root.fixedArtShapeSize.width;
43 height = root.fixedArtShapeSize.height;43 height = root.fixedArtShapeSize.height;
44 } else if (aspectSmallerThanImageAspect) {44 } else if (aspectSmallerThanImageAspect) {
45 width = Qt.binding(function() { return !visible ? 0 : image.width }); 45 width = Qt.binding(function() { return !visible ? 0 : image.width });
46 height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect }); 46 height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect });
47 } else { 47 } else {
48 width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect }); 48 width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
49 height = Qt.binding(function() { return !visible ? 0 : image.height }); 49 height = Qt.binding(function() { return !visible ? 0 : image.height });
50 } 50 }
51 } 51 }
52 image: Image { 52 image: Image {
53 objectName: "artImage"; 53 objectName: "artImage";
54 source: cardData && cardData["art"] || ""; 54 source: cardData && cardData["art"] || "";
55 cache: true; 55 cache: true;
56 asynchronous: root.asynchronous; 56 asynchronous: root.asynchronous;
57 fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; 57 fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
58 readonly property real aspect: implicitWidth / implicitHeight; 58 readonly property real aspect: implicitWidth / implicitHeight;
59 width: root.width; 59 width: root.width;
60 height: width / artShape.aspect;60 height: width / artShape.aspect;
61 } 61 }
62 } 62 }
63 } 63 }
64 }64 }
65readonly property int headerHeight: titleLabel.height;65readonly property int headerHeight: titleLabel.height;
66Label { 66Label {
67 id: titleLabel; 67 id: titleLabel;
68 objectName: "titleLabel"; 68 objectName: "titleLabel";
69 anchors { right: parent.right;left: parent.left;69 anchors { right: parent.right;left: parent.left;
70top: artShapeHolder.bottom; 70top: artShapeHolder.bottom;
71 topMargin: units.gu(1);71 topMargin: units.gu(1);
72leftMargin: units.gu(1);72leftMargin: units.gu(1);
73 }73 }
@@ -82,5 +82,13 @@
82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; 82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
83 horizontalAlignment: root.headerAlignment; 83 horizontalAlignment: root.headerAlignment;
84 }84 }
85UbuntuShape {
86 id: touchdown;
87 objectName: "touchdown";
88 anchors { fill: artShapeHolder }
89 visible: root.pressed;
90 radius: "medium";
91 borderSource: "radius_pressed.sci"
92}
85implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);93implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
86}94}
8795
=== modified file 'tests/plugins/Dash/cardcreator/2.res'
--- tests/plugins/Dash/cardcreator/2.res 2014-07-08 12:53:51 +0000
+++ tests/plugins/Dash/cardcreator/2.res 2014-07-24 16:23:16 +0000
@@ -14,37 +14,37 @@
14 property bool showHeader: true; 14 property bool showHeader: true;
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16Loader {16Loader {
17 id: backgroundLoader; 17 id: backgroundLoader;
18 objectName: "backgroundLoader"; 18 objectName: "backgroundLoader";
19 anchors.fill: parent; 19 anchors.fill: parent;
20 asynchronous: root.asynchronous; 20 asynchronous: root.asynchronous;
21 visible: status == Loader.Ready; 21 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape { 22 sourceComponent: UbuntuShape {
23 objectName: "background"; 23 objectName: "background";
24 radius: "medium"; 24 radius: "medium";
25 color: getColor(0) || "white"; 25 color: getColor(0) || "white";
26 gradientColor: getColor(1) || color; 26 gradientColor: getColor(1) || color;
27 anchors.fill: parent; 27 anchors.fill: parent;
28 image: backgroundImage.source ? backgroundImage : null; 28 image: backgroundImage.source ? backgroundImage : null;
29 property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b; 29 property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b;
30 property Image backgroundImage: Image { 30 property Image backgroundImage: Image {
31 objectName: "backgroundImage"; 31 objectName: "backgroundImage";
32 source: { 32 source: {
33 if (cardData && typeof cardData["background"] === "string") return cardData["background"]; 33 if (cardData && typeof cardData["background"] === "string") return cardData["background"];
34 else if (template && typeof template["card-background"] === "string") return template["card-background"]; 34 else if (template && typeof template["card-background"] === "string") return template["card-background"];
35 else return ""; 35 else return "";
36 } 36 }
37 } 37 }
38 function getColor(index) { 38 function getColor(index) {
39 if (cardData && typeof cardData["background"] === "object" 39 if (cardData && typeof cardData["background"] === "object"
40 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) { 40 && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
41 return cardData["background"]["elements"][index]; 41 return cardData["background"]["elements"][index];
42 } else if (template && typeof template["card-background"] === "object" 42 } else if (template && typeof template["card-background"] === "object"
43 && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) { 43 && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
44 return template["card-background"]["elements"][index]; 44 return template["card-background"]["elements"][index];
45 } else return undefined; 45 } else return undefined;
46 } 46 }
47 } 47 }
48 }48 }
49readonly property size artShapeSize: Qt.size(-1, -1);49readonly property size artShapeSize: Qt.size(-1, -1);
50readonly property int headerHeight: row.height;50readonly property int headerHeight: row.height;
@@ -58,28 +58,29 @@
58 topMargin: units.gu(1);58 topMargin: units.gu(1);
59 left: parent.left;59 left: parent.left;
60}60}
61 anchors.right: parent.right; 61 anchors.right: parent.right;
62 anchors.margins: margins;62 anchors.margins: margins;
63data: [ Image { 63data: [ Image {
64 id: mascotImage; 64 id: mascotImage;
65 objectName: "mascotImage"; 65 objectName: "mascotImage";
66 anchors { verticalCenter: parent.verticalCenter; }66 anchors { verticalCenter: parent.verticalCenter; }
67 readonly property int maxSize: Math.max(width, height) * 4; 67 readonly property int maxSize: Math.max(width, height) * 4;
68 source: cardData && cardData["mascot"]; 68 source: cardData && cardData["mascot"];
69 width: units.gu(6); 69 width: units.gu(6);
70 height: units.gu(5.625); 70 height: units.gu(5.625);
71 sourceSize { width: maxSize; height: maxSize } 71 sourceSize { width: maxSize; height: maxSize }
72 fillMode: Image.PreserveAspectCrop; 72 fillMode: Image.PreserveAspectCrop;
73 horizontalAlignment: Image.AlignHCenter; 73 horizontalAlignment: Image.AlignHCenter;
74 verticalAlignment: Image.AlignVCenter; 74 verticalAlignment: Image.AlignVCenter;
75 visible: showHeader; 75 visible: showHeader;
76 }76 }
77,77,
78Column { 78Column {
79 anchors.verticalCenter: parent.verticalCenter; 79 anchors.verticalCenter: parent.verticalCenter;
80 spacing: units.dp(2); 80 spacing: units.dp(2);
81 width: parent.width - x;81 width: parent.width - x;
82 data: [ Label {82 data: [
83Label {
83 id: titleLabel; 84 id: titleLabel;
84 objectName: "titleLabel"; 85 objectName: "titleLabel";
85 anchors { left: parent.left; right: parent.right }86 anchors { left: parent.left; right: parent.right }
@@ -95,9 +96,9 @@
95 horizontalAlignment: root.headerAlignment; 96 horizontalAlignment: root.headerAlignment;
96 }97 }
97,98,
98Label { 99Label {
99 id: subtitleLabel; 100 id: subtitleLabel;
100 objectName: "subtitleLabel"; 101 objectName: "subtitleLabel";
101 anchors { left: parent.left; right: parent.right }102 anchors { left: parent.left; right: parent.right }
102103
103 elide: Text.ElideRight; 104 elide: Text.ElideRight;
@@ -113,5 +114,13 @@
113}114}
114]115]
115}116}
117UbuntuShape {
118 id: touchdown;
119 objectName: "touchdown";
120 anchors { fill: backgroundLoader }
121 visible: root.pressed;
122 radius: "medium";
123 borderSource: "radius_pressed.sci"
124}
116implicitHeight: row.y + row.height + units.gu(1);125implicitHeight: row.y + row.height + units.gu(1);
117}126}
118127
=== modified file 'tests/plugins/Dash/cardcreator/3.res'
--- tests/plugins/Dash/cardcreator/3.res 2014-07-08 12:37:34 +0000
+++ tests/plugins/Dash/cardcreator/3.res 2014-07-24 16:23:16 +0000
@@ -15,22 +15,22 @@
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } 16onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18Item { 18Item {
19 id: artShapeHolder; 19 id: artShapeHolder;
20 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;20 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
21 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;21 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
22 anchors { horizontalCenter: parent.horizontalCenter; }22 anchors { horizontalCenter: parent.horizontalCenter; }
23 Loader { 23 Loader {
24 id: artShapeLoader; 24 id: artShapeLoader;
25 objectName: "artShapeLoader"; 25 objectName: "artShapeLoader";
26 active: cardData && cardData["art"] || false; 26 active: cardData && cardData["art"] || false;
27 asynchronous: root.asynchronous; 27 asynchronous: root.asynchronous;
28 visible: status == Loader.Ready; 28 visible: status == Loader.Ready;
29 sourceComponent: UbuntuShape { 29 sourceComponent: UbuntuShape {
30 id: artShape; 30 id: artShape;
31 objectName: "artShape"; 31 objectName: "artShape";
32 radius: "medium"; 32 radius: "medium";
33 visible: image.status == Image.Ready; 33 visible: image.status == Image.Ready;
34 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;34 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
35 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;35 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
36 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;36 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
@@ -48,26 +48,26 @@
48 width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });48 width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
49 height = Qt.binding(function() { return !visible ? 0 : image.height });49 height = Qt.binding(function() { return !visible ? 0 : image.height });
50 }50 }
51 } 51 }
52 image: Image { 52 image: Image {
53 objectName: "artImage"; 53 objectName: "artImage";
54 source: cardData && cardData["art"] || ""; 54 source: cardData && cardData["art"] || "";
55 cache: true; 55 cache: true;
56 asynchronous: root.asynchronous; 56 asynchronous: root.asynchronous;
57 fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; 57 fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
58 readonly property real aspect: implicitWidth / implicitHeight; 58 readonly property real aspect: implicitWidth / implicitHeight;
59 width: root.width; 59 width: root.width;
60 height: width / artShape.aspect;60 height: width / artShape.aspect;
61 } 61 }
62 } 62 }
63 } 63 }
64 }64 }
65readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;65readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
66Label { 66Label {
67 id: titleLabel; 67 id: titleLabel;
68 objectName: "titleLabel"; 68 objectName: "titleLabel";
69 anchors { right: parent.right;left: parent.left;69 anchors { right: parent.right;left: parent.left;
70top: artShapeHolder.bottom; 70top: artShapeHolder.bottom;
71 topMargin: units.gu(1);71 topMargin: units.gu(1);
72leftMargin: units.gu(1);72leftMargin: units.gu(1);
73}73}
@@ -82,6 +82,7 @@
82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; 82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
83 horizontalAlignment: root.headerAlignment; 83 horizontalAlignment: root.headerAlignment;
84 }84 }
85
85Label { 86Label {
86 id: subtitleLabel; 87 id: subtitleLabel;
87 objectName: "subtitleLabel"; 88 objectName: "subtitleLabel";
@@ -89,8 +90,7 @@
89 leftMargin: titleLabel.leftMargin; 90 leftMargin: titleLabel.leftMargin;
90 right: titleLabel.right; 91 right: titleLabel.right;
91 top: titleLabel.bottom; 92 top: titleLabel.bottom;
92 topMargin: units.dp(2);93 topMargin: units.dp(2); }
93 }
94 elide: Text.ElideRight; 94 elide: Text.ElideRight;
95 fontSize: "small"; 95 fontSize: "small";
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); 96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
@@ -100,5 +100,13 @@
100 font.weight: Font.Light; 100 font.weight: Font.Light;
101 horizontalAlignment: root.headerAlignment; 101 horizontalAlignment: root.headerAlignment;
102 }102 }
103UbuntuShape {
104 id: touchdown;
105 objectName: "touchdown";
106 anchors { fill: artShapeHolder }
107 visible: root.pressed;
108 radius: "medium";
109 borderSource: "radius_pressed.sci"
110}
103implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);111implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
104}112}
105113
=== modified file 'tests/plugins/Dash/cardcreator/4.res'
--- tests/plugins/Dash/cardcreator/4.res 2014-07-08 12:37:34 +0000
+++ tests/plugins/Dash/cardcreator/4.res 2014-07-24 16:23:16 +0000
@@ -25,44 +25,44 @@
25 topMargin: units.gu(1);25 topMargin: units.gu(1);
26 left: parent.left;26 left: parent.left;
27}27}
28 anchors.right: parent.right; 28 anchors.right: parent.right;
29 anchors.margins: margins;29 anchors.margins: margins;
30data: [ Loader { 30data: [ Loader {
31 id: mascotShapeLoader; 31 id: mascotShapeLoader;
32 objectName: "mascotShapeLoader"; 32 objectName: "mascotShapeLoader";
33 asynchronous: root.asynchronous; 33 asynchronous: root.asynchronous;
34 active: mascotImage.status === Image.Ready; 34 active: mascotImage.status === Image.Ready;
35 visible: showHeader && active && status == Loader.Ready; 35 visible: showHeader && active && status == Loader.Ready;
36 width: units.gu(6); 36 width: units.gu(6);
37 height: units.gu(5.625); 37 height: units.gu(5.625);
38 sourceComponent: UbuntuShape { image: mascotImage } 38 sourceComponent: UbuntuShape { image: mascotImage }
39 anchors { verticalCenter: parent.verticalCenter; }39 anchors { verticalCenter: parent.verticalCenter; }
40 }40 }
4141
42,42,
43Image { 43Image {
44 id: mascotImage; 44 id: mascotImage;
45 objectName: "mascotImage"; 45 objectName: "mascotImage";
46 anchors { verticalCenter: parent.verticalCenter; }46 anchors { verticalCenter: parent.verticalCenter; }
47 readonly property int maxSize: Math.max(width, height) * 4; 47 readonly property int maxSize: Math.max(width, height) * 4;
48 source: cardData && cardData["mascot"]; 48 source: cardData && cardData["mascot"];
49 width: units.gu(6); 49 width: units.gu(6);
50 height: units.gu(5.625); 50 height: units.gu(5.625);
51 sourceSize { width: maxSize; height: maxSize } 51 sourceSize { width: maxSize; height: maxSize }
52 fillMode: Image.PreserveAspectCrop; 52 fillMode: Image.PreserveAspectCrop;
53 horizontalAlignment: Image.AlignHCenter; 53 horizontalAlignment: Image.AlignHCenter;
54 verticalAlignment: Image.AlignVCenter; 54 verticalAlignment: Image.AlignVCenter;
55 visible: false; 55 visible: false;
56 }56 }
5757
58,58,
59Column { 59Column {
60 anchors.verticalCenter: parent.verticalCenter; 60 anchors.verticalCenter: parent.verticalCenter;
61 spacing: units.dp(2); 61 spacing: units.dp(2);
62 width: parent.width - x;62 width: parent.width - x;
63data: [ Label { 63data: [ Label {
64 id: titleLabel; 64 id: titleLabel;
65 objectName: "titleLabel"; 65 objectName: "titleLabel";
66 anchors { left: parent.left; right: parent.right }66 anchors { left: parent.left; right: parent.right }
67 elide: Text.ElideRight; 67 elide: Text.ElideRight;
68 fontSize: "small"; 68 fontSize: "small";
@@ -76,9 +76,9 @@
76 horizontalAlignment: root.headerAlignment; 76 horizontalAlignment: root.headerAlignment;
77 }77 }
78,78,
79Label { 79Label {
80 id: subtitleLabel; 80 id: subtitleLabel;
81 objectName: "subtitleLabel"; 81 objectName: "subtitleLabel";
82 anchors { left: parent.left; right: parent.right }82 anchors { left: parent.left; right: parent.right }
8383
84 elide: Text.ElideRight; 84 elide: Text.ElideRight;
@@ -94,5 +94,13 @@
94}94}
95]95]
96}96}
97UbuntuShape {
98 id: touchdown;
99 objectName: "touchdown";
100 anchors { fill: root }
101 visible: root.pressed;
102 radius: "medium";
103 borderSource: "radius_pressed.sci"
104}
97implicitHeight: row.y + row.height + units.gu(1);105implicitHeight: row.y + row.height + units.gu(1);
98}106}
99107
=== modified file 'tests/plugins/Dash/cardcreator/5.res'
--- tests/plugins/Dash/cardcreator/5.res 2014-07-08 12:37:34 +0000
+++ tests/plugins/Dash/cardcreator/5.res 2014-07-24 16:23:16 +0000
@@ -141,5 +141,13 @@
141 font.weight: Font.Light; 141 font.weight: Font.Light;
142 horizontalAlignment: root.headerAlignment; 142 horizontalAlignment: root.headerAlignment;
143 }143 }
144UbuntuShape {
145 id: touchdown;
146 objectName: "touchdown";
147 anchors { fill: artShapeHolder }
148 visible: root.pressed;
149 radius: "medium";
150 borderSource: "radius_pressed.sci"
151}
144implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);152implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
145}153}
146154
=== modified file 'tests/plugins/Dash/cardcreator/6.res'
--- tests/plugins/Dash/cardcreator/6.res 2014-07-10 18:03:16 +0000
+++ tests/plugins/Dash/cardcreator/6.res 2014-07-24 16:23:16 +0000
@@ -63,5 +63,13 @@
63 }63 }
64 }64 }
65readonly property int headerHeight: 0;65readonly property int headerHeight: 0;
66UbuntuShape {
67 id: touchdown;
68 objectName: "touchdown";
69 anchors { fill: artShapeHolder }
70 visible: root.pressed;
71 radius: "medium";
72 borderSource: "radius_pressed.sci"
73}
66implicitHeight: artShapeHolder.height;74implicitHeight: artShapeHolder.height;
67}75}
6876
=== modified file 'tests/plugins/Dash/cardcreatortest.cpp'
--- tests/plugins/Dash/cardcreatortest.cpp 2014-05-06 13:09:08 +0000
+++ tests/plugins/Dash/cardcreatortest.cpp 2014-07-24 16:23:16 +0000
@@ -19,6 +19,7 @@
19#include <QQuickItem>19#include <QQuickItem>
20#include <QQuickView>20#include <QQuickView>
21#include <QtTestGui>21#include <QtTestGui>
22#include <QDebug>
2223
23class CardCreatorTest : public QObject24class CardCreatorTest : public QObject
24{25{
@@ -73,8 +74,13 @@
73 QFile testResultFile(testDirPath + resultFileName);74 QFile testResultFile(testDirPath + resultFileName);
74 QVERIFY(testResultFile.open(QIODevice::ReadOnly));75 QVERIFY(testResultFile.open(QIODevice::ReadOnly));
75 QTextStream ts2(&testResultFile);76 QTextStream ts2(&testResultFile);
76 const QString expectedResult = ts2.readAll();77 const QStringList expectedLines = ts2.readAll().trimmed().replace(QRegExp("\n\\s*\n"),"\n").split("\n");
77 QCOMPARE(cardStringResult.toString().simplified(), expectedResult.simplified());78 const QStringList cardStringResultLines = cardStringResult.toString().trimmed().replace(QRegExp("\n\\s*\n"),"\n").split("\n");
79 //QCOMPARE(cardStringResultLines.size(), expectedLines.size());
80 for (int i = 0; i < expectedLines.size(); ++i) {
81 //qDebug() << cardStringResultLines[i].simplified() << expectedLines[i].simplified();
82 QCOMPARE(cardStringResultLines[i].simplified(), expectedLines[i].simplified());
83 }
7884
79 QVariant createCardComponentResult;85 QVariant createCardComponentResult;
80 QMetaObject::invokeMethod(view->rootObject(), "createCardComponent", Q_RETURN_ARG(QVariant, createCardComponentResult), Q_ARG(QVariant, templateJSON), Q_ARG(QVariant, componentsJSON));86 QMetaObject::invokeMethod(view->rootObject(), "createCardComponent", Q_RETURN_ARG(QVariant, createCardComponentResult), Q_ARG(QVariant, templateJSON), Q_ARG(QVariant, componentsJSON));
8187
=== modified file 'tests/qmltests/Dash/tst_Card.qml'
--- tests/qmltests/Dash/tst_Card.qml 2014-06-27 08:47:04 +0000
+++ tests/qmltests/Dash/tst_Card.qml 2014-07-24 16:23:16 +0000
@@ -473,5 +473,17 @@
473 compare(shape !== null, data.shape);473 compare(shape !== null, data.shape);
474 tryCompare(mascotImage, "visible", !data.shape);474 tryCompare(mascotImage, "visible", !data.shape);
475 }475 }
476
477 function test_touchdown_visibility() {
478 selector.selectedIndex = 0;
479
480 var touchdown = findChild(card, "touchdown");
481
482 compare(touchdown.visible, false);
483 mousePress(card, card.width/2, card.height/2);
484 compare(touchdown.visible, true);
485 mouseRelease(card, card.width/2, card.height/2);
486 compare(touchdown.visible, false);
487 }
476 }488 }
477}489}

Subscribers

People subscribed via source and target branches