From 8eb5964a322f62ae1319cd7dcc6fadab9a2f552c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 30 Mar 2023 15:12:00 +0800 Subject: Header cart buttons --- Button/Btn.ui.qml | 3 ++- Button/Light.ui.qml | 15 +++++++++++++++ Eduport.qrc | 1 + Header.ui.qml | 39 +++++++++++++++++++++++++++++++++++++++ imports/Eduport/Eduport.qml | 10 ++++++++++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 Button/Light.ui.qml 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 @@ Button/Primary.ui.qml Button/Outline/Primary.ui.qml Button/Success.ui.qml + Button/Light.ui.qml Button/NavLink.ui.qml Button/NavLink/TabsLine.ui.qml DropShadow/Box.ui.qml 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" -- cgit v1.2.3