diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-23 12:52:14 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-23 12:52:14 +0800 |
commit | 684ad4e18dd4e0e9567a63a95694e9103a6454c8 (patch) | |
tree | 758a9edb087d866192f6a256741b1fa597efa50d /Shop/Checkout.ui.qml | |
parent | b3d2b1fc6251d2a75a45ef88477cbf6ed5aa9eb7 (diff) |
Success button and its reuse
Diffstat (limited to 'Shop/Checkout.ui.qml')
-rw-r--r-- | Shop/Checkout.ui.qml | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/Shop/Checkout.ui.qml b/Shop/Checkout.ui.qml index 5358c46..0409590 100644 --- a/Shop/Checkout.ui.qml +++ b/Shop/Checkout.ui.qml @@ -5,6 +5,7 @@ import Bootstrap 5.3 import Eduport 1.4 import "../TextField" as TxtFld import "../Label" as Lbl +import "../Button" as Btn Flickable { property alias alert: alert @@ -591,23 +592,31 @@ Flickable { } } - Button { + Btn.Success { id: placeOrder Layout.margins: 16 Layout.fillWidth: true text: qsTr("Place Order") - font: Bootstrap.btnFont implicitHeight: 36 - contentItem: Text { - text: placeOrder.text - font: placeOrder.font - color: "#ffffff" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter + font { + family: Bootstrap.btnFont.family + weight: Bootstrap.btnFont.weight + pointSize: Bootstrap.btnLgFontSize } background: Rectangle { - color: "#0cbc87" - radius: 8 + color: placeOrder.down ? Bootstrap.btnSuccessActiveBG + : placeOrder.enabled + ? Bootstrap.btnSuccessBg + : Bootstrap.btnSuccessDisabledBg + border { + width: Bootstrap.btnBorderWidth + color: placeOrder.down + ? Bootstrap.btnSuccessActiveBorderColor + : placeOrder.enabled + ? Bootstrap.btnSuccessBorderColor + : Bootstrap.btnSuccessDisabledBorderColor + } + radius: Bootstrap.btnLgBorderRadius } } } |