summaryrefslogtreecommitdiff
path: root/Shop/ProductDetail/LeftSidebar.ui.qml
blob: 6025b8ce2e33a6e45ce2cbdbfce307826b527a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Effects
import Eduport
import "../../Button"
import "../../DropShadow"


Rectangle {
	id: sidebarCard
	height: sidebarCardImage.height + cardBody.height

	Image {
		id: sidebarCardImage
		anchors.left: parent.left
		anchors.right: parent.right
		anchors.top: parent.top
		anchors.rightMargin: 0
		anchors.leftMargin: 0
		anchors.topMargin: 0
		source: "https://eduport.webestica.com/assets/images/book/01.jpg"
		sourceSize {
			width: parent.width
			height: sidebarCardImage.width
		}
		fillMode: Image.PreserveAspectCrop
		layer {
			enabled: true
			effect: MultiEffect {
				maskEnabled: true
				maskSource: maskRectangle
			}
		}
		Rectangle {
			id: maskRectangle
			width: sidebarCardImage.sourceSize.width
			height: sidebarCardImage.sourceSize.height
			radius: 8
			layer.enabled: true
			visible: false
		}
	}
	RowLayout {
		id: cardBody
		anchors.right: parent.right
		anchors.left: parent.left
		anchors.top: sidebarCardImage.bottom
		anchors.rightMargin: 0
		anchors.leftMargin: 0
		anchors.topMargin: 0
		anchors.bottomMargin: 0

		GridLayout {
			rowSpacing: 16
			columnSpacing: 16
			Layout.bottomMargin: 16
			Layout.rightMargin: 20
			Layout.leftMargin: 20
			Layout.topMargin: 16
			Layout.fillHeight: true
			Layout.fillWidth: true
			columns: sidebarCard.width > 360 ? 2 : 1
			Success {
				id: addToCart
				text: "Add to cart"
				Layout.fillWidth: true
			}
			Light {
				id: wishlist
				text: "Add to wishlist"
				Layout.fillWidth: true
			}
		}
	}
}