diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-31 11:29:05 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-31 11:29:05 +0800 |
commit | 4a1003f2d4d40512f3f64e1b6d65f27edb6a62c0 (patch) | |
tree | 3e8b29a13687eae9773cab63624381a9cb7c0038 /Header.ui.qml | |
parent | f65528b4389488e3bdf63d2efd3f3bfbb0217e60 (diff) |
Actions/MenuItems part is replaced by ListView
Later Menu should be replaced by Popup, since the cart
is not supposed to be a menu anyway. It's more of a popup.
Diffstat (limited to 'Header.ui.qml')
-rw-r--r-- | Header.ui.qml | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/Header.ui.qml b/Header.ui.qml index daa2af1..3262240 100644 --- a/Header.ui.qml +++ b/Header.ui.qml @@ -12,6 +12,7 @@ ToolBar { property alias logo: logo property alias cart: cart property alias cartMenu: cartMenu + property alias cartItems: cartItems property alias checkout: checkout property alias profile: profile property string profileImageSource: @@ -134,15 +135,6 @@ ToolBar { width: 256 sourceComponent: background } - delegate: MenuItem { - contentItem: CartItem { - imageSource: icon.source - titleText: text - } - background: Rectangle { - color: "transparent" - } - } Lbl.H5 { text: qsTr("Cart items") @@ -152,18 +144,25 @@ ToolBar { bottomPadding: 25.6 } - Action { - icon.source: - "https://eduport.webestica.com/assets/images/book/02.jpg" - text: - "Angular 4 Tutorial in audio (Compact Disk)" - } - - Action { - icon.source: - "https://eduport.webestica.com/assets/images/book/04.jpg" - text: - "The Principles of Beautiful Graphics Design (Paperback)" + ListView { + id: cartItems + interactive: false + implicitHeight: count * 120 + model: ListModel { + ListElement { + image: "https://eduport.webestica.com/assets/images/book/02.jpg" + title: "Angular 4 Tutorial in audio (Compact Disk)" + } + ListElement { + image: "https://eduport.webestica.com/assets/images/book/04.jpg" + title: "The Principles of Beautiful Graphics Design (Paperback)" + } + } + delegate: CartItem { + width: cartItems.width + imageSource: image + titleText: title + } } Loader { |