@@ -38,15 +38,16 @@ PreviewWidget {
38 objectName: "paymentButton"
38 objectName: "paymentButton"
40 color: Theme.palette.selected.foreground
40 color: Theme.palette.selected.foreground
41− text: root.processActive ? i18n.tr("Purchasing…") : paymentClient.formattedPrice
41+ text: paymentClient.formattedPrice
42 onClicked: {
42 onClicked: {
43 root.processActive = true;
43 root.processActive = true;
44− root.processing(root.processActive);
45 paymentClient.start();
44 paymentClient.start();
47 enabled: !root.processActive
46 enabled: !root.processActive
48 anchors.right: parent.right
47 anchors.right: parent.right
49 width: (root.width - units.gu(1)) / 2
48 width: (root.width - units.gu(1)) / 2
49+ opacity: root.processActive ? 0 : 1
50+ Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.SlowDuration}}
51 Payments {
52 Payments {
52 id: paymentClient
53 id: paymentClient
@@ -57,15 +58,21 @@ PreviewWidget {
57 currency: source["currency"]
58 currency: source["currency"]
58 storeItemId: source["store_item_id"]
59 storeItemId: source["store_item_id"]
59 onPurchaseCompleted: {
60 onPurchaseCompleted: {
60− root.processActive = false;
61− root.processing(root.processActive);
62 root.triggered(widgetId, "purchaseCompleted", source);
61 root.triggered(widgetId, "purchaseCompleted", source);
64 onPurchaseError: {
63 onPurchaseError: {
65− root.processActive = false;
66− root.processing(root.processActive);
67 root.triggered(widgetId, "purchaseError", source);
64 root.triggered(widgetId, "purchaseError", source);
72+ anchors.right: parent.right
73+ width: (root.width - units.gu(1)) / 2
74+ opacity: root.processActive ? 1 : 0
76+ Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.SlowDuration}}