linphone-desktop/Linphone/view/Control/Display/Settings/SettingsMenuItem.qml
Gaelle Braud 4b1cb237bf fix typo #LINQT-1876
fix chat room menu ui #LINQT-1872

update current chat message list when current chat removed #LINQT-1873

fix : remove unused connect disconnecting a usefull one
2025-08-07 15:53:47 +02:00

68 lines
1.7 KiB
QML

import QtQuick
import QtQuick.Controls.Basic as Control
import QtQuick.Layouts
import QtQuick.Effects
import Linphone
Item {
id: mainItem
height: visible ? Math.round(50 * DefaultStyle.dp) : 0
anchors.right: parent.right
anchors.left: parent.left
property string titleText
property bool isSelected: false
property bool shadowEnabled: mainItem.activeFocus || mouseArea.containsMouse
signal selected()
Keys.onPressed: (event)=>{
if(event.key == Qt.Key_Space || event.key == Qt.Key_Return || event.key == Qt.Key_Enter){
mainItem.selected()
}
}
MouseArea {
id: mouseArea
hoverEnabled: true
anchors.fill: parent
Rectangle {
id: background
anchors.fill: parent
color: DefaultStyle.main2_200
radius: Math.round(35 * DefaultStyle.dp)
visible: parent.containsMouse || isSelected || mainItem.shadowEnabled
}
Rectangle {
id: backgroundRightFiller
anchors.right: parent.right
color: DefaultStyle.main2_200
width: Math.round(35 * DefaultStyle.dp)
height: Math.round(50 * DefaultStyle.dp)
visible: parent.containsMouse || isSelected
}
// MultiEffect {
// enabled: mainItem.shadowEnabled
// anchors.fill: background
// source: background
// visible: mainItem.shadowEnabled
// // Crash : https://bugreports.qt.io/browse/QTBUG-124730
// shadowEnabled: true //mainItem.shadowEnabled
// shadowColor: DefaultStyle.grey_1000
// shadowBlur: 0.1
// shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
// }
onClicked: {
mainItem.selected()
}
}
Text {
anchors.margins: 25
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: titleText
font: Typography.h4
}
}