3import QtQuick.Controls as QQC
6import org.mauikit.controls as Maui
27 default property alias content: _content.data
33 property alias leftContent: _leftContent.data
39 property alias rightContent: _rightContent.data
45 property alias underlayContent: _underlay.data
53 property bool closeButtonVisible: true
66 signal rightClicked(var mouse)
68 contentItem: MouseArea
70 implicitWidth: _layout.implicitWidth
71 implicitHeight: _layout.implicitHeight
73 acceptedButtons: Qt.RightButton
74 propagateComposedEvents: true
75 preventStealing: false
79 if(mouse.button === Qt.RightButton)
81 control.rightClicked(mouse)
84 mouse.accepted = false
97 anchors.rightMargin: _badgeLoader.visible ? 8 : 0
99 spacing: control.spacing
109 Layout.fillWidth: true
110 Layout.fillHeight: true
111 opacity: control.checked || control.hovered ? 1 : 0.7
115 color: control.Maui.Theme.textColor
116 alignment: Qt.AlignHCenter
117 display: QQC.ToolButton.TextBesideIcon
129 active: control.closeButtonVisible
131 Layout.alignment: Qt.AlignCenter
133 sourceComponent: Maui.CloseButton
135 opacity: Maui.Handy.isMobile ? 1 : (control.hovered || control.checked ? 1 : 0)
144 onClicked: control.closeClicked()
150 duration: Maui.Style.units.longDuration
151 easing.type: Easing.InOutQuad
165 active: control.Maui.Controls.badgeText && control.Maui.Controls.badgeText.length > 0 && control.visible
168 anchors.horizontalCenter: parent.right
169 anchors.verticalCenter: parent.top
170 anchors.verticalCenterOffset: 10
171 anchors.horizontalCenterOffset: -5
173 sourceComponent: Maui.Badge
175 text: control.Maui.Controls.badgeText
178 font.pointSize: Maui.Style.fontSizes.tiny
180 Maui.Theme.colorSet: Maui.Theme.View
181 Maui.Theme.backgroundColor: Maui.Theme.negativeBackgroundColor
182 Maui.Theme.textColor: Maui.Theme.negativeTextColor
184 OpacityAnimator on opacity
188 duration: Maui.Style.units.longDuration
189 running: parent.visible
192 ScaleAnimator on scale
196 duration: Maui.Style.units.longDuration
197 running: parent.visible
198 easing.type: Easing.OutInQuad