2021-02-11 15:50:59 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtGraphicalEffects 1.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import QtQuick.Dialogs 1.3
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2021-10-18 10:34:16 +00:00
|
|
|
import StatusQ.Controls 0.1
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2021-02-11 15:50:59 +00:00
|
|
|
|
|
|
|
Menu {
|
|
|
|
id: root
|
|
|
|
width: 132
|
|
|
|
height: 36
|
|
|
|
|
|
|
|
onClosed: {
|
|
|
|
messageInputField.deselect()
|
|
|
|
}
|
|
|
|
|
|
|
|
background: Item {
|
|
|
|
id: menuBackground
|
|
|
|
Rectangle {
|
|
|
|
id: menuBackgroundContent
|
|
|
|
implicitWidth: menuBackground.width
|
|
|
|
implicitHeight: menuBackground.height
|
|
|
|
color: Style.current.modalBackground
|
|
|
|
radius: Style.current.radius
|
|
|
|
layer.enabled: true
|
|
|
|
layer.effect: DropShadow{
|
|
|
|
width: menuBackgroundContent.width
|
|
|
|
height: menuBackgroundContent.height
|
|
|
|
x: menuBackgroundContent.x
|
|
|
|
visible: menuBackgroundContent.visible
|
|
|
|
source: menuBackgroundContent
|
|
|
|
horizontalOffset: 0
|
|
|
|
verticalOffset: 4
|
|
|
|
radius: 12
|
|
|
|
samples: 25
|
|
|
|
spread: 0.2
|
|
|
|
color: "#22000000"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: Item {
|
|
|
|
width: root.width
|
|
|
|
height: root.height
|
|
|
|
Row {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
Repeater {
|
|
|
|
model: root.contentModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
delegate: MenuItem {
|
|
|
|
id: menuItem
|
|
|
|
width: 32
|
|
|
|
height: 32
|
|
|
|
leftPadding: 0
|
|
|
|
topPadding: 0
|
|
|
|
action: Action {}
|
|
|
|
contentItem: Item {
|
2021-10-18 10:34:16 +00:00
|
|
|
StatusFlatRoundButton {
|
|
|
|
width: 32
|
|
|
|
height: 32
|
|
|
|
icon.width: 24
|
|
|
|
icon.height: 24
|
2021-02-11 15:50:59 +00:00
|
|
|
icon.name: menuItem.action.icon.name
|
2021-03-03 15:38:46 +00:00
|
|
|
highlighted: menuItem.action.checked
|
2021-10-18 10:34:16 +00:00
|
|
|
tooltip.text: menuItem.action.text
|
|
|
|
type: StatusFlatRoundButton.Type.Tertiary
|
|
|
|
onClicked: menuItem.action.actionTriggered()
|
2021-02-11 15:50:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|