@@ -38,15 +38,16 @@ PreviewWidget {
3838 objectName: "paymentButton"
3939
4040 color: Theme.palette.selected.foreground
41− text: root.processActive ? i18n.tr("Purchasing…") : paymentClient.formattedPrice
41+ text: paymentClient.formattedPrice
4242 onClicked: {
4343 root.processActive = true;
44− root.processing(root.processActive);
4544 paymentClient.start();
4645 }
4746 enabled: !root.processActive
4847 anchors.right: parent.right
4948 width: (root.width - units.gu(1)) / 2
49+ opacity: root.processActive ? 0 : 1
50+ Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.SlowDuration}}
5051
5152 Payments {
5253 id: paymentClient
@@ -57,15 +58,21 @@ PreviewWidget {
5758 currency: source["currency"]
5859 storeItemId: source["store_item_id"]
5960 onPurchaseCompleted: {
60− root.processActive = false;
61− root.processing(root.processActive);
6261 root.triggered(widgetId, "purchaseCompleted", source);
6362 }
6463 onPurchaseError: {
65− root.processActive = false;
66− root.processing(root.processActive);
6764 root.triggered(widgetId, "purchaseError", source);
6865 }
6966 }
7067 }
68+
69+ ProgressBar {
70+ id: loadingBar
71+ indeterminate: true
72+ anchors.right: parent.right
73+ width: (root.width - units.gu(1)) / 2
74+ opacity: root.processActive ? 1 : 0
75+
76+ Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.SlowDuration}}
77+ }
7178}