Merge lp:~cimi/unity8/sdk1.3_newUbuntuShape into lp:~aacid/unity8/use_sdk_13

Proposed by Andrea Cimitan
Status: Superseded
Proposed branch: lp:~cimi/unity8/sdk1.3_newUbuntuShape
Merge into: lp:~aacid/unity8/use_sdk_13
Diff against target: 801 lines (+115/-169)
21 files modified
plugins/Dash/CardCreator.js (+20/-46)
qml/Components/LazyImage.qml (+5/-6)
qml/Dash/CardCarousel.qml (+1/-1)
qml/Dash/Previews/PreviewAudioPlayback.qml (+1/-1)
qml/Dash/Previews/PreviewHeader.qml (+4/-4)
qml/Dash/ScopesListCategoryItem.qml (+2/-2)
qml/Launcher/LauncherDelegate.qml (+5/-6)
qml/Launcher/LauncherPanel.qml (+2/-2)
qml/Notifications/Notification.qml (+6/-6)
qml/Notifications/OptionToggle.qml (+2/-2)
qml/Notifications/SwipeToAct.qml (+8/-8)
qml/Stages/Splash.qml (+3/-4)
tests/plugins/Dash/cardcreator/1.res (+6/-7)
tests/plugins/Dash/cardcreator/2.res (+6/-5)
tests/plugins/Dash/cardcreator/3.res (+6/-7)
tests/plugins/Dash/cardcreator/4.res (+1/-1)
tests/plugins/Dash/cardcreator/5.res (+16/-43)
tests/plugins/Dash/cardcreator/6.res (+6/-5)
tests/plugins/Dash/cardcreator/7.res (+6/-5)
tests/plugins/Dash/cardcreator/8.res (+6/-5)
tests/qmltests/Dash/tst_Card.qml (+3/-3)
To merge this branch: bzr merge lp:~cimi/unity8/sdk1.3_newUbuntuShape
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Abstain
Albert Astals Cid Pending
Review via email: mp+264883@code.launchpad.net

This proposal has been superseded by a proposal from 2015-07-23.

Commit message

Updated all 1.3 UbuntuShape to use new APIs where possible

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
No
 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes, but more eyes would be good
 * 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?
n/a

To post a comment you must log in.
1823. By Andrea Cimitan

Also cardCreator is done, missing tests

1824. By Andrea Cimitan

Fix qml test

1825. By Andrea Cimitan

Fix test card creator

Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
 * Did CI run pass? If not, please explain why.
unrelated
 * Did you make sure that the branch does not contain spurious tags?
y

review: Approve
Revision history for this message
Andrea Cimitan (cimi) wrote :

> * Did you perform an exploratory manual test run of the code change and any
> related functionality?
> Yes
> * Did CI run pass? If not, please explain why.
> unrelated
> * Did you make sure that the branch does not contain spurious tags?
> y
wrong tab :P

review: Abstain
1826. By Andrea Cimitan

Remove deprecated call

1827. By Andrea Cimitan

Merged and changed one line

1828. By Andrea Cimitan

Merged

1829. By Andrea Cimitan

[ Albert Astals Cid ]
* Add context for "Please re-enter" (LP: #1377195)
* Fix i18n in scope tool (LP: #1317541)
* Fix warning when doing make try
* New phone background provided by design (LP: #1364537)
* PreviewExpandable should be not expanded on startup
* Update state of indicators bar only when the user is actively
  dragging himself (LP: #1457044)
* icon-actions preview widget
* make testPageHeader more stable
[ CI Train Bot ]
* Resync trunk.
[ Josh Arenson ]
* Add handling for the location page to the autopilot settings wizard
  test
[ Michael Zanetti ]
* allow opening the manage dash area by clicking with a mouse on the
  arrow label
[ handsome_feng ]
* Added touch state on navigation. (LP: #1383213)
[ handsome_feng<email address hidden> ]
* Added touch state on navigation. (LP: #1383213)

1830. By Andrea Cimitan

Merge

1831. By Andrea Cimitan

[ Kevin Gunn ]
* No change, rebuild for gcc5
[ CI Train Bot ]
* Resync trunk. added: po/cy.po
* Resync trunk. added: po/cy.po
[ Daniel d'Andrada ]
* Stages now control the "requestedState" property of applications
* Stages now control the "requestedState" property of applications
  arrow label (LP: #1431564)
[ Daniel d'Andrada ]
* TouchRegistry: remove null candidates from list of candidates (LP:
  #1473492)
[ Lukáš Tinkl ]
* Fix power dialogs on desktop
* Provide DBUS compatibility with various session services
  (suspend/hibernate, lock/unlock, screensaver, etc)
* React on PrtScr keyboard shortcut for taking screenshots on desktop
  (LP: #1474149)
* launcher parity: close apps from quicklist (LP: #1457201)
[ Michael Zanetti ]
* Implement first edition for a desktop Alt+Tab spread
* drop the gcc-4.9 dependency (LP: #1452348)
[ Mirco Müller ]
* Added corresponding tests and visual tweaks to a launcher-item's
  progress-overlay.
* Added corresponding tests and visual tweaks to a launcher-item's
  progress-overlay.
* Implemented alert/wiggle feature for launcher-icons.
* Implemented alert/wiggle feature for launcher-icons.
* makes left swip reset the search string. (LP: #1413791)
* Don't expand indicators when tap to return to call. (LP: #1453217)
* makes left swip reset the search string. (LP: #1413791)

1832. By Andrea Cimitan

Fix for test

1833. By Andrea Cimitan

[ Albert Astals Cid ]
* Drop gcc 4.9 requirement in debian/rules
* Make the test more stable
* Optimize scope.preview() calls (LP: #1478022)
[ Alberto Mardegan ]
* Set currentIndex after the model change is completed (LP: #1433442)
[ Albert Astals Cid ]
* Make the test pass again after rework of appmanager
* fix testPhoneStage
[ CI Train Bot ]
* New rebuild forced.
[ Daniel d'Andrada ]
* Fix and clean up InputInfo plugin
[ Rodney Dawes ]
* Do not call verify in the payments button code. (LP: #1468038)
[ Albert Astals Cid ]
* Add a test that checks that items in an expandable are the correct
  size after expanding the expandable
* Fix the expandable test
* Replace some waitForRendering with wait(0)
* Workaround for bug 1473471 (LP: #1473471)
[ Gary.Wzl ]
* Fix layout issue when adding audio track widget in expandable widget
[ handsome_feng ]
* Added indication for running apps. (LP: #1471577)
* Adjust the color to highlighting indicator. (LP: #1457098)
* Convert the MouseArea to MultiPointTouchArea to track multiple touch
  points. (LP: #1445472)
[ handsome_feng<email address hidden> ]
* Convert the MouseArea to MultiPointTouchArea to track multiple touch
  points. (LP: #1445472)

1834. By Andrea Cimitan

Merge and fix

1835. By Andrea Cimitan

Some tweaks

1836. By Andrea Cimitan

Removed unused properties

1837. By Andrea Cimitan

Merged albert branch

1838. By Andrea Cimitan

[ CI Train Bot ]
* New rebuild forced.
[ Pawel Stolowski ]
* Store unity8 package version in /var/lib/.../version file for fast
  retrieval from the shell plugin.
[ Lukáš Tinkl ]
* Revert to using plaintext instead of HTML-like markup for the
  notifications (LP: #1504256)
[ CI Train Bot ]
* Resync trunk.
[ Lukáš Tinkl ]
* Wizard: skip the reporting page if the system is configured not to
  report crashes (LP: #1494442)
[ Alexandros Frantzis ]
* Use power state change reason SnapDecision to turn screen on when a
  SnapDecision arrives (LP: #1291455)
[ CI Train Bot ]
* New rebuild forced.
[ Albert Astals Cid ]
* Make Launcher::test_quickListMenuOnRMB stable (LP: #1500359)
[ CI Train Bot ]
* New rebuild forced.
[ Michael Zanetti ]
* Stabilize Launcher DND test
[ Albert Astals Cid ]
* Improvements from running clazy over the code
[ Daniel d'Andrada ]
* PhoneStage: ensure you're left in a consistent state after being
  reset (LP: #1476757)
[ Lukáš Tinkl ]
* Improve the appearance and functionality of datetime and session
  indicators in Unity8 desktop.
* Using InputInfo, determine if we need swipe or click to dismiss the
  notifications (e.g. incoming phone call)
[ Michael Zanetti ]
* further development on the Desktop Spread (LP: #1488147)
[ Michał Sawicz ]
* Bump application API version
* Skip bluetooth check under wily, use expectFailure to notice when
  it's back
[ Richard Somlói ]
* Fix translator comments in time formatter
[ Albert Astals Cid ]
* Adapt test to code changes
* Add DEP-8 test for all our UI and unit tests
* Keep the PreviewStack around to avoid mem leaks (LP: #1495467)
[ CI Train Bot ]
* Resync trunk.
[ Michael Terry ]
* When libusermetrics gives us an empty string, still show the
  infographic circle rather than hiding it. This is a follow-on to a
  branch [1] that changes the "no data available" label to the empty
  string.
[ Michał Sawicz ]
* Add DEP-8 test for all our UI and unit tests
* Fix integrated LightDM path
* Resync trunk
[ Albert Astals Cid ]
* Fix testNotifications
* Make the wait longer to make tests pass in CI
* New simplified CroppedImageMinimumSourceSize (LP: #1467740)
* Stop animateTimer when starting the fadeOutAnimation
* Use AlreadyLaunchedUpstart so that tests passes
* Workaround keyboard issues and make test pass again
[ Daniel d'Andrada ]
* DesktopStage: Refactor focus handling
* Stabilize tstShell.test_launchedAppHasActiveFocus
[ Gary.Wzl ]
* Add widgetData["expanded"] property for expandable widget.
[ Michael Terry ]
* Fix typo that caused the tutorial to tease the launcher on top of
  the greeter.
* Fix typo that caused the tutorial to tease the launcher on top of
  the greeter.
[ Michal Sawicz ]
* Resync wily with vivid
[ Albert Astals Cid ]
* Accomodate header height when using a card carousel with non
  overlayed header (LP: #1489309)
* Fix restart unity8 from inside the phone more than two times (LP:
  #1487946)
[ Gary.Wzl ]
* Move textarea up automatically when inputmethod popup. (LP:
  #1485947)
[ Lukáš Tinkl ]
* Introduce a GlobalShortcut QML component for handling global
  keyboard shortcuts
[ Michael Terry ]
* Fix the fact that a user that is locked out from their account for
  five minutes after entering too many wrong passwords can simply
  reboot to try again. (LP: #1383086)
* Fix the fact that a user that is locked out from their account for
  five minutes after entering too many wrong passwords can simply
  reboot to try again. (LP: #1383086)
[ Michael Zanetti ]
* Implement progressive autoscrolling in desktop spread
* add an animation transition when invoking the spread by hitting the
  right edge
[ Michael Zanetti ]
* release for wily
[ CI Train Bot ]
* New rebuild forced.

1839. By Andrea Cimitan

[ Albert Astals Cid ]
* Clazy fixes
* Enable Efficient String Construction by default
[ CI Train Bot ]
* New rebuild forced.
[ Daniel d'Andrada ]
* Have unity8 drawing its own cursor (LP: #1488417)
* Initial multi-monitor support
[ Daniel van Vugt ]
* Disable Qt's stuttering 'touch compression' to fix scrolling
  smoothness (LP: #1486341, #1488327)
[ Lukáš Tinkl ]
* Fix autopilot wizard test skipping the reporting page
* Implement Unity.Platform plugin wrapping org.freedesktop.hostname1
  (LP: #1504318)
* React to window title (aka surface name) changes (LP: #1497092)
* Rotate the screenshots according to the actual orientation
[ Michał Sawicz ]
* Fix application API dependency
* Have unity8 drawing its own cursor (LP: #1488417)
* Initial multi-monitor support
* Rotate the screenshots according to the actual orientation
[ Nick Dedekind ]
* Fixed leak in UnityMenuModelStackTest
* Moved time translation to SDK (LP: #1372061)

Unmerged revisions

1839. By Andrea Cimitan

[ Albert Astals Cid ]
* Clazy fixes
* Enable Efficient String Construction by default
[ CI Train Bot ]
* New rebuild forced.
[ Daniel d'Andrada ]
* Have unity8 drawing its own cursor (LP: #1488417)
* Initial multi-monitor support
[ Daniel van Vugt ]
* Disable Qt's stuttering 'touch compression' to fix scrolling
  smoothness (LP: #1486341, #1488327)
[ Lukáš Tinkl ]
* Fix autopilot wizard test skipping the reporting page
* Implement Unity.Platform plugin wrapping org.freedesktop.hostname1
  (LP: #1504318)
* React to window title (aka surface name) changes (LP: #1497092)
* Rotate the screenshots according to the actual orientation
[ Michał Sawicz ]
* Fix application API dependency
* Have unity8 drawing its own cursor (LP: #1488417)
* Initial multi-monitor support
* Rotate the screenshots according to the actual orientation
[ Nick Dedekind ]
* Fixed leak in UnityMenuModelStackTest
* Moved time translation to SDK (LP: #1372061)

1838. By Andrea Cimitan

[ CI Train Bot ]
* New rebuild forced.
[ Pawel Stolowski ]
* Store unity8 package version in /var/lib/.../version file for fast
  retrieval from the shell plugin.
[ Lukáš Tinkl ]
* Revert to using plaintext instead of HTML-like markup for the
  notifications (LP: #1504256)
[ CI Train Bot ]
* Resync trunk.
[ Lukáš Tinkl ]
* Wizard: skip the reporting page if the system is configured not to
  report crashes (LP: #1494442)
[ Alexandros Frantzis ]
* Use power state change reason SnapDecision to turn screen on when a
  SnapDecision arrives (LP: #1291455)
[ CI Train Bot ]
* New rebuild forced.
[ Albert Astals Cid ]
* Make Launcher::test_quickListMenuOnRMB stable (LP: #1500359)
[ CI Train Bot ]
* New rebuild forced.
[ Michael Zanetti ]
* Stabilize Launcher DND test
[ Albert Astals Cid ]
* Improvements from running clazy over the code
[ Daniel d'Andrada ]
* PhoneStage: ensure you're left in a consistent state after being
  reset (LP: #1476757)
[ Lukáš Tinkl ]
* Improve the appearance and functionality of datetime and session
  indicators in Unity8 desktop.
* Using InputInfo, determine if we need swipe or click to dismiss the
  notifications (e.g. incoming phone call)
[ Michael Zanetti ]
* further development on the Desktop Spread (LP: #1488147)
[ Michał Sawicz ]
* Bump application API version
* Skip bluetooth check under wily, use expectFailure to notice when
  it's back
[ Richard Somlói ]
* Fix translator comments in time formatter
[ Albert Astals Cid ]
* Adapt test to code changes
* Add DEP-8 test for all our UI and unit tests
* Keep the PreviewStack around to avoid mem leaks (LP: #1495467)
[ CI Train Bot ]
* Resync trunk.
[ Michael Terry ]
* When libusermetrics gives us an empty string, still show the
  infographic circle rather than hiding it. This is a follow-on to a
  branch [1] that changes the "no data available" label to the empty
  string.
[ Michał Sawicz ]
* Add DEP-8 test for all our UI and unit tests
* Fix integrated LightDM path
* Resync trunk
[ Albert Astals Cid ]
* Fix testNotifications
* Make the wait longer to make tests pass in CI
* New simplified CroppedImageMinimumSourceSize (LP: #1467740)
* Stop animateTimer when starting the fadeOutAnimation
* Use AlreadyLaunchedUpstart so that tests passes
* Workaround keyboard issues and make test pass again
[ Daniel d'Andrada ]
* DesktopStage: Refactor focus handling
* Stabilize tstShell.test_launchedAppHasActiveFocus
[ Gary.Wzl ]
* Add widgetData["expanded"] property for expandable widget.
[ Michael Terry ]
* Fix typo that caused the tutorial to tease the launcher on top of
  the greeter.
* Fix typo that caused the tutorial to tease the launcher on top of
  the greeter.
[ Michal Sawicz ]
* Resync wily with vivid
[ Albert Astals Cid ]
* Accomodate header height when using a card carousel with non
  overlayed header (LP: #1489309)
* Fix restart unity8 from inside the phone more than two times (LP:
  #1487946)
[ Gary.Wzl ]
* Move textarea up automatically when inputmethod popup. (LP:
  #1485947)
[ Lukáš Tinkl ]
* Introduce a GlobalShortcut QML component for handling global
  keyboard shortcuts
[ Michael Terry ]
* Fix the fact that a user that is locked out from their account for
  five minutes after entering too many wrong passwords can simply
  reboot to try again. (LP: #1383086)
* Fix the fact that a user that is locked out from their account for
  five minutes after entering too many wrong passwords can simply
  reboot to try again. (LP: #1383086)
[ Michael Zanetti ]
* Implement progressive autoscrolling in desktop spread
* add an animation transition when invoking the spread by hitting the
  right edge
[ Michael Zanetti ]
* release for wily
[ CI Train Bot ]
* New rebuild forced.

1837. By Andrea Cimitan

Merged albert branch

1836. By Andrea Cimitan

Removed unused properties

1835. By Andrea Cimitan

Some tweaks

1834. By Andrea Cimitan

Merge and fix

1833. By Andrea Cimitan

[ Albert Astals Cid ]
* Drop gcc 4.9 requirement in debian/rules
* Make the test more stable
* Optimize scope.preview() calls (LP: #1478022)
[ Alberto Mardegan ]
* Set currentIndex after the model change is completed (LP: #1433442)
[ Albert Astals Cid ]
* Make the test pass again after rework of appmanager
* fix testPhoneStage
[ CI Train Bot ]
* New rebuild forced.
[ Daniel d'Andrada ]
* Fix and clean up InputInfo plugin
[ Rodney Dawes ]
* Do not call verify in the payments button code. (LP: #1468038)
[ Albert Astals Cid ]
* Add a test that checks that items in an expandable are the correct
  size after expanding the expandable
* Fix the expandable test
* Replace some waitForRendering with wait(0)
* Workaround for bug 1473471 (LP: #1473471)
[ Gary.Wzl ]
* Fix layout issue when adding audio track widget in expandable widget
[ handsome_feng ]
* Added indication for running apps. (LP: #1471577)
* Adjust the color to highlighting indicator. (LP: #1457098)
* Convert the MouseArea to MultiPointTouchArea to track multiple touch
  points. (LP: #1445472)
[ handsome_feng<email address hidden> ]
* Convert the MouseArea to MultiPointTouchArea to track multiple touch
  points. (LP: #1445472)

1832. By Andrea Cimitan

Fix for test

1831. By Andrea Cimitan

[ Kevin Gunn ]
* No change, rebuild for gcc5
[ CI Train Bot ]
* Resync trunk. added: po/cy.po
* Resync trunk. added: po/cy.po
[ Daniel d'Andrada ]
* Stages now control the "requestedState" property of applications
* Stages now control the "requestedState" property of applications
  arrow label (LP: #1431564)
[ Daniel d'Andrada ]
* TouchRegistry: remove null candidates from list of candidates (LP:
  #1473492)
[ Lukáš Tinkl ]
* Fix power dialogs on desktop
* Provide DBUS compatibility with various session services
  (suspend/hibernate, lock/unlock, screensaver, etc)
* React on PrtScr keyboard shortcut for taking screenshots on desktop
  (LP: #1474149)
* launcher parity: close apps from quicklist (LP: #1457201)
[ Michael Zanetti ]
* Implement first edition for a desktop Alt+Tab spread
* drop the gcc-4.9 dependency (LP: #1452348)
[ Mirco Müller ]
* Added corresponding tests and visual tweaks to a launcher-item's
  progress-overlay.
* Added corresponding tests and visual tweaks to a launcher-item's
  progress-overlay.
* Implemented alert/wiggle feature for launcher-icons.
* Implemented alert/wiggle feature for launcher-icons.
* makes left swip reset the search string. (LP: #1413791)
* Don't expand indicators when tap to return to call. (LP: #1453217)
* makes left swip reset the search string. (LP: #1413791)

1830. By Andrea Cimitan

Merge

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 2015-07-06 12:59:55 +0000
+++ plugins/Dash/CardCreator.js 2015-07-17 13:05:07 +0000
@@ -28,11 +28,12 @@
28 sourceComponent: UbuntuShape { \n\28 sourceComponent: UbuntuShape { \n\
29 objectName: "background"; \n\29 objectName: "background"; \n\
30 radius: "medium"; \n\30 radius: "medium"; \n\
31 color: getColor(0) || "white"; \n\31 backgroundColor: getColor(0) || "white"; \n\
32 gradientColor: getColor(1) || color; \n\32 secondaryBackgroundColor: getColor(1) || backgroundColor; \n\
33 backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor; \n\
33 anchors.fill: parent; \n\34 anchors.fill: parent; \n\
34 image: backgroundImage.source ? backgroundImage : null; \n\35 source: backgroundImage.source ? backgroundImage : null; \n\
35 property real luminance: Style.luminance(color); \n\36 property real luminance: Style.luminance(backgroundColor); \n\
36 property Image backgroundImage: Image { \n\37 property Image backgroundImage: Image { \n\
37 objectName: "backgroundImage"; \n\38 objectName: "backgroundImage"; \n\
38 source: { \n\39 source: { \n\
@@ -52,7 +53,7 @@
52// %1 is used as anchors of artShapeHolder53// %1 is used as anchors of artShapeHolder
53// %2 is used as image width54// %2 is used as image width
54// %3 is used as image height55// %3 is used as image height
55var kArtShapeHolderCode = 'Item { \n\56var kArtShapeHolderCode = 'Item { \n\
56 id: artShapeHolder; \n\57 id: artShapeHolder; \n\
57 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\58 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
58 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\59 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\
@@ -66,10 +67,9 @@
66 sourceComponent: Item { \n\67 sourceComponent: Item { \n\
67 id: artShape; \n\68 id: artShape; \n\
68 objectName: "artShape"; \n\69 objectName: "artShape"; \n\
69 property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\70 readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
70 visible: image.status == Image.Ready; \n\71 visible: image.status == Image.Ready; \n\
71 readonly property alias image: artImage.image; \n\72 readonly property alias image: artImage.image; \n\
72 property alias borderSource: artShapeShape.borderSource; \n\
73 ShaderEffectSource { \n\73 ShaderEffectSource { \n\
74 id: artShapeSource; \n\74 id: artShapeSource; \n\
75 sourceItem: artImage; \n\75 sourceItem: artImage; \n\
@@ -78,16 +78,17 @@
78 height: 1; \n\78 height: 1; \n\
79 hideSource: doShapeItem; \n\79 hideSource: doShapeItem; \n\
80 } \n\80 } \n\
81 Shape { \n\81 UbuntuShape { \n\
82 id: artShapeShape; \n\82 id: artShapeShape; \n\
83 image: artShapeSource; \n\83 source: artShapeSource; \n\
84 anchors.fill: parent; \n\84 anchors.fill: parent; \n\
85 visible: doShapeItem; \n\85 visible: doShapeItem; \n\
86 radius: "medium"; \n\86 radius: "medium"; \n\
87 aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat; \n\
87 } \n\88 } \n\
88 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\89 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
89 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\90 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
90 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } \n\91 Component.onCompleted: { updateWidthHeightBindings(); } \n\
91 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\92 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\
92 function updateWidthHeightBindings() { \n\93 function updateWidthHeightBindings() { \n\
93 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\94 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\
@@ -112,44 +113,18 @@
112113
113var kOverlayLoaderCode = 'Loader { \n\114var kOverlayLoaderCode = 'Loader { \n\
114 id: overlayLoader; \n\115 id: overlayLoader; \n\
115 anchors { \n\116 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
116 left: artShapeHolder.left; \n\117 anchors.fill: artShapeHolder; \n\
117 right: artShapeHolder.right; \n\
118 bottom: artShapeHolder.bottom; \n\
119 } \n\
120 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\118 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
121 asynchronous: root.asynchronous; \n\119 asynchronous: root.asynchronous; \n\
122 visible: showHeader && status == Loader.Ready; \n\120 visible: showHeader && status == Loader.Ready; \n\
123 sourceComponent: ShaderEffect { \n\121 sourceComponent: UbuntuShapeOverlay { \n\
124 id: overlay; \n\122 id: overlay; \n\
125 height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
126 property real luminance: Style.luminance(overlayColor); \n\123 property real luminance: Style.luminance(overlayColor); \n\
127 property color overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\124 aspect: UbuntuShape.Flat; \n\
128 property var source: ShaderEffectSource { \n\125 radius: "medium"; \n\
129 id: shaderSource; \n\126 overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
130 sourceItem: artShapeLoader.item; \n\127 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1); \n\
131 onVisibleChanged: if (visible) scheduleUpdate(); \n\
132 live: false; \n\
133 sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height); \n\
134 } \n\
135 vertexShader: " \n\
136 uniform highp mat4 qt_Matrix; \n\
137 attribute highp vec4 qt_Vertex; \n\
138 attribute highp vec2 qt_MultiTexCoord0; \n\
139 varying highp vec2 coord; \n\
140 void main() { \n\
141 coord = qt_MultiTexCoord0; \n\
142 gl_Position = qt_Matrix * qt_Vertex; \n\
143 }"; \n\
144 fragmentShader: " \n\
145 varying highp vec2 coord; \n\
146 uniform sampler2D source; \n\
147 uniform lowp float qt_Opacity; \n\
148 uniform highp vec4 overlayColor; \n\
149 void main() { \n\
150 lowp vec4 tex = texture2D(source, coord); \n\
151 gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a; \n\
152 }"; \n\
153 } \n\128 } \n\
154 }\n';129 }\n';
155130
@@ -325,7 +300,7 @@
325 id: root; \n\300 id: root; \n\
326 property var components; \n\301 property var components; \n\
327 property var cardData; \n\302 property var cardData; \n\
328 property var artShapeBorderSource: undefined; \n\303 property string artShapeStyle: "inset"; \n\
329 property real fontScale: 1.0; \n\304 property real fontScale: 1.0; \n\
330 property var scopeStyle: null; \n\305 property var scopeStyle: null; \n\
331 property int titleAlignment: Text.AlignLeft; \n\306 property int titleAlignment: Text.AlignLeft; \n\
@@ -368,7 +343,6 @@
368 }343 }
369344
370 if (hasArt) {345 if (hasArt) {
371 code += 'onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } \n';
372 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';346 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
373347
374 var widthCode, heightCode;348 var widthCode, heightCode;
@@ -555,7 +529,7 @@
555 titleAnchors += 'left: parent.left; \n\529 titleAnchors += 'left: parent.left; \n\
556 leftMargin: units.gu(1); \n\530 leftMargin: units.gu(1); \n\
557 top: overlayLoader.top; \n\531 top: overlayLoader.top; \n\
558 topMargin: units.gu(1);\n';532 topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight; \n';
559 } else {533 } else {
560 // Using anchors to the mascot/parent534 // Using anchors to the mascot/parent
561 titleAnchors = titleRightAnchor;535 titleAnchors = titleRightAnchor;
562536
=== modified file 'qml/Components/LazyImage.qml'
--- qml/Components/LazyImage.qml 2015-06-18 10:07:37 +0000
+++ qml/Components/LazyImage.qml 2015-07-17 13:05:07 +0000
@@ -53,7 +53,7 @@
53 UbuntuShape {53 UbuntuShape {
54 id: placeholder54 id: placeholder
55 objectName: "placeholder"55 objectName: "placeholder"
56 color: "#22FFFFFF"56 backgroundColor: "#22FFFFFF"
57 anchors.fill: shape57 anchors.fill: shape
58 visible: opacity != 058 visible: opacity != 0
5959
@@ -87,19 +87,18 @@
8787
88 opacity: 088 opacity: 0
89 visible: opacity != 089 visible: opacity != 0
9090 sourceFillMode: UbuntuShape.PreserveAspectFit
91 image: Image {91 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
92 sourceVerticalAlignment: UbuntuShape.AlignVCenter
93 source: Image {
92 id: image94 id: image
93 objectName: "image"95 objectName: "image"
9496
95 property url nextSource97 property url nextSource
96 property string format: image.implicitWidth > image.implicitHeight ? "landscape" : "portrait"98 property string format: image.implicitWidth > image.implicitHeight ? "landscape" : "portrait"
9799
98 fillMode: Image.PreserveAspectFit
99 asynchronous: true100 asynchronous: true
100 cache: false101 cache: false
101 horizontalAlignment: Image.AlignHCenter
102 verticalAlignment: Image.AlignVCenter
103 sourceSize.width: root.scaleTo == "width" ? root.width102 sourceSize.width: root.scaleTo == "width" ? root.width
104 : root.scaleTo == "fit" && root.width <= root.height ? root.width103 : root.scaleTo == "fit" && root.width <= root.height ? root.width
105 : 0104 : 0
106105
=== modified file 'qml/Dash/CardCarousel.qml'
--- qml/Dash/CardCarousel.qml 2015-06-23 12:17:02 +0000
+++ qml/Dash/CardCarousel.qml 2015-07-17 13:05:07 +0000
@@ -64,7 +64,7 @@
64 item.components = Qt.binding(function() { return cardTool.components; });64 item.components = Qt.binding(function() { return cardTool.components; });
65 item.fontScale = Qt.binding(function() { return carousel.fontScale; });65 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
66 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });66 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
67 item.artShapeBorderSource = "none";67 item.artShapeStyle = "flat";
68 item.scopeStyle = cardCarousel.scopeStyle;68 item.scopeStyle = cardCarousel.scopeStyle;
69 }69 }
7070
7171
=== modified file 'qml/Dash/Previews/PreviewAudioPlayback.qml'
--- qml/Dash/Previews/PreviewAudioPlayback.qml 2015-06-18 09:30:17 +0000
+++ qml/Dash/Previews/PreviewAudioPlayback.qml 2015-07-17 13:05:07 +0000
@@ -175,7 +175,7 @@
175 }175 }
176 height: units.dp(2)176 height: units.dp(2)
177 visible: progressBarImage.visible177 visible: progressBarImage.visible
178 color: UbuntuColors.orange178 backgroundColor: UbuntuColors.orange
179 }179 }
180180
181 Image {181 Image {
182182
=== modified file 'qml/Dash/Previews/PreviewHeader.qml'
--- qml/Dash/Previews/PreviewHeader.qml 2015-06-23 12:17:02 +0000
+++ qml/Dash/Previews/PreviewHeader.qml 2015-07-17 13:05:07 +0000
@@ -78,15 +78,15 @@
78 sourceComponent: UbuntuShape {78 sourceComponent: UbuntuShape {
79 objectName: "mascotShape"79 objectName: "mascotShape"
80 visible: image.status === Image.Ready80 visible: image.status === Image.Ready
81 image: Image {81 sourceFillMode: UbuntuShape.PreserveAspectCrop
82 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
83 sourceVerticalAlignment: UbuntuShape.AlignVCenter
84 source: Image {
82 source: headerRoot.mascot85 source: headerRoot.mascot
83 width: source ? mascotShapeLoader.width : 086 width: source ? mascotShapeLoader.width : 0
84 height: mascotShapeLoader.height87 height: mascotShapeLoader.height
8588
86 sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }89 sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
87 fillMode: Image.PreserveAspectCrop
88 horizontalAlignment: Image.AlignHCenter
89 verticalAlignment: Image.AlignVCenter
90 onStatusChanged: if (status === Image.Error) source = headerRoot.fallback;90 onStatusChanged: if (status === Image.Error) source = headerRoot.fallback;
91 }91 }
92 }92 }
9393
=== modified file 'qml/Dash/ScopesListCategoryItem.qml'
--- qml/Dash/ScopesListCategoryItem.qml 2015-06-18 10:07:37 +0000
+++ qml/Dash/ScopesListCategoryItem.qml 2015-07-17 13:05:07 +0000
@@ -49,10 +49,10 @@
49 width: units.gu(5)49 width: units.gu(5)
50 height: units.gu(5)50 height: units.gu(5)
51 visible: !hideChildren51 visible: !hideChildren
52 image: Image {52 sourceFillMode: UbuntuShape.PreserveAspectCrop
53 source: Image {
53 id: shapeImage54 id: shapeImage
54 cache: true55 cache: true
55 fillMode: Image.PreserveAspectCrop
56 sourceSize { width: shape.width; height: shape.height }56 sourceSize { width: shape.width; height: shape.height }
57 }57 }
58 }58 }
5959
=== modified file 'qml/Launcher/LauncherDelegate.qml'
--- qml/Launcher/LauncherDelegate.qml 2015-06-18 10:07:37 +0000
+++ qml/Launcher/LauncherDelegate.qml 2015-07-17 13:05:07 +0000
@@ -51,13 +51,12 @@
51 anchors.fill: parent51 anchors.fill: parent
52 anchors.margins: units.gu(1)52 anchors.margins: units.gu(1)
53 radius: "medium"53 radius: "medium"
54 borderSource: "none"54 aspect: UbuntuShape.Flat
5555 sourceFillMode: UbuntuShape.PreserveAspectCrop
56 image: Image {56 source: Image {
57 id: iconImage57 id: iconImage
58 sourceSize.width: iconShape.width58 sourceSize.width: iconShape.width
59 sourceSize.height: iconShape.height59 sourceSize.height: iconShape.height
60 fillMode: Image.PreserveAspectCrop
61 source: root.iconName60 source: root.iconName
62 }61 }
63 }62 }
@@ -80,9 +79,9 @@
80 }79 }
81 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))80 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
82 height: units.gu(2)81 height: units.gu(2)
83 color: UbuntuColors.orange82 backgroundColor: UbuntuColors.orange
84 visible: root.countVisible83 visible: root.countVisible
85 borderSource: "none"84 aspect: UbuntuShape.Flat
8685
87 Label {86 Label {
88 id: countLabel87 id: countLabel
8988
=== modified file 'qml/Launcher/LauncherPanel.qml'
--- qml/Launcher/LauncherPanel.qml 2015-07-10 07:47:35 +0000
+++ qml/Launcher/LauncherPanel.qml 2015-07-17 13:05:07 +0000
@@ -61,8 +61,8 @@
61 fill: parent61 fill: parent
62 topMargin: -units.gu(2)62 topMargin: -units.gu(2)
63 }63 }
64 borderSource: "none"64 aspect: UbuntuShape.Flat
65 color: UbuntuColors.orange65 backgroundColor: UbuntuColors.orange
66 }66 }
6767
68 Image {68 Image {
6969
=== modified file 'qml/Notifications/Notification.qml'
--- qml/Notifications/Notification.qml 2015-07-10 07:47:35 +0000
+++ qml/Notifications/Notification.qml 2015-07-17 13:05:07 +0000
@@ -142,10 +142,10 @@
142 rightMargin: notification.margins142 rightMargin: notification.margins
143 topMargin: type === Notification.Confirmation ? units.gu(.5) : 0143 topMargin: type === Notification.Confirmation ? units.gu(.5) : 0
144 }144 }
145 color: parent.color145 backgroundColor: parent.color
146 opacity: parent.opacity146 opacity: parent.opacity
147 radius: "medium"147 radius: "medium"
148 borderSource: "none"148 aspect: UbuntuShape.Flat
149 }149 }
150150
151 Rectangle {151 Rectangle {
@@ -345,8 +345,8 @@
345 }345 }
346346
347 height: units.gu(1)347 height: units.gu(1)
348 color: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey348 backgroundColor: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
349 borderSource: "none"349 aspect: UbuntuShape.Flat
350 radius: "small"350 radius: "small"
351351
352 UbuntuShape {352 UbuntuShape {
@@ -354,8 +354,8 @@
354 objectName: "innerBar"354 objectName: "innerBar"
355 width: valueIndicator.width * valueIndicator.value / 100355 width: valueIndicator.width * valueIndicator.value / 100
356 height: units.gu(1)356 height: units.gu(1)
357 color: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"357 backgroundColor: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
358 borderSource: "none"358 aspect: UbuntuShape.Flat
359 radius: "small"359 radius: "small"
360 }360 }
361 }361 }
362362
=== modified file 'qml/Notifications/OptionToggle.qml'
--- qml/Notifications/OptionToggle.qml 2015-07-10 07:47:35 +0000
+++ qml/Notifications/OptionToggle.qml 2015-07-17 13:05:07 +0000
@@ -29,8 +29,8 @@
2929
30 signal triggered(string id)30 signal triggered(string id)
3131
32 color: theme.palette.normal.base32 backgroundColor: theme.palette.normal.base
33 borderSource: "none"33 aspect: UbuntuShape.Flat
34 height: expanded ? (optionToggleRepeater.count - startIndex) * itemHeight : itemHeight34 height: expanded ? (optionToggleRepeater.count - startIndex) * itemHeight : itemHeight
35 width: parent.width35 width: parent.width
36 radius: "medium"36 radius: "medium"
3737
=== modified file 'qml/Notifications/SwipeToAct.qml'
--- qml/Notifications/SwipeToAct.qml 2015-06-18 10:07:37 +0000
+++ qml/Notifications/SwipeToAct.qml 2015-07-17 13:05:07 +0000
@@ -68,16 +68,16 @@
68 id: row68 id: row
69 width: parent.width69 width: parent.width
70 height: priv.sliderHeight70 height: priv.sliderHeight
71 color: priv.sliderBGColor71 backgroundColor: priv.sliderBGColor
72 borderSource: "none"72 aspect: UbuntuShape.Flat
7373
74 UbuntuShape {74 UbuntuShape {
75 id: leftShape75 id: leftShape
76 anchors.top: parent.top76 anchors.top: parent.top
77 anchors.left: parent.left77 anchors.left: parent.left
78 anchors.margins: priv.gap78 anchors.margins: priv.gap
79 color: UbuntuColors.red79 backgroundColor: UbuntuColors.red
80 borderSource: "none"80 aspect: UbuntuShape.Flat
8181
82 state: "normal"82 state: "normal"
83 height: units.gu(6)83 height: units.gu(6)
@@ -155,10 +155,10 @@
155 }155 }
156156
157 z: 1157 z: 1
158 color: priv.sliderMainColor158 backgroundColor: priv.sliderMainColor
159 height: units.gu(6)159 height: units.gu(6)
160 width: units.gu(6)160 width: units.gu(6)
161 borderSource: "none"161 aspect: UbuntuShape.Flat
162 radius: "medium"162 radius: "medium"
163 Icon {163 Icon {
164 anchors.fill: parent164 anchors.fill: parent
@@ -192,8 +192,8 @@
192 anchors.top: parent.top192 anchors.top: parent.top
193 anchors.right: parent.right193 anchors.right: parent.right
194 anchors.margins: priv.gap194 anchors.margins: priv.gap
195 color: UbuntuColors.green195 backgroundColor: UbuntuColors.green
196 borderSource: "none"196 aspect: UbuntuShape.Flat
197197
198 state: "normal"198 state: "normal"
199 height: units.gu(6)199 height: units.gu(6)
200200
=== modified file 'qml/Stages/Splash.qml'
--- qml/Stages/Splash.qml 2015-07-14 07:39:55 +0000
+++ qml/Stages/Splash.qml 2015-07-17 13:05:07 +0000
@@ -121,14 +121,13 @@
121 visible: d.showIcon121 visible: d.showIcon
122122
123 radius: "medium"123 radius: "medium"
124 borderSource: "none"124 aspect: UbuntuShape.Flat
125125 sourceFillMode: Image.PreserveAspectCrop
126 image: Image {126 source: Image {
127 id: iconImage127 id: iconImage
128 sourceSize.width: iconShape.width128 sourceSize.width: iconShape.width
129 sourceSize.height: iconShape.height129 sourceSize.height: iconShape.height
130 source: d.showIcon ? root.icon : ""130 source: d.showIcon ? root.icon : ""
131 fillMode: Image.PreserveAspectCrop
132 }131 }
133 }132 }
134133
135134
=== modified file 'tests/plugins/Dash/cardcreator/1.res'
--- tests/plugins/Dash/cardcreator/1.res 2015-07-06 12:59:55 +0000
+++ tests/plugins/Dash/cardcreator/1.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root; 2 id: root;
3 property var components; 3 property var components;
4 property var cardData; 4 property var cardData;
5 property var artShapeBorderSource: undefined; 5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0; 6 property real fontScale: 1.0;
7 property var scopeStyle: null; 7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft; 8 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@
14 implicitWidth: childrenRect.width; 14 implicitWidth: childrenRect.width;
15 enabled: true;15 enabled: true;
1616
17onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
18readonly 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);
19Item { 18Item {
20 id: artShapeHolder; 19 id: artShapeHolder;
@@ -30,10 +29,9 @@
30 sourceComponent: Item {29 sourceComponent: Item {
31 id: artShape;30 id: artShape;
32 objectName: "artShape";31 objectName: "artShape";
33 property bool doShapeItem: components["art"]["conciergeMode"] !== true;32 readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
34 visible: image.status == Image.Ready;33 visible: image.status == Image.Ready;
35 readonly property alias image: artImage.image;34 readonly property alias image: artImage.image;
36 property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {35 ShaderEffectSource {
38 id: artShapeSource;36 id: artShapeSource;
39 sourceItem: artImage;37 sourceItem: artImage;
@@ -42,16 +40,17 @@
42 height: 1;40 height: 1;
43 hideSource: doShapeItem;41 hideSource: doShapeItem;
44 }42 }
45 Shape {43 UbuntuShape {
46 id: artShapeShape;44 id: artShapeShape;
47 image: artShapeSource;45 source: artShapeSource;
48 anchors.fill: parent;46 anchors.fill: parent;
49 visible: doShapeItem;47 visible: doShapeItem;
50 radius: "medium";48 radius: "medium";
49 aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
51 }50 }
52 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;51 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
53 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; 52 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }53 Component.onCompleted: { updateWidthHeightBindings(); }
55 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } 54 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
56 function updateWidthHeightBindings() { 55 function updateWidthHeightBindings() {
57 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { 56 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
5857
=== modified file 'tests/plugins/Dash/cardcreator/2.res'
--- tests/plugins/Dash/cardcreator/2.res 2015-07-06 12:59:55 +0000
+++ tests/plugins/Dash/cardcreator/2.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root; 2 id: root;
3 property var components; 3 property var components;
4 property var cardData; 4 property var cardData;
5 property var artShapeBorderSource: undefined; 5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0; 6 property real fontScale: 1.0;
7 property var scopeStyle: null; 7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft; 8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@
23 sourceComponent: UbuntuShape { 23 sourceComponent: UbuntuShape {
24 objectName: "background"; 24 objectName: "background";
25 radius: "medium"; 25 radius: "medium";
26 color: getColor(0) || "white"; 26 backgroundColor: getColor(0) || "white";
27 gradientColor: getColor(1) || color; 27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28 backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28 anchors.fill: parent; 29 anchors.fill: parent;
29 image: backgroundImage.source ? backgroundImage : null; 30 source: backgroundImage.source ? backgroundImage : null;
30 property real luminance: Style.luminance(color); 31 property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image { 32 property Image backgroundImage: Image {
32 objectName: "backgroundImage"; 33 objectName: "backgroundImage";
33 source: { 34 source: {
3435
=== modified file 'tests/plugins/Dash/cardcreator/3.res'
--- tests/plugins/Dash/cardcreator/3.res 2015-07-06 12:59:55 +0000
+++ tests/plugins/Dash/cardcreator/3.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root; 2 id: root;
3 property var components; 3 property var components;
4 property var cardData; 4 property var cardData;
5 property var artShapeBorderSource: undefined; 5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0; 6 property real fontScale: 1.0;
7 property var scopeStyle: null; 7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft; 8 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@
14 implicitWidth: childrenRect.width; 14 implicitWidth: childrenRect.width;
15 enabled: true;15 enabled: true;
1616
17onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
18readonly 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);
19Item { 18Item {
20 id: artShapeHolder; 19 id: artShapeHolder;
@@ -30,10 +29,9 @@
30 sourceComponent: Item {29 sourceComponent: Item {
31 id: artShape;30 id: artShape;
32 objectName: "artShape";31 objectName: "artShape";
33 property bool doShapeItem: components["art"]["conciergeMode"] !== true;32 readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
34 visible: image.status == Image.Ready;33 visible: image.status == Image.Ready;
35 readonly property alias image: artImage.image;34 readonly property alias image: artImage.image;
36 property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {35 ShaderEffectSource {
38 id: artShapeSource;36 id: artShapeSource;
39 sourceItem: artImage;37 sourceItem: artImage;
@@ -42,16 +40,17 @@
42 height: 1;40 height: 1;
43 hideSource: doShapeItem;41 hideSource: doShapeItem;
44 }42 }
45 Shape {43 UbuntuShape {
46 id: artShapeShape;44 id: artShapeShape;
47 image: artShapeSource;45 source: artShapeSource;
48 anchors.fill: parent;46 anchors.fill: parent;
49 visible: doShapeItem;47 visible: doShapeItem;
50 radius: "medium";48 radius: "medium";
49 aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
51 }50 }
52 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;51 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
53 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;52 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }53 Component.onCompleted: { updateWidthHeightBindings(); }
55 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }54 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
56 function updateWidthHeightBindings() {55 function updateWidthHeightBindings() {
57 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {56 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
5857
=== modified file 'tests/plugins/Dash/cardcreator/4.res'
--- tests/plugins/Dash/cardcreator/4.res 2015-07-06 12:59:55 +0000
+++ tests/plugins/Dash/cardcreator/4.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root; 2 id: root;
3 property var components; 3 property var components;
4 property var cardData; 4 property var cardData;
5 property var artShapeBorderSource: undefined; 5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0; 6 property real fontScale: 1.0;
7 property var scopeStyle: null;7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;8 property int titleAlignment: Text.AlignLeft;
99
=== modified file 'tests/plugins/Dash/cardcreator/5.res'
--- tests/plugins/Dash/cardcreator/5.res 2015-07-06 12:59:55 +0000
+++ tests/plugins/Dash/cardcreator/5.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root; 2 id: root;
3 property var components; 3 property var components;
4 property var cardData; 4 property var cardData;
5 property var artShapeBorderSource: undefined; 5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0; 6 property real fontScale: 1.0;
7 property var scopeStyle: null; 7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft; 8 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@
14 implicitWidth: childrenRect.width; 14 implicitWidth: childrenRect.width;
15 enabled: false;15 enabled: false;
1616
17onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
18readonly 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);
19Item { 18Item {
20 id: artShapeHolder; 19 id: artShapeHolder;
@@ -30,10 +29,9 @@
30 sourceComponent: Item {29 sourceComponent: Item {
31 id: artShape;30 id: artShape;
32 objectName: "artShape";31 objectName: "artShape";
33 property bool doShapeItem: components["art"]["conciergeMode"] !== true;32 readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
34 visible: image.status == Image.Ready;33 visible: image.status == Image.Ready;
35 readonly property alias image: artImage.image;34 readonly property alias image: artImage.image;
36 property alias borderSource: artShapeShape.borderSource;
37 ShaderEffectSource {35 ShaderEffectSource {
38 id: artShapeSource;36 id: artShapeSource;
39 sourceItem: artImage;37 sourceItem: artImage;
@@ -42,16 +40,17 @@
42 height: 1;40 height: 1;
43 hideSource: doShapeItem;41 hideSource: doShapeItem;
44 }42 }
45 Shape {43 UbuntuShape {
46 id: artShapeShape;44 id: artShapeShape;
47 image: artShapeSource;45 source: artShapeSource;
48 anchors.fill: parent;46 anchors.fill: parent;
49 visible: doShapeItem;47 visible: doShapeItem;
50 radius: "medium";48 radius: "medium";
49 aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
51 }50 }
52 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;51 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
53 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;52 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }53 Component.onCompleted: { updateWidthHeightBindings(); }
55 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }54 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
56 function updateWidthHeightBindings() {55 function updateWidthHeightBindings() {
57 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {56 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
@@ -75,44 +74,18 @@
75 }74 }
76Loader { 75Loader {
77 id: overlayLoader; 76 id: overlayLoader;
78 anchors { 77 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
79 left: artShapeHolder.left; 78 anchors.fill: artShapeHolder;
80 right: artShapeHolder.right; 79 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
81 bottom: artShapeHolder.bottom;
82 }
83 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
84 asynchronous: root.asynchronous; 80 asynchronous: root.asynchronous;
85 visible: showHeader && status == Loader.Ready; 81 visible: showHeader && status == Loader.Ready;
86 sourceComponent: ShaderEffect { 82 sourceComponent: UbuntuShapeOverlay {
87 id: overlay; 83 id: overlay;
88 height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);84 property real luminance: Style.luminance(overlayColor);
89 property real luminance: Style.luminance(overlayColor);85 aspect: UbuntuShape.Flat;
90 property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";86 radius: "medium";
91 property var source: ShaderEffectSource { 87 overlayColor: cardData && cardData["overlayColor"] || "#99000000";
92 id: shaderSource; 88 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
93 sourceItem: artShapeLoader.item;
94 onVisibleChanged: if (visible) scheduleUpdate();
95 live: false;
96 sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height);
97 }
98 vertexShader: "
99 uniform highp mat4 qt_Matrix;
100 attribute highp vec4 qt_Vertex;
101 attribute highp vec2 qt_MultiTexCoord0;
102 varying highp vec2 coord;
103 void main() {
104 coord = qt_MultiTexCoord0;
105 gl_Position = qt_Matrix * qt_Vertex;
106 }";
107 fragmentShader: "
108 varying highp vec2 coord;
109 uniform sampler2D source;
110 uniform lowp float qt_Opacity;
111 uniform highp vec4 overlayColor;
112 void main() {
113 lowp vec4 tex = texture2D(source, coord);
114 gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a;
115 }";
116 } 89 }
117 }90 }
118readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;91readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
@@ -124,7 +97,7 @@
124 left: parent.left; 97 left: parent.left;
125 leftMargin: units.gu(1); 98 leftMargin: units.gu(1);
126 top: overlayLoader.top; 99 top: overlayLoader.top;
127 topMargin: units.gu(1);100 topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight;
128 } 101 }
129 elide: Text.ElideRight; 102 elide: Text.ElideRight;
130 fontSize: "small"; 103 fontSize: "small";
131104
=== modified file 'tests/plugins/Dash/cardcreator/6.res'
--- tests/plugins/Dash/cardcreator/6.res 2015-07-06 12:59:55 +0000
+++ tests/plugins/Dash/cardcreator/6.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root;2 id: root;
3 property var components;3 property var components;
4 property var cardData;4 property var cardData;
5 property var artShapeBorderSource: undefined;5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0;6 property real fontScale: 1.0;
7 property var scopeStyle: null;7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@
23 sourceComponent: UbuntuShape { 23 sourceComponent: UbuntuShape {
24 objectName: "background"; 24 objectName: "background";
25 radius: "medium"; 25 radius: "medium";
26 color: getColor(0) || "white"; 26 backgroundColor: getColor(0) || "white";
27 gradientColor: getColor(1) || color; 27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28 backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28 anchors.fill: parent; 29 anchors.fill: parent;
29 image: backgroundImage.source ? backgroundImage : null; 30 source: backgroundImage.source ? backgroundImage : null;
30 property real luminance: Style.luminance(color); 31 property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image { 32 property Image backgroundImage: Image {
32 objectName: "backgroundImage"; 33 objectName: "backgroundImage";
33 source: { 34 source: {
3435
=== modified file 'tests/plugins/Dash/cardcreator/7.res'
--- tests/plugins/Dash/cardcreator/7.res 2015-07-06 12:59:55 +0000
+++ tests/plugins/Dash/cardcreator/7.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root; 2 id: root;
3 property var components; 3 property var components;
4 property var cardData; 4 property var cardData;
5 property var artShapeBorderSource: undefined; 5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0; 6 property real fontScale: 1.0;
7 property var scopeStyle: null; 7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft; 8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@
23 sourceComponent: UbuntuShape { 23 sourceComponent: UbuntuShape {
24 objectName: "background"; 24 objectName: "background";
25 radius: "medium"; 25 radius: "medium";
26 color: getColor(0) || "white"; 26 backgroundColor: getColor(0) || "white";
27 gradientColor: getColor(1) || color; 27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28 backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28 anchors.fill: parent; 29 anchors.fill: parent;
29 image: backgroundImage.source ? backgroundImage : null; 30 source: backgroundImage.source ? backgroundImage : null;
30 property real luminance: Style.luminance(color); 31 property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image { 32 property Image backgroundImage: Image {
32 objectName: "backgroundImage"; 33 objectName: "backgroundImage";
33 source: { 34 source: {
3435
=== modified file 'tests/plugins/Dash/cardcreator/8.res'
--- tests/plugins/Dash/cardcreator/8.res 2015-07-10 07:49:48 +0000
+++ tests/plugins/Dash/cardcreator/8.res 2015-07-17 13:05:07 +0000
@@ -2,7 +2,7 @@
2 id: root; 2 id: root;
3 property var components; 3 property var components;
4 property var cardData; 4 property var cardData;
5 property var artShapeBorderSource: undefined; 5 property string artShapeStyle: "inset";
6 property real fontScale: 1.0; 6 property real fontScale: 1.0;
7 property var scopeStyle: null; 7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft; 8 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@
23 sourceComponent: UbuntuShape { 23 sourceComponent: UbuntuShape {
24 objectName: "background"; 24 objectName: "background";
25 radius: "medium"; 25 radius: "medium";
26 color: getColor(0) || "white"; 26 backgroundColor: getColor(0) || "white";
27 gradientColor: getColor(1) || color; 27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28 backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28 anchors.fill: parent; 29 anchors.fill: parent;
29 image: backgroundImage.source ? backgroundImage : null; 30 source: backgroundImage.source ? backgroundImage : null;
30 property real luminance: Style.luminance(color); 31 property real luminance: Style.luminance(backgroundColor);
31 property Image backgroundImage: Image { 32 property Image backgroundImage: Image {
32 objectName: "backgroundImage"; 33 objectName: "backgroundImage";
33 source: { 34 source: {
3435
=== modified file 'tests/qmltests/Dash/tst_Card.qml'
--- tests/qmltests/Dash/tst_Card.qml 2015-07-10 07:47:52 +0000
+++ tests/qmltests/Dash/tst_Card.qml 2015-07-17 13:05:07 +0000
@@ -443,11 +443,11 @@
443 }443 }
444444
445 if (data.hasOwnProperty("color")) {445 if (data.hasOwnProperty("color")) {
446 tryCompare(background, "color", data.color);446 tryCompare(background, "backgroundColor", data.color);
447 }447 }
448448
449 if (data.hasOwnProperty("gradientColor")) {449 if (data.hasOwnProperty("gradientColor")) {
450 tryCompare(background, "gradientColor", data.gradientColor);450 tryCompare(background, "secondaryBackgroundColor", data.gradientColor);
451 }451 }
452452
453 if (data.hasOwnProperty("image")) {453 if (data.hasOwnProperty("image")) {
@@ -520,7 +520,7 @@
520 waitForRendering(selector);520 waitForRendering(selector);
521 waitForRendering(card);521 waitForRendering(card);
522522
523 background.color = data.tag;523 background.backgroundColor = data.tag;
524524
525 var fontColor = data.dark ? theme.palette.normal.baseText : "white";525 var fontColor = data.dark ? theme.palette.normal.baseText : "white";
526526

Subscribers

People subscribed via source and target branches