FluentUI/src/controls/FluMenuItem.qml

30 lines
831 B
QML
Raw Normal View History

2023-03-02 18:21:43 +08:00
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls.impl 2.15
import QtQuick.Templates 2.15 as T
import QtQuick.Shapes 1.15
T.MenuItem {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
padding: 0
spacing: 6
contentItem: FluText {
text: control.text
}
background: Rectangle {
implicitWidth: 120
implicitHeight: 30
width: control.width
height: control.height
}
}