Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
MenuSectionLabel.qml
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-License-Identifier: MPL-2.0
3
4import Fluid as MD
5import QtQuick
6
15Item {
16 id: control
17 objectName: "menuSectionLabel"
18 readonly property int _menuContentType: 3
19
21 property string text: ""
22
23 implicitWidth: label.implicitWidth + MD.Tokens.menu.verticalSectionLabelLeadingSpace
24 + MD.Tokens.menu.verticalSectionLabelTrailingSpace
25 implicitHeight: MD.Tokens.menu.verticalSectionLabelHeight
26 enabled: false
27 focus: false
28 Accessible.role: Accessible.StaticText
29 Accessible.name: text
30
31 MD.Label {
32 id: label
33 objectName: "menuSectionLabelText"
34 anchors.left: parent.left
35 anchors.right: parent.right
36 anchors.verticalCenter: parent.verticalCenter
37 anchors.leftMargin: MD.Tokens.menu.verticalSectionLabelLeadingSpace
38 anchors.rightMargin: MD.Tokens.menu.verticalSectionLabelTrailingSpace
39 text: control.text
40 typescale: MD.Tokens.typescale.labelLarge
41 color: control.MD.Style.onSurfaceVariantColor
42 horizontalAlignment: control.LayoutMirroring.enabled ? Text.AlignRight : Text.AlignLeft
43 elide: Text.ElideRight
44 }
45}