mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-24 03:30:59 +08:00
42 lines
1.1 KiB
QML
42 lines
1.1 KiB
QML
|
import QtQuick 2.15
|
|||
|
import QtQuick.Controls 2.15
|
|||
|
import QtQuick.Controls.impl 2.15
|
|||
|
import QtQuick.Templates 2.15 as T
|
|||
|
import QtQuick.Window 2.15
|
|||
|
import QtGraphicalEffects 1.15
|
|||
|
|
|||
|
T.Menu {
|
|||
|
id: control
|
|||
|
|
|||
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
|||
|
contentWidth + leftPadding + rightPadding)
|
|||
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
|||
|
contentHeight + topPadding + bottomPadding)
|
|||
|
margins: 0
|
|||
|
delegate: FluMenuItem { }
|
|||
|
|
|||
|
contentItem: ListView {
|
|||
|
implicitHeight: contentHeight
|
|||
|
model: control.contentModel
|
|||
|
interactive: Window.window ? contentHeight > Window.window.height : false
|
|||
|
clip: true
|
|||
|
currentIndex: control.currentIndex
|
|||
|
ScrollIndicator.vertical: ScrollIndicator {}
|
|||
|
}
|
|||
|
|
|||
|
background: Item {
|
|||
|
implicitWidth: 122
|
|||
|
implicitHeight: 30
|
|||
|
Rectangle{
|
|||
|
anchors.fill: parent
|
|||
|
color: "#FFFFFF"
|
|||
|
layer.effect: FluDropShadow{}
|
|||
|
layer.enabled: true
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|