diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-30 15:12:00 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-30 15:12:00 +0800 |
commit | 8eb5964a322f62ae1319cd7dcc6fadab9a2f552c (patch) | |
tree | 4692a700384eb5b713b4e61340095a2bb40922d4 | |
parent | 61bcce08d358c36d6e1cd9d9908229589a0eb374 (diff) |
Header cart buttons
-rw-r--r-- | Button/Btn.ui.qml | 3 | ||||
-rw-r--r-- | Button/Light.ui.qml | 15 | ||||
-rw-r--r-- | Eduport.qrc | 1 | ||||
-rw-r--r-- | Header.ui.qml | 39 | ||||
-rw-r--r-- | imports/Eduport/Eduport.qml | 10 |
5 files changed, 67 insertions, 1 deletions
diff --git a/Button/Btn.ui.qml b/Button/Btn.ui.qml index 1d58fe8..32bf2ca 100644 --- a/Button/Btn.ui.qml +++ b/Button/Btn.ui.qml @@ -12,6 +12,7 @@ Button { property color bsBtnDisabledColor: Eduport.bsBtnColor property color bsBtnDisabledBg: Eduport.bsBtnBg property color bsBtnDisabledBorderColor: Eduport.bsBtnBorderColor + property real bsBtnBorderRadius: Eduport.bsBtnBorderRadius id: button horizontalPadding: Eduport.bsBtnPaddingX verticalPadding: Eduport.bsBtnPaddingY @@ -37,6 +38,6 @@ Button { width: Eduport.bsBtnBorderWidth color: bsBtnBorderColor } - radius: Eduport.bsBtnBorderRadius + radius: bsBtnBorderRadius } } diff --git a/Button/Light.ui.qml b/Button/Light.ui.qml new file mode 100644 index 0000000..38bbe14 --- /dev/null +++ b/Button/Light.ui.qml @@ -0,0 +1,15 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import Eduport 1.4 + +Btn { + bsBtnColor: Eduport.bsGray900 + bsBtnBg: Eduport.bsLight + bsBtnBorderColor: bsBtnBg + bsBtnActiveColor: Eduport.bsBtnLightActiveColor + bsBtnActiveBg: Eduport.bsBtnLightActiveBg + bsBtnActiveBorderColor: Eduport.bsBtnLightActiveBorderColor + bsBtnDisabledColor: Eduport.bsBtnLightDisabledColor + bsBtnDisabledBg: Eduport.bsBtnLightDisabledBg + bsBtnDisabledBorderColor: Eduport.bsBtnLightDisabledBorderColor +} diff --git a/Eduport.qrc b/Eduport.qrc index bbd82fa..0ea226a 100644 --- a/Eduport.qrc +++ b/Eduport.qrc @@ -17,6 +17,7 @@ <file>Button/Primary.ui.qml</file> <file>Button/Outline/Primary.ui.qml</file> <file>Button/Success.ui.qml</file> + <file>Button/Light.ui.qml</file> <file>Button/NavLink.ui.qml</file> <file>Button/NavLink/TabsLine.ui.qml</file> <file>DropShadow/Box.ui.qml</file> diff --git a/Header.ui.qml b/Header.ui.qml index 54eae75..aebdc4e 100644 --- a/Header.ui.qml +++ b/Header.ui.qml @@ -10,6 +10,8 @@ import "Label" as Lbl ToolBar { property alias logo: logo property alias cart: cart + property alias cartMenu: cartMenu + property alias checkout: checkout property alias profile: profile property string imageSource: "https://eduport.webestica.com/assets/images/avatar/01.jpg" property alias menu: menu @@ -123,11 +125,48 @@ ToolBar { } Menu { + id: cartMenu y: parent.height background: Loader { width: 256 sourceComponent: background } + + Lbl.H5 { + text: qsTr("Cart items") + topPadding: 25.6 + leftPadding: 16 + rightPadding: 16 + bottomPadding: 25.6 + } + + Loader { + sourceComponent: menuSeparator + } + + RowLayout { + + Btn.Light { + id: viewCart + text: qsTr("View Cart") + horizontalPadding: 12.8 + verticalPadding: 6.4 + font.pointSize: 13 + bsBtnBorderRadius: 3.2 + Layout.margins: 16 + } + + Btn.Success { + id: checkout + text: qsTr("Checkout") + horizontalPadding: 12.8 + verticalPadding: 6.4 + font.pointSize: 13 + bsBtnBorderRadius: 3.2 + Layout.margins: 16 + Layout.alignment: Qt.AlignRight + } + } } } diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml index f9cfe9d..0077b7a 100644 --- a/imports/Eduport/Eduport.qml +++ b/imports/Eduport/Eduport.qml @@ -109,6 +109,16 @@ QtObject { property color bsBtnSuccessDisabledBg: "#a60cbc87" property color bsBtnSuccessDisabledBorderColor: bsBtnSuccessDisabledBg + property color bsBtnLightColor: "#000000" + property color bsBtnLightBg: "#f5f7f9" + property color bsBtnLightBorderColor: bsBtnLightBg + property color bsBtnLightActiveColor: bsBtnLightColor + property color bsBtnLightActiveBg: "#c4c6c7" + property color bsBtnLightActiveBorderColor: "#b8b9bb" + property color bsBtnLightDisabledColor: "#a6000000" + property color bsBtnLightDisabledBg: "#a6f5f7f9" + property color bsBtnLightDisabledBorderColor: bsBtnLightDisabledBg + property color bsCardBg: mode ? "#1b1e21" : "#ffffff" property color bsCardTitleColor: mode ? "#f7f5f5" : "#24292d" |