2020-06-17 19:31:01 +00:00
|
|
|
import QtQuick 2.13
|
2020-05-13 19:41:16 +00:00
|
|
|
import "../imports"
|
|
|
|
|
|
|
|
Rectangle {
|
2020-06-24 03:23:49 +00:00
|
|
|
id: root
|
2020-05-13 19:41:16 +00:00
|
|
|
property int size: 36
|
|
|
|
property color bg: Theme.blue
|
|
|
|
property url imgPath: ""
|
2020-06-24 03:23:49 +00:00
|
|
|
signal clicked
|
2020-05-13 19:41:16 +00:00
|
|
|
|
|
|
|
width: size
|
|
|
|
height: size
|
|
|
|
color: bg
|
2020-06-24 03:23:49 +00:00
|
|
|
radius: size / 2
|
2020-05-13 19:41:16 +00:00
|
|
|
|
2020-06-25 13:23:17 +00:00
|
|
|
SVGImage {
|
2020-05-13 20:18:16 +00:00
|
|
|
id: roundedIconImage
|
2020-05-13 19:41:16 +00:00
|
|
|
width: 12
|
|
|
|
height: 12
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: imgPath
|
|
|
|
}
|
2020-06-24 03:23:49 +00:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: mouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
|
|
|
root.clicked()
|
|
|
|
}
|
|
|
|
}
|
2020-05-13 19:41:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;formeditorZoom:1.75}
|
|
|
|
}
|
|
|
|
##^##*/
|