FluentUI/src/controls/FluMenu.qml

41 lines
890 B
QML
Raw Normal View History

2023-03-02 18:21:43 +08:00
import QtQuick 2.15
2023-03-02 23:58:50 +08:00
import QtQuick.Layouts 1.15
2023-03-02 18:21:43 +08:00
import QtQuick.Controls 2.15
2023-03-16 22:06:08 +08:00
import QtGraphicalEffects 1.15
2023-03-02 18:21:43 +08:00
2023-03-13 18:23:46 +08:00
Menu {
2023-03-02 23:58:50 +08:00
id: popup
2023-03-13 18:23:46 +08:00
default property alias content: container.data
2023-03-02 23:58:50 +08:00
2023-03-16 14:34:20 +08:00
width: 140
height: container.height
2023-03-16 22:06:08 +08:00
background: Item {
Rectangle{
anchors.fill: parent
color:FluTheme.isDark ? Qt.rgba(45/255,45/255,45/255,0.97) : Qt.rgba(237/255,237/255,237/255,0.97)
radius: 5
layer.enabled: true
layer.effect: GaussianBlur {
radius: 8
samples: 16
}
}
2023-03-09 15:49:37 +08:00
2023-03-03 18:19:48 +08:00
FluShadow{
radius: 5
}
2023-03-02 23:58:50 +08:00
Column{
spacing: 5
topPadding: 5
bottomPadding: 5
2023-03-16 14:34:20 +08:00
width: popup.width
2023-03-02 23:58:50 +08:00
id:container
function closePopup(){
popup.close()
}
2023-03-02 18:21:43 +08:00
}
}
}