2018-09-04 06:58:41 +00:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Controls.Material 2.2
|
2018-09-17 13:01:02 +00:00
|
|
|
import Spectral.Settings 0.1
|
2018-09-04 06:58:41 +00:00
|
|
|
|
|
|
|
Control {
|
|
|
|
property bool highlighted: false
|
|
|
|
property bool colored: false
|
|
|
|
|
|
|
|
readonly property bool darkBackground: highlighted ? true : MSettings.darkTheme
|
|
|
|
|
|
|
|
padding: 12
|
|
|
|
|
|
|
|
AutoMouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2018-09-11 05:14:56 +00:00
|
|
|
onSecondaryClicked: {
|
|
|
|
messageContextMenu.row = messageRow
|
2018-09-12 00:27:34 +00:00
|
|
|
messageContextMenu.model = model
|
2018-09-11 05:14:56 +00:00
|
|
|
messageContextMenu.popup()
|
|
|
|
}
|
2018-09-04 06:58:41 +00:00
|
|
|
}
|
2018-09-04 13:13:14 +00:00
|
|
|
|
2018-09-26 23:37:09 +00:00
|
|
|
background: Rectangle {
|
|
|
|
color: colored ? Material.accent : highlighted ? Material.primary : Material.background
|
|
|
|
|
|
|
|
layer.enabled: true
|
|
|
|
layer.effect: ElevationEffect {
|
|
|
|
elevation: 2
|
|
|
|
}
|
|
|
|
}
|
2018-09-04 06:58:41 +00:00
|
|
|
}
|