2020-10-27 20:53:22 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status"
|
|
|
|
import "../../../../imports"
|
|
|
|
|
|
|
|
Item {
|
|
|
|
property url source: "../../../img/globe.svg"
|
|
|
|
property string text
|
2020-10-29 20:07:52 +00:00
|
|
|
signal clicked(mouse: var)
|
|
|
|
signal rightClicked(mouse: var)
|
2020-10-27 20:53:22 +00:00
|
|
|
|
|
|
|
id: root
|
|
|
|
width: 74
|
|
|
|
height: bookmarkImage.height + bookmarkName.height + Style.current.halfPadding
|
|
|
|
|
|
|
|
SVGImage {
|
|
|
|
id: bookmarkImage
|
|
|
|
source: root.source
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: 48
|
|
|
|
height: 48
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: bookmarkName
|
|
|
|
text: root.text
|
|
|
|
width: parent.width
|
|
|
|
anchors.top: bookmarkImage.bottom
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.topMargin: Style.current.halfPadding
|
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
2020-10-29 20:07:52 +00:00
|
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
|
|
onClicked: {
|
|
|
|
if (mouse.button == Qt.RightButton) {
|
|
|
|
root.rightClicked(mouse)
|
|
|
|
} else {
|
|
|
|
root.clicked(mouse)
|
|
|
|
}
|
|
|
|
}
|
2020-10-27 20:53:22 +00:00
|
|
|
}
|
|
|
|
}
|