diff options
-rw-r--r-- | Header.ui.qml | 41 | ||||
-rw-r--r-- | Header/CartItem.ui.qml | 3 |
2 files changed, 22 insertions, 22 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 { diff --git a/Header/CartItem.ui.qml b/Header/CartItem.ui.qml index 83600a5..210254a 100644 --- a/Header/CartItem.ui.qml +++ b/Header/CartItem.ui.qml @@ -22,7 +22,8 @@ ColumnLayout { } RowLayout { - Layout.margins: 16 + Layout.leftMargin: 16 + Layout.rightMargin: 16 Image { Layout.alignment: Qt.AlignTop |