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
1=== modified file 'plugins/Dash/CardCreator.js'
2--- plugins/Dash/CardCreator.js 2015-07-06 12:59:55 +0000
3+++ plugins/Dash/CardCreator.js 2015-07-17 13:05:07 +0000
4@@ -28,11 +28,12 @@
5 sourceComponent: UbuntuShape { \n\
6 objectName: "background"; \n\
7 radius: "medium"; \n\
8- color: getColor(0) || "white"; \n\
9- gradientColor: getColor(1) || color; \n\
10+ backgroundColor: getColor(0) || "white"; \n\
11+ secondaryBackgroundColor: getColor(1) || backgroundColor; \n\
12+ backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor; \n\
13 anchors.fill: parent; \n\
14- image: backgroundImage.source ? backgroundImage : null; \n\
15- property real luminance: Style.luminance(color); \n\
16+ source: backgroundImage.source ? backgroundImage : null; \n\
17+ property real luminance: Style.luminance(backgroundColor); \n\
18 property Image backgroundImage: Image { \n\
19 objectName: "backgroundImage"; \n\
20 source: { \n\
21@@ -52,7 +53,7 @@
22 // %1 is used as anchors of artShapeHolder
23 // %2 is used as image width
24 // %3 is used as image height
25-var kArtShapeHolderCode = 'Item { \n\
26+var kArtShapeHolderCode = 'Item { \n\
27 id: artShapeHolder; \n\
28 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
29 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\
30@@ -66,10 +67,9 @@
31 sourceComponent: Item { \n\
32 id: artShape; \n\
33 objectName: "artShape"; \n\
34- property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
35+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
36 visible: image.status == Image.Ready; \n\
37 readonly property alias image: artImage.image; \n\
38- property alias borderSource: artShapeShape.borderSource; \n\
39 ShaderEffectSource { \n\
40 id: artShapeSource; \n\
41 sourceItem: artImage; \n\
42@@ -78,16 +78,17 @@
43 height: 1; \n\
44 hideSource: doShapeItem; \n\
45 } \n\
46- Shape { \n\
47+ UbuntuShape { \n\
48 id: artShapeShape; \n\
49- image: artShapeSource; \n\
50+ source: artShapeSource; \n\
51 anchors.fill: parent; \n\
52 visible: doShapeItem; \n\
53 radius: "medium"; \n\
54+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat; \n\
55 } \n\
56 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
57 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
58- Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } \n\
59+ Component.onCompleted: { updateWidthHeightBindings(); } \n\
60 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\
61 function updateWidthHeightBindings() { \n\
62 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\
63@@ -112,44 +113,18 @@
64
65 var kOverlayLoaderCode = 'Loader { \n\
66 id: overlayLoader; \n\
67- anchors { \n\
68- left: artShapeHolder.left; \n\
69- right: artShapeHolder.right; \n\
70- bottom: artShapeHolder.bottom; \n\
71- } \n\
72+ readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
73+ anchors.fill: artShapeHolder; \n\
74 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
75 asynchronous: root.asynchronous; \n\
76 visible: showHeader && status == Loader.Ready; \n\
77- sourceComponent: ShaderEffect { \n\
78+ sourceComponent: UbuntuShapeOverlay { \n\
79 id: overlay; \n\
80- height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
81 property real luminance: Style.luminance(overlayColor); \n\
82- property color overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
83- property var source: ShaderEffectSource { \n\
84- id: shaderSource; \n\
85- sourceItem: artShapeLoader.item; \n\
86- onVisibleChanged: if (visible) scheduleUpdate(); \n\
87- live: false; \n\
88- sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height); \n\
89- } \n\
90- vertexShader: " \n\
91- uniform highp mat4 qt_Matrix; \n\
92- attribute highp vec4 qt_Vertex; \n\
93- attribute highp vec2 qt_MultiTexCoord0; \n\
94- varying highp vec2 coord; \n\
95- void main() { \n\
96- coord = qt_MultiTexCoord0; \n\
97- gl_Position = qt_Matrix * qt_Vertex; \n\
98- }"; \n\
99- fragmentShader: " \n\
100- varying highp vec2 coord; \n\
101- uniform sampler2D source; \n\
102- uniform lowp float qt_Opacity; \n\
103- uniform highp vec4 overlayColor; \n\
104- void main() { \n\
105- lowp vec4 tex = texture2D(source, coord); \n\
106- gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a; \n\
107- }"; \n\
108+ aspect: UbuntuShape.Flat; \n\
109+ radius: "medium"; \n\
110+ overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
111+ overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1); \n\
112 } \n\
113 }\n';
114
115@@ -325,7 +300,7 @@
116 id: root; \n\
117 property var components; \n\
118 property var cardData; \n\
119- property var artShapeBorderSource: undefined; \n\
120+ property string artShapeStyle: "inset"; \n\
121 property real fontScale: 1.0; \n\
122 property var scopeStyle: null; \n\
123 property int titleAlignment: Text.AlignLeft; \n\
124@@ -368,7 +343,6 @@
125 }
126
127 if (hasArt) {
128- code += 'onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } \n';
129 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
130
131 var widthCode, heightCode;
132@@ -555,7 +529,7 @@
133 titleAnchors += 'left: parent.left; \n\
134 leftMargin: units.gu(1); \n\
135 top: overlayLoader.top; \n\
136- topMargin: units.gu(1);\n';
137+ topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight; \n';
138 } else {
139 // Using anchors to the mascot/parent
140 titleAnchors = titleRightAnchor;
141
142=== modified file 'qml/Components/LazyImage.qml'
143--- qml/Components/LazyImage.qml 2015-06-18 10:07:37 +0000
144+++ qml/Components/LazyImage.qml 2015-07-17 13:05:07 +0000
145@@ -53,7 +53,7 @@
146 UbuntuShape {
147 id: placeholder
148 objectName: "placeholder"
149- color: "#22FFFFFF"
150+ backgroundColor: "#22FFFFFF"
151 anchors.fill: shape
152 visible: opacity != 0
153
154@@ -87,19 +87,18 @@
155
156 opacity: 0
157 visible: opacity != 0
158-
159- image: Image {
160+ sourceFillMode: UbuntuShape.PreserveAspectFit
161+ sourceHorizontalAlignment: UbuntuShape.AlignHCenter
162+ sourceVerticalAlignment: UbuntuShape.AlignVCenter
163+ source: Image {
164 id: image
165 objectName: "image"
166
167 property url nextSource
168 property string format: image.implicitWidth > image.implicitHeight ? "landscape" : "portrait"
169
170- fillMode: Image.PreserveAspectFit
171 asynchronous: true
172 cache: false
173- horizontalAlignment: Image.AlignHCenter
174- verticalAlignment: Image.AlignVCenter
175 sourceSize.width: root.scaleTo == "width" ? root.width
176 : root.scaleTo == "fit" && root.width <= root.height ? root.width
177 : 0
178
179=== modified file 'qml/Dash/CardCarousel.qml'
180--- qml/Dash/CardCarousel.qml 2015-06-23 12:17:02 +0000
181+++ qml/Dash/CardCarousel.qml 2015-07-17 13:05:07 +0000
182@@ -64,7 +64,7 @@
183 item.components = Qt.binding(function() { return cardTool.components; });
184 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
185 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
186- item.artShapeBorderSource = "none";
187+ item.artShapeStyle = "flat";
188 item.scopeStyle = cardCarousel.scopeStyle;
189 }
190
191
192=== modified file 'qml/Dash/Previews/PreviewAudioPlayback.qml'
193--- qml/Dash/Previews/PreviewAudioPlayback.qml 2015-06-18 09:30:17 +0000
194+++ qml/Dash/Previews/PreviewAudioPlayback.qml 2015-07-17 13:05:07 +0000
195@@ -175,7 +175,7 @@
196 }
197 height: units.dp(2)
198 visible: progressBarImage.visible
199- color: UbuntuColors.orange
200+ backgroundColor: UbuntuColors.orange
201 }
202
203 Image {
204
205=== modified file 'qml/Dash/Previews/PreviewHeader.qml'
206--- qml/Dash/Previews/PreviewHeader.qml 2015-06-23 12:17:02 +0000
207+++ qml/Dash/Previews/PreviewHeader.qml 2015-07-17 13:05:07 +0000
208@@ -78,15 +78,15 @@
209 sourceComponent: UbuntuShape {
210 objectName: "mascotShape"
211 visible: image.status === Image.Ready
212- image: Image {
213+ sourceFillMode: UbuntuShape.PreserveAspectCrop
214+ sourceHorizontalAlignment: UbuntuShape.AlignHCenter
215+ sourceVerticalAlignment: UbuntuShape.AlignVCenter
216+ source: Image {
217 source: headerRoot.mascot
218 width: source ? mascotShapeLoader.width : 0
219 height: mascotShapeLoader.height
220
221 sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
222- fillMode: Image.PreserveAspectCrop
223- horizontalAlignment: Image.AlignHCenter
224- verticalAlignment: Image.AlignVCenter
225 onStatusChanged: if (status === Image.Error) source = headerRoot.fallback;
226 }
227 }
228
229=== modified file 'qml/Dash/ScopesListCategoryItem.qml'
230--- qml/Dash/ScopesListCategoryItem.qml 2015-06-18 10:07:37 +0000
231+++ qml/Dash/ScopesListCategoryItem.qml 2015-07-17 13:05:07 +0000
232@@ -49,10 +49,10 @@
233 width: units.gu(5)
234 height: units.gu(5)
235 visible: !hideChildren
236- image: Image {
237+ sourceFillMode: UbuntuShape.PreserveAspectCrop
238+ source: Image {
239 id: shapeImage
240 cache: true
241- fillMode: Image.PreserveAspectCrop
242 sourceSize { width: shape.width; height: shape.height }
243 }
244 }
245
246=== modified file 'qml/Launcher/LauncherDelegate.qml'
247--- qml/Launcher/LauncherDelegate.qml 2015-06-18 10:07:37 +0000
248+++ qml/Launcher/LauncherDelegate.qml 2015-07-17 13:05:07 +0000
249@@ -51,13 +51,12 @@
250 anchors.fill: parent
251 anchors.margins: units.gu(1)
252 radius: "medium"
253- borderSource: "none"
254-
255- image: Image {
256+ aspect: UbuntuShape.Flat
257+ sourceFillMode: UbuntuShape.PreserveAspectCrop
258+ source: Image {
259 id: iconImage
260 sourceSize.width: iconShape.width
261 sourceSize.height: iconShape.height
262- fillMode: Image.PreserveAspectCrop
263 source: root.iconName
264 }
265 }
266@@ -80,9 +79,9 @@
267 }
268 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
269 height: units.gu(2)
270- color: UbuntuColors.orange
271+ backgroundColor: UbuntuColors.orange
272 visible: root.countVisible
273- borderSource: "none"
274+ aspect: UbuntuShape.Flat
275
276 Label {
277 id: countLabel
278
279=== modified file 'qml/Launcher/LauncherPanel.qml'
280--- qml/Launcher/LauncherPanel.qml 2015-07-10 07:47:35 +0000
281+++ qml/Launcher/LauncherPanel.qml 2015-07-17 13:05:07 +0000
282@@ -61,8 +61,8 @@
283 fill: parent
284 topMargin: -units.gu(2)
285 }
286- borderSource: "none"
287- color: UbuntuColors.orange
288+ aspect: UbuntuShape.Flat
289+ backgroundColor: UbuntuColors.orange
290 }
291
292 Image {
293
294=== modified file 'qml/Notifications/Notification.qml'
295--- qml/Notifications/Notification.qml 2015-07-10 07:47:35 +0000
296+++ qml/Notifications/Notification.qml 2015-07-17 13:05:07 +0000
297@@ -142,10 +142,10 @@
298 rightMargin: notification.margins
299 topMargin: type === Notification.Confirmation ? units.gu(.5) : 0
300 }
301- color: parent.color
302+ backgroundColor: parent.color
303 opacity: parent.opacity
304 radius: "medium"
305- borderSource: "none"
306+ aspect: UbuntuShape.Flat
307 }
308
309 Rectangle {
310@@ -345,8 +345,8 @@
311 }
312
313 height: units.gu(1)
314- color: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
315- borderSource: "none"
316+ backgroundColor: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
317+ aspect: UbuntuShape.Flat
318 radius: "small"
319
320 UbuntuShape {
321@@ -354,8 +354,8 @@
322 objectName: "innerBar"
323 width: valueIndicator.width * valueIndicator.value / 100
324 height: units.gu(1)
325- color: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
326- borderSource: "none"
327+ backgroundColor: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
328+ aspect: UbuntuShape.Flat
329 radius: "small"
330 }
331 }
332
333=== modified file 'qml/Notifications/OptionToggle.qml'
334--- qml/Notifications/OptionToggle.qml 2015-07-10 07:47:35 +0000
335+++ qml/Notifications/OptionToggle.qml 2015-07-17 13:05:07 +0000
336@@ -29,8 +29,8 @@
337
338 signal triggered(string id)
339
340- color: theme.palette.normal.base
341- borderSource: "none"
342+ backgroundColor: theme.palette.normal.base
343+ aspect: UbuntuShape.Flat
344 height: expanded ? (optionToggleRepeater.count - startIndex) * itemHeight : itemHeight
345 width: parent.width
346 radius: "medium"
347
348=== modified file 'qml/Notifications/SwipeToAct.qml'
349--- qml/Notifications/SwipeToAct.qml 2015-06-18 10:07:37 +0000
350+++ qml/Notifications/SwipeToAct.qml 2015-07-17 13:05:07 +0000
351@@ -68,16 +68,16 @@
352 id: row
353 width: parent.width
354 height: priv.sliderHeight
355- color: priv.sliderBGColor
356- borderSource: "none"
357+ backgroundColor: priv.sliderBGColor
358+ aspect: UbuntuShape.Flat
359
360 UbuntuShape {
361 id: leftShape
362 anchors.top: parent.top
363 anchors.left: parent.left
364 anchors.margins: priv.gap
365- color: UbuntuColors.red
366- borderSource: "none"
367+ backgroundColor: UbuntuColors.red
368+ aspect: UbuntuShape.Flat
369
370 state: "normal"
371 height: units.gu(6)
372@@ -155,10 +155,10 @@
373 }
374
375 z: 1
376- color: priv.sliderMainColor
377+ backgroundColor: priv.sliderMainColor
378 height: units.gu(6)
379 width: units.gu(6)
380- borderSource: "none"
381+ aspect: UbuntuShape.Flat
382 radius: "medium"
383 Icon {
384 anchors.fill: parent
385@@ -192,8 +192,8 @@
386 anchors.top: parent.top
387 anchors.right: parent.right
388 anchors.margins: priv.gap
389- color: UbuntuColors.green
390- borderSource: "none"
391+ backgroundColor: UbuntuColors.green
392+ aspect: UbuntuShape.Flat
393
394 state: "normal"
395 height: units.gu(6)
396
397=== modified file 'qml/Stages/Splash.qml'
398--- qml/Stages/Splash.qml 2015-07-14 07:39:55 +0000
399+++ qml/Stages/Splash.qml 2015-07-17 13:05:07 +0000
400@@ -121,14 +121,13 @@
401 visible: d.showIcon
402
403 radius: "medium"
404- borderSource: "none"
405-
406- image: Image {
407+ aspect: UbuntuShape.Flat
408+ sourceFillMode: Image.PreserveAspectCrop
409+ source: Image {
410 id: iconImage
411 sourceSize.width: iconShape.width
412 sourceSize.height: iconShape.height
413 source: d.showIcon ? root.icon : ""
414- fillMode: Image.PreserveAspectCrop
415 }
416 }
417
418
419=== modified file 'tests/plugins/Dash/cardcreator/1.res'
420--- tests/plugins/Dash/cardcreator/1.res 2015-07-06 12:59:55 +0000
421+++ tests/plugins/Dash/cardcreator/1.res 2015-07-17 13:05:07 +0000
422@@ -2,7 +2,7 @@
423 id: root;
424 property var components;
425 property var cardData;
426- property var artShapeBorderSource: undefined;
427+ property string artShapeStyle: "inset";
428 property real fontScale: 1.0;
429 property var scopeStyle: null;
430 property int titleAlignment: Text.AlignLeft;
431@@ -14,7 +14,6 @@
432 implicitWidth: childrenRect.width;
433 enabled: true;
434
435-onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
436 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
437 Item {
438 id: artShapeHolder;
439@@ -30,10 +29,9 @@
440 sourceComponent: Item {
441 id: artShape;
442 objectName: "artShape";
443- property bool doShapeItem: components["art"]["conciergeMode"] !== true;
444+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
445 visible: image.status == Image.Ready;
446 readonly property alias image: artImage.image;
447- property alias borderSource: artShapeShape.borderSource;
448 ShaderEffectSource {
449 id: artShapeSource;
450 sourceItem: artImage;
451@@ -42,16 +40,17 @@
452 height: 1;
453 hideSource: doShapeItem;
454 }
455- Shape {
456+ UbuntuShape {
457 id: artShapeShape;
458- image: artShapeSource;
459+ source: artShapeSource;
460 anchors.fill: parent;
461 visible: doShapeItem;
462 radius: "medium";
463+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
464 }
465 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
466 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
467- Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
468+ Component.onCompleted: { updateWidthHeightBindings(); }
469 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
470 function updateWidthHeightBindings() {
471 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
472
473=== modified file 'tests/plugins/Dash/cardcreator/2.res'
474--- tests/plugins/Dash/cardcreator/2.res 2015-07-06 12:59:55 +0000
475+++ tests/plugins/Dash/cardcreator/2.res 2015-07-17 13:05:07 +0000
476@@ -2,7 +2,7 @@
477 id: root;
478 property var components;
479 property var cardData;
480- property var artShapeBorderSource: undefined;
481+ property string artShapeStyle: "inset";
482 property real fontScale: 1.0;
483 property var scopeStyle: null;
484 property int titleAlignment: Text.AlignLeft;
485@@ -23,11 +23,12 @@
486 sourceComponent: UbuntuShape {
487 objectName: "background";
488 radius: "medium";
489- color: getColor(0) || "white";
490- gradientColor: getColor(1) || color;
491+ backgroundColor: getColor(0) || "white";
492+ secondaryBackgroundColor: getColor(1) || backgroundColor;
493+ backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
494 anchors.fill: parent;
495- image: backgroundImage.source ? backgroundImage : null;
496- property real luminance: Style.luminance(color);
497+ source: backgroundImage.source ? backgroundImage : null;
498+ property real luminance: Style.luminance(backgroundColor);
499 property Image backgroundImage: Image {
500 objectName: "backgroundImage";
501 source: {
502
503=== modified file 'tests/plugins/Dash/cardcreator/3.res'
504--- tests/plugins/Dash/cardcreator/3.res 2015-07-06 12:59:55 +0000
505+++ tests/plugins/Dash/cardcreator/3.res 2015-07-17 13:05:07 +0000
506@@ -2,7 +2,7 @@
507 id: root;
508 property var components;
509 property var cardData;
510- property var artShapeBorderSource: undefined;
511+ property string artShapeStyle: "inset";
512 property real fontScale: 1.0;
513 property var scopeStyle: null;
514 property int titleAlignment: Text.AlignLeft;
515@@ -14,7 +14,6 @@
516 implicitWidth: childrenRect.width;
517 enabled: true;
518
519-onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
520 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
521 Item {
522 id: artShapeHolder;
523@@ -30,10 +29,9 @@
524 sourceComponent: Item {
525 id: artShape;
526 objectName: "artShape";
527- property bool doShapeItem: components["art"]["conciergeMode"] !== true;
528+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
529 visible: image.status == Image.Ready;
530 readonly property alias image: artImage.image;
531- property alias borderSource: artShapeShape.borderSource;
532 ShaderEffectSource {
533 id: artShapeSource;
534 sourceItem: artImage;
535@@ -42,16 +40,17 @@
536 height: 1;
537 hideSource: doShapeItem;
538 }
539- Shape {
540+ UbuntuShape {
541 id: artShapeShape;
542- image: artShapeSource;
543+ source: artShapeSource;
544 anchors.fill: parent;
545 visible: doShapeItem;
546 radius: "medium";
547+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
548 }
549 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
550 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
551- Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
552+ Component.onCompleted: { updateWidthHeightBindings(); }
553 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
554 function updateWidthHeightBindings() {
555 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
556
557=== modified file 'tests/plugins/Dash/cardcreator/4.res'
558--- tests/plugins/Dash/cardcreator/4.res 2015-07-06 12:59:55 +0000
559+++ tests/plugins/Dash/cardcreator/4.res 2015-07-17 13:05:07 +0000
560@@ -2,7 +2,7 @@
561 id: root;
562 property var components;
563 property var cardData;
564- property var artShapeBorderSource: undefined;
565+ property string artShapeStyle: "inset";
566 property real fontScale: 1.0;
567 property var scopeStyle: null;
568 property int titleAlignment: Text.AlignLeft;
569
570=== modified file 'tests/plugins/Dash/cardcreator/5.res'
571--- tests/plugins/Dash/cardcreator/5.res 2015-07-06 12:59:55 +0000
572+++ tests/plugins/Dash/cardcreator/5.res 2015-07-17 13:05:07 +0000
573@@ -2,7 +2,7 @@
574 id: root;
575 property var components;
576 property var cardData;
577- property var artShapeBorderSource: undefined;
578+ property string artShapeStyle: "inset";
579 property real fontScale: 1.0;
580 property var scopeStyle: null;
581 property int titleAlignment: Text.AlignLeft;
582@@ -14,7 +14,6 @@
583 implicitWidth: childrenRect.width;
584 enabled: false;
585
586-onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
587 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
588 Item {
589 id: artShapeHolder;
590@@ -30,10 +29,9 @@
591 sourceComponent: Item {
592 id: artShape;
593 objectName: "artShape";
594- property bool doShapeItem: components["art"]["conciergeMode"] !== true;
595+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
596 visible: image.status == Image.Ready;
597 readonly property alias image: artImage.image;
598- property alias borderSource: artShapeShape.borderSource;
599 ShaderEffectSource {
600 id: artShapeSource;
601 sourceItem: artImage;
602@@ -42,16 +40,17 @@
603 height: 1;
604 hideSource: doShapeItem;
605 }
606- Shape {
607+ UbuntuShape {
608 id: artShapeShape;
609- image: artShapeSource;
610+ source: artShapeSource;
611 anchors.fill: parent;
612 visible: doShapeItem;
613 radius: "medium";
614+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
615 }
616 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
617 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
618- Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
619+ Component.onCompleted: { updateWidthHeightBindings(); }
620 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
621 function updateWidthHeightBindings() {
622 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
623@@ -75,44 +74,18 @@
624 }
625 Loader {
626 id: overlayLoader;
627- anchors {
628- left: artShapeHolder.left;
629- right: artShapeHolder.right;
630- bottom: artShapeHolder.bottom;
631- }
632- active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
633+ readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
634+ anchors.fill: artShapeHolder;
635+ active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
636 asynchronous: root.asynchronous;
637 visible: showHeader && status == Loader.Ready;
638- sourceComponent: ShaderEffect {
639+ sourceComponent: UbuntuShapeOverlay {
640 id: overlay;
641- height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
642- property real luminance: Style.luminance(overlayColor);
643- property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
644- property var source: ShaderEffectSource {
645- id: shaderSource;
646- sourceItem: artShapeLoader.item;
647- onVisibleChanged: if (visible) scheduleUpdate();
648- live: false;
649- sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height);
650- }
651- vertexShader: "
652- uniform highp mat4 qt_Matrix;
653- attribute highp vec4 qt_Vertex;
654- attribute highp vec2 qt_MultiTexCoord0;
655- varying highp vec2 coord;
656- void main() {
657- coord = qt_MultiTexCoord0;
658- gl_Position = qt_Matrix * qt_Vertex;
659- }";
660- fragmentShader: "
661- varying highp vec2 coord;
662- uniform sampler2D source;
663- uniform lowp float qt_Opacity;
664- uniform highp vec4 overlayColor;
665- void main() {
666- lowp vec4 tex = texture2D(source, coord);
667- gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a;
668- }";
669+ property real luminance: Style.luminance(overlayColor);
670+ aspect: UbuntuShape.Flat;
671+ radius: "medium";
672+ overlayColor: cardData && cardData["overlayColor"] || "#99000000";
673+ overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
674 }
675 }
676 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
677@@ -124,7 +97,7 @@
678 left: parent.left;
679 leftMargin: units.gu(1);
680 top: overlayLoader.top;
681- topMargin: units.gu(1);
682+ topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight;
683 }
684 elide: Text.ElideRight;
685 fontSize: "small";
686
687=== modified file 'tests/plugins/Dash/cardcreator/6.res'
688--- tests/plugins/Dash/cardcreator/6.res 2015-07-06 12:59:55 +0000
689+++ tests/plugins/Dash/cardcreator/6.res 2015-07-17 13:05:07 +0000
690@@ -2,7 +2,7 @@
691 id: root;
692 property var components;
693 property var cardData;
694- property var artShapeBorderSource: undefined;
695+ property string artShapeStyle: "inset";
696 property real fontScale: 1.0;
697 property var scopeStyle: null;
698 property int titleAlignment: Text.AlignLeft;
699@@ -23,11 +23,12 @@
700 sourceComponent: UbuntuShape {
701 objectName: "background";
702 radius: "medium";
703- color: getColor(0) || "white";
704- gradientColor: getColor(1) || color;
705+ backgroundColor: getColor(0) || "white";
706+ secondaryBackgroundColor: getColor(1) || backgroundColor;
707+ backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
708 anchors.fill: parent;
709- image: backgroundImage.source ? backgroundImage : null;
710- property real luminance: Style.luminance(color);
711+ source: backgroundImage.source ? backgroundImage : null;
712+ property real luminance: Style.luminance(backgroundColor);
713 property Image backgroundImage: Image {
714 objectName: "backgroundImage";
715 source: {
716
717=== modified file 'tests/plugins/Dash/cardcreator/7.res'
718--- tests/plugins/Dash/cardcreator/7.res 2015-07-06 12:59:55 +0000
719+++ tests/plugins/Dash/cardcreator/7.res 2015-07-17 13:05:07 +0000
720@@ -2,7 +2,7 @@
721 id: root;
722 property var components;
723 property var cardData;
724- property var artShapeBorderSource: undefined;
725+ property string artShapeStyle: "inset";
726 property real fontScale: 1.0;
727 property var scopeStyle: null;
728 property int titleAlignment: Text.AlignLeft;
729@@ -23,11 +23,12 @@
730 sourceComponent: UbuntuShape {
731 objectName: "background";
732 radius: "medium";
733- color: getColor(0) || "white";
734- gradientColor: getColor(1) || color;
735+ backgroundColor: getColor(0) || "white";
736+ secondaryBackgroundColor: getColor(1) || backgroundColor;
737+ backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
738 anchors.fill: parent;
739- image: backgroundImage.source ? backgroundImage : null;
740- property real luminance: Style.luminance(color);
741+ source: backgroundImage.source ? backgroundImage : null;
742+ property real luminance: Style.luminance(backgroundColor);
743 property Image backgroundImage: Image {
744 objectName: "backgroundImage";
745 source: {
746
747=== modified file 'tests/plugins/Dash/cardcreator/8.res'
748--- tests/plugins/Dash/cardcreator/8.res 2015-07-10 07:49:48 +0000
749+++ tests/plugins/Dash/cardcreator/8.res 2015-07-17 13:05:07 +0000
750@@ -2,7 +2,7 @@
751 id: root;
752 property var components;
753 property var cardData;
754- property var artShapeBorderSource: undefined;
755+ property string artShapeStyle: "inset";
756 property real fontScale: 1.0;
757 property var scopeStyle: null;
758 property int titleAlignment: Text.AlignLeft;
759@@ -23,11 +23,12 @@
760 sourceComponent: UbuntuShape {
761 objectName: "background";
762 radius: "medium";
763- color: getColor(0) || "white";
764- gradientColor: getColor(1) || color;
765+ backgroundColor: getColor(0) || "white";
766+ secondaryBackgroundColor: getColor(1) || backgroundColor;
767+ backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
768 anchors.fill: parent;
769- image: backgroundImage.source ? backgroundImage : null;
770- property real luminance: Style.luminance(color);
771+ source: backgroundImage.source ? backgroundImage : null;
772+ property real luminance: Style.luminance(backgroundColor);
773 property Image backgroundImage: Image {
774 objectName: "backgroundImage";
775 source: {
776
777=== modified file 'tests/qmltests/Dash/tst_Card.qml'
778--- tests/qmltests/Dash/tst_Card.qml 2015-07-10 07:47:52 +0000
779+++ tests/qmltests/Dash/tst_Card.qml 2015-07-17 13:05:07 +0000
780@@ -443,11 +443,11 @@
781 }
782
783 if (data.hasOwnProperty("color")) {
784- tryCompare(background, "color", data.color);
785+ tryCompare(background, "backgroundColor", data.color);
786 }
787
788 if (data.hasOwnProperty("gradientColor")) {
789- tryCompare(background, "gradientColor", data.gradientColor);
790+ tryCompare(background, "secondaryBackgroundColor", data.gradientColor);
791 }
792
793 if (data.hasOwnProperty("image")) {
794@@ -520,7 +520,7 @@
795 waitForRendering(selector);
796 waitForRendering(card);
797
798- background.color = data.tag;
799+ background.backgroundColor = data.tag;
800
801 var fontColor = data.dark ? theme.palette.normal.baseText : "white";
802

Subscribers

People subscribed via source and target branches