on xenial help sign in
improves requested
1814087Diego Sarmentero
qml/Dash/Previews/PreviewPayments.qml+6−9
@@ -31,8 +31,6 @@ PreviewWidget {
31 implicitHeight: paymentButton.implicitHeight
31 implicitHeight: paymentButton.implicitHeight
32 implicitWidth: paymentButton.implicitWidth
32 implicitWidth: paymentButton.implicitWidth
33
33
34− property bool processActive: false
35−
36 Button {
34 Button {
37 id: paymentButton
35 id: paymentButton
38 objectName: "paymentButton"
36 objectName: "paymentButton"
@@ -43,11 +41,10 @@ PreviewWidget {
43 paymentClient.start();
41 paymentClient.start();
44 root.processActive = true;
42 root.processActive = true;
45 }
43 }
46− enabled: !root.processActive
47 anchors.right: parent.right
44 anchors.right: parent.right
48 width: (root.width - units.gu(1)) / 2
45 width: (root.width - units.gu(1)) / 2
49− opacity: root.processActive ? 0 : 1
46+ visible: opacity == 0 ? false : true
50− Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.SlowDuration}}
47+ Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.FastDuration}}
51
48
52 Payments {
49 Payments {
53 id: paymentClient
50 id: paymentClient
@@ -69,10 +66,10 @@ PreviewWidget {
69 ProgressBar {
66 ProgressBar {
70 id: loadingBar
67 id: loadingBar
71 indeterminate: true
68 indeterminate: true
72− anchors.right: parent.right
69+ anchors.fill: paymentButton
73− width: (root.width - units.gu(1)) / 2
70+ opacity: 1 - paymentsButton.opacity
74− opacity: root.processActive ? 1 : 0
71+ visible: opacity == 0 ? false : true
75
72
76− Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.SlowDuration}}
73+ Behavior on opacity { PropertyAnimation {duration: UbuntuAnimation.FastDuration}}
77 }
74 }
78}
75}
qml/Dash/Previews/PreviewWidget.qml−2
@@ -41,7 +41,5 @@ Item {
41 */
41 */
42 signal triggered(string widgetId, string actionId, var data)
42 signal triggered(string widgetId, string actionId, var data)
43
43
44− signal processing(bool active)
45−
46 objectName: widgetId
44 objectName: widgetId
47}
45}
qml/Dash/Previews/PreviewWidgetFactory.qml−3
@@ -43,8 +43,6 @@ Loader {
43 //! Triggered signal forwarded from the widgets.
43 //! Triggered signal forwarded from the widgets.
44 signal triggered(string widgetId, string actionId, var data)
44 signal triggered(string widgetId, string actionId, var data)
45
45
46− signal processing(bool active)
47−
48 source: widgetSource
46 source: widgetSource
49
47
50 //! \cond private
48 //! \cond private
@@ -78,6 +76,5 @@ Loader {
78 Connections {
76 Connections {
79 target: root.item
77 target: root.item
80 onTriggered: root.triggered(widgetId, actionId, data)
78 onTriggered: root.triggered(widgetId, actionId, data)
81− onProcessing: root.processing(active)
82 }
79 }
83}
80}