Fixed multiple instances opening at once
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.ApplicationWindow {
|
||||
id: window
|
||||
|
||||
color: Material.backgroundColor
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.BusyIndicator {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 6
|
||||
|
||||
contentItem: BusyIndicatorImpl {
|
||||
implicitWidth: control.Material.touchTarget
|
||||
implicitHeight: control.Material.touchTarget
|
||||
color: control.Material.accentColor
|
||||
|
||||
running: control.running
|
||||
opacity: control.running ? 1 : 0
|
||||
Behavior on opacity { OpacityAnimator { duration: 250 } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Button {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
topInset: 6
|
||||
bottomInset: 6
|
||||
verticalPadding: Material.buttonVerticalPadding
|
||||
leftPadding: Material.buttonLeftPadding(flat, hasIcon && (display !== AbstractButton.TextOnly))
|
||||
rightPadding: Material.buttonRightPadding(flat, hasIcon && (display !== AbstractButton.TextOnly),
|
||||
(text !== "") && (display !== AbstractButton.IconOnly))
|
||||
spacing: 8
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
readonly property bool hasIcon: icon.name.length > 0 || icon.source.toString().length > 0
|
||||
|
||||
Material.elevation: control.down ? 8 : 2
|
||||
Material.roundedScale: Material.FullScale
|
||||
|
||||
contentItem: IconLabel {
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: !control.enabled ? control.Material.hintTextColor
|
||||
: (control.flat && control.highlighted) || (control.checked && !control.highlighted)
|
||||
? control.Material.accentColor : control.highlighted
|
||||
? control.Material.primaryHighlightedTextColor : control.Material.foreground
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 64
|
||||
implicitHeight: control.Material.buttonHeight
|
||||
|
||||
radius: control.Material.roundedScale === Material.FullScale ? height / 2 : control.Material.roundedScale
|
||||
color: control.Material.buttonColor(control.Material.theme, control.Material.background,
|
||||
control.Material.accent, control.enabled, control.flat, control.highlighted, control.checked)
|
||||
|
||||
// The layer is disabled when the button color is transparent so you can do
|
||||
// Material.background: "transparent" and get a proper flat button without needing
|
||||
// to set Material.elevation as well
|
||||
layer.enabled: control.enabled && color.a > 0 && !control.flat
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.background.radius
|
||||
}
|
||||
|
||||
Ripple {
|
||||
clip: true
|
||||
clipRadius: parent.radius
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.flat && control.highlighted ? control.Material.highlightedRippleColor : control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.CheckBox {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
spacing: 8
|
||||
padding: 8
|
||||
verticalPadding: padding + 7
|
||||
|
||||
indicator: CheckIndicator {
|
||||
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
control: control
|
||||
|
||||
Ripple {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 28; height: 28
|
||||
|
||||
z: -1
|
||||
anchor: control
|
||||
pressed: control.pressed
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
|
||||
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
|
||||
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.CheckDelegate {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 16
|
||||
verticalPadding: 8
|
||||
spacing: 16
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
indicator: CheckIndicator {
|
||||
x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
control: control
|
||||
}
|
||||
|
||||
contentItem: IconLabel {
|
||||
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
|
||||
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
|
||||
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: control.Material.delegateHeight
|
||||
|
||||
color: control.highlighted ? control.Material.listHighlightColor : "transparent"
|
||||
|
||||
Ripple {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
clip: visible
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.ComboBox {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
|
||||
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
|
||||
|
||||
Material.background: flat ? "transparent" : undefined
|
||||
Material.foreground: flat ? undefined : Material.primaryTextColor
|
||||
|
||||
delegate: MenuItem {
|
||||
required property var model
|
||||
required property int index
|
||||
|
||||
width: ListView.view.width
|
||||
text: model[control.textRole]
|
||||
Material.foreground: control.currentIndex === index ? ListView.view.contentItem.Material.accent : ListView.view.contentItem.Material.foreground
|
||||
highlighted: control.highlightedIndex === index
|
||||
hoverEnabled: control.hoverEnabled
|
||||
}
|
||||
|
||||
indicator: ColorImage {
|
||||
x: control.mirrored ? control.padding : control.width - width - control.padding
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/drop-indicator.png"
|
||||
}
|
||||
|
||||
contentItem: T.TextField {
|
||||
implicitHeight: contentHeight + topPadding + bottomPadding
|
||||
leftPadding: Material.textFieldHorizontalPadding
|
||||
topPadding: Material.textFieldVerticalPadding
|
||||
bottomPadding: Material.textFieldVerticalPadding
|
||||
|
||||
text: control.editable ? control.editText : control.displayText
|
||||
|
||||
enabled: control.editable
|
||||
autoScroll: control.editable
|
||||
readOnly: control.down
|
||||
inputMethodHints: control.inputMethodHints
|
||||
validator: control.validator
|
||||
selectByMouse: control.selectTextByMouse
|
||||
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
selectionColor: control.Material.accentColor
|
||||
selectedTextColor: control.Material.primaryHighlightedTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
cursorDelegate: CursorDelegate { }
|
||||
|
||||
ContextMenu.menu: TextEditingContextMenu {
|
||||
editor: parent
|
||||
}
|
||||
}
|
||||
|
||||
background: MaterialTextContainer {
|
||||
implicitWidth: 120
|
||||
implicitHeight: control.Material.textFieldHeight
|
||||
|
||||
outlineColor: (enabled && control.hovered) ? control.Material.primaryTextColor : control.Material.hintTextColor
|
||||
focusedOutlineColor: control.Material.accentColor
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: true
|
||||
horizontalPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
|
||||
popup: T.Popup {
|
||||
y: control.editable ? control.height - 5 : 0
|
||||
width: control.width
|
||||
height: Math.min(contentItem.implicitHeight + verticalPadding * 2, control.Window.height - topMargin - bottomMargin)
|
||||
transformOrigin: Item.Top
|
||||
topMargin: 12
|
||||
bottomMargin: 12
|
||||
verticalPadding: 8
|
||||
|
||||
Material.theme: control.Material.theme
|
||||
Material.accent: control.Material.accent
|
||||
Material.primary: control.Material.primary
|
||||
|
||||
enter: Transition {
|
||||
// grow_fade_in
|
||||
NumberAnimation { property: "scale"; from: 0.9; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; from: 0.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
exit: Transition {
|
||||
// shrink_fade_out
|
||||
NumberAnimation { property: "scale"; to: 0.9; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; to: 0.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
contentItem: ListView {
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
model: control.delegateModel
|
||||
currentIndex: control.highlightedIndex
|
||||
highlightMoveDuration: 0
|
||||
|
||||
T.ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
radius: 4
|
||||
color: parent.Material.dialogColor
|
||||
|
||||
layer.enabled: control.enabled
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: 4
|
||||
roundedScale: Material.ExtraSmallScale
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.DelayButton {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
topInset: 6
|
||||
bottomInset: 6
|
||||
padding: 12
|
||||
horizontalPadding: padding - 4
|
||||
|
||||
Material.elevation: control.down ? 8 : 2
|
||||
|
||||
transition: Transition {
|
||||
NumberAnimation {
|
||||
duration: control.delay * (control.pressed ? 1.0 - control.progress : 0.3 * control.progress)
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: !control.enabled ? control.Material.hintTextColor : control.Material.foreground
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
// TODO: Add a proper ripple/ink effect for mouse/touch input and focus state
|
||||
background: Rectangle {
|
||||
implicitWidth: 64
|
||||
implicitHeight: control.Material.buttonHeight
|
||||
|
||||
radius: 2
|
||||
color: control.Material.buttonColor(control.Material.theme, control.Material.background,
|
||||
control.Material.accent, control.enabled, false /*flat*/, false /*highlighted*/, false /*checked*/)
|
||||
|
||||
PaddedRectangle {
|
||||
y: parent.height - 4
|
||||
width: parent.width
|
||||
height: 4
|
||||
radius: 2
|
||||
topPadding: -2
|
||||
clip: true
|
||||
color: control.checked && control.enabled ? control.Material.accentColor : control.Material.secondaryTextColor
|
||||
|
||||
PaddedRectangle {
|
||||
width: parent.width * control.progress
|
||||
height: 4
|
||||
radius: 2
|
||||
topPadding: -2
|
||||
rightPadding: Math.max(-2, width - parent.width)
|
||||
clip: true
|
||||
color: control.Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
layer.enabled: control.enabled && color.a > 0 && !control.flat
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
}
|
||||
|
||||
Ripple {
|
||||
clipRadius: 2
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Dial {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 100
|
||||
implicitHeight: 100
|
||||
|
||||
x: control.width / 2 - width / 2
|
||||
y: control.height / 2 - height / 2
|
||||
width: Math.max(64, Math.min(control.width, control.height))
|
||||
height: width
|
||||
color: "transparent"
|
||||
radius: width / 2
|
||||
|
||||
border.color: control.enabled ? control.Material.accentColor : control.Material.hintTextColor
|
||||
}
|
||||
|
||||
handle: SliderHandle {
|
||||
x: control.background.x + control.background.width / 2 - width / 2
|
||||
y: control.background.y + control.background.height / 2 - height / 2
|
||||
transform: [
|
||||
Translate {
|
||||
y: -control.background.height * 0.4
|
||||
+ (control.handle ? control.handle.height / 2 : 0)
|
||||
},
|
||||
Rotation {
|
||||
angle: control.angle
|
||||
origin.x: control.handle ? control.handle.width / 2 : 0
|
||||
origin.y: control.handle ? control.handle.height / 2 : 0
|
||||
}
|
||||
]
|
||||
implicitWidth: 10
|
||||
implicitHeight: 10
|
||||
|
||||
value: control.value
|
||||
handleHasFocus: control.visualFocus
|
||||
handlePressed: control.pressed
|
||||
handleHovered: control.hovered
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Dialog {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding,
|
||||
implicitHeaderWidth,
|
||||
implicitFooterWidth)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding
|
||||
+ (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0)
|
||||
+ (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0))
|
||||
|
||||
// https://m3.material.io/components/dialogs/specs#7dbad5e0-f001-4eae-a536-694aeca90ba6
|
||||
padding: 24
|
||||
topPadding: 16
|
||||
// https://m3.material.io/components/dialogs/guidelines#812cedf1-5c45-453f-97fc-7fd9bba7522b
|
||||
modal: true
|
||||
|
||||
// https://m3.material.io/components/dialogs/specs#401a48c3-f50c-4fa9-b798-701f5adcf155
|
||||
// Specs say level 3 (6 dp) is the default, yet the screenshots there show 0. Native Android defaults to non-zero.
|
||||
Material.elevation: 6
|
||||
Material.roundedScale: Material.dialogRoundedScale
|
||||
|
||||
enter: Transition {
|
||||
// grow_fade_in
|
||||
NumberAnimation { property: "scale"; from: 0.9; to: 1.0; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
exit: Transition {
|
||||
// shrink_fade_out
|
||||
NumberAnimation { property: "scale"; from: 1.0; to: 0.9; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
// FullScale doesn't make sense for Dialog.
|
||||
radius: parent?.parent === Overlay.overlay ? control.Material.roundedScale : 0
|
||||
color: control.Material.dialogColor
|
||||
|
||||
layer.enabled: control.Material.elevation > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.background.radius
|
||||
}
|
||||
}
|
||||
|
||||
header: Label {
|
||||
text: control.title
|
||||
visible: parent?.parent === Overlay.overlay && control.title
|
||||
elide: Label.ElideRight
|
||||
padding: 24
|
||||
bottomPadding: 0
|
||||
// TODO: QPlatformTheme::TitleBarFont
|
||||
// https://m3.material.io/components/dialogs/specs#401a48c3-f50c-4fa9-b798-701f5adcf155
|
||||
font.pixelSize: Material.dialogTitleFontPixelSize
|
||||
background: PaddedRectangle {
|
||||
radius: control.background.radius
|
||||
color: control.Material.dialogColor
|
||||
bottomPadding: -radius
|
||||
clip: true
|
||||
}
|
||||
}
|
||||
|
||||
footer: DialogButtonBox {
|
||||
visible: count > 0
|
||||
}
|
||||
|
||||
T.Overlay.modal: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
|
||||
T.Overlay.modeless: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.DialogButtonBox {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
spacing: 8
|
||||
padding: 8
|
||||
verticalPadding: 2
|
||||
alignment: Qt.AlignRight
|
||||
buttonLayout: T.DialogButtonBox.AndroidLayout
|
||||
|
||||
Material.foreground: Material.accent
|
||||
Material.roundedScale: Material.ExtraLargeScale
|
||||
|
||||
delegate: Button { flat: true }
|
||||
|
||||
contentItem: ListView {
|
||||
implicitWidth: contentWidth
|
||||
model: control.contentModel
|
||||
spacing: control.spacing
|
||||
orientation: ListView.Horizontal
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
snapMode: ListView.SnapToItem
|
||||
}
|
||||
|
||||
background: PaddedRectangle {
|
||||
implicitHeight: control.Material.dialogButtonBoxHeight
|
||||
radius: control.Material.roundedScale
|
||||
color: control.Material.dialogColor
|
||||
// Rounded corners should be only at the top or at the bottom
|
||||
topPadding: control.position === T.DialogButtonBox.Footer ? -radius : 0
|
||||
bottomPadding: control.position === T.DialogButtonBox.Header ? -radius : 0
|
||||
clip: true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
// Copyright (C) 2025 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.DoubleSpinBox {
|
||||
id: control
|
||||
|
||||
// Note: the width of the indicators are calculated into the padding
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
up.implicitIndicatorHeight, down.implicitIndicatorHeight)
|
||||
|
||||
spacing: 6
|
||||
topPadding: Material.textFieldVerticalPadding
|
||||
bottomPadding: Material.textFieldVerticalPadding
|
||||
leftPadding: control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0)
|
||||
rightPadding: control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0)
|
||||
|
||||
validator: DoubleValidator {
|
||||
locale: control.locale.name
|
||||
bottom: Math.min(control.from, control.to)
|
||||
top: Math.max(control.from, control.to)
|
||||
decimals: control.decimals
|
||||
}
|
||||
|
||||
contentItem: TextInput {
|
||||
text: control.displayText
|
||||
|
||||
font: control.font
|
||||
color: enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
selectionColor: control.Material.textSelectionColor
|
||||
selectedTextColor: control.Material.foreground
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
|
||||
cursorDelegate: CursorDelegate { }
|
||||
|
||||
readOnly: !control.editable
|
||||
validator: control.validator
|
||||
inputMethodHints: control.inputMethodHints
|
||||
clip: width < implicitWidth
|
||||
|
||||
ContextMenu.menu: TextEditingContextMenu {
|
||||
editor: parent
|
||||
}
|
||||
}
|
||||
|
||||
up.indicator: Item {
|
||||
x: control.mirrored ? 0 : control.width - width
|
||||
implicitWidth: control.Material.touchTarget
|
||||
implicitHeight: control.Material.touchTarget
|
||||
height: control.height
|
||||
width: height
|
||||
|
||||
Ripple {
|
||||
clipRadius: 2
|
||||
x: control.spacing
|
||||
y: control.spacing
|
||||
width: parent.width - 2 * control.spacing
|
||||
height: parent.height - 2 * control.spacing
|
||||
pressed: control.up.pressed
|
||||
active: control.up.pressed || control.up.hovered || control.visualFocus
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: Math.min(parent.width / 3, parent.height / 3)
|
||||
height: 2
|
||||
color: enabled ? control.Material.foreground : control.Material.spinBoxDisabledIconColor
|
||||
}
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 2
|
||||
height: Math.min(parent.width / 3, parent.height / 3)
|
||||
color: enabled ? control.Material.foreground : control.Material.spinBoxDisabledIconColor
|
||||
}
|
||||
}
|
||||
|
||||
down.indicator: Item {
|
||||
x: control.mirrored ? control.width - width : 0
|
||||
implicitWidth: control.Material.touchTarget
|
||||
implicitHeight: control.Material.touchTarget
|
||||
height: control.height
|
||||
width: height
|
||||
|
||||
Ripple {
|
||||
clipRadius: 2
|
||||
x: control.spacing
|
||||
y: control.spacing
|
||||
width: parent.width - 2 * control.spacing
|
||||
height: parent.height - 2 * control.spacing
|
||||
pressed: control.down.pressed
|
||||
active: control.down.pressed || control.down.hovered || control.visualFocus
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: parent.width / 3
|
||||
height: 2
|
||||
color: enabled ? control.Material.foreground : control.Material.spinBoxDisabledIconColor
|
||||
}
|
||||
}
|
||||
|
||||
background: MaterialTextContainer {
|
||||
implicitWidth: 140
|
||||
implicitHeight: control.Material.textFieldHeight
|
||||
|
||||
outlineColor: (enabled && control.hovered) ? control.Material.primaryTextColor : control.Material.hintTextColor
|
||||
focusedOutlineColor: control.Material.accentColor
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: true
|
||||
horizontalPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Drawer {
|
||||
id: control
|
||||
|
||||
parent: T.Overlay.overlay
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
topPadding: SafeArea.margins.top + (edge !== Qt.TopEdge ? Material.roundedScale : 0)
|
||||
leftPadding: SafeArea.margins.left + (control.edge === Qt.RightEdge)
|
||||
rightPadding: SafeArea.margins.right + (control.edge === Qt.LeftEdge)
|
||||
bottomPadding: SafeArea.margins.bottom + (edge !== Qt.BottomEdge ? Material.roundedScale : 0)
|
||||
|
||||
enter: Transition { SmoothedAnimation { velocity: 5 } }
|
||||
exit: Transition { SmoothedAnimation { velocity: 5 } }
|
||||
|
||||
// https://m3.material.io/components/navigation-drawer/specs#e616dc8f-d61a-4d56-a311-50c68ecda744
|
||||
Material.elevation: !interactive && !dim ? 0 : 1
|
||||
Material.roundedScale: Material.LargeScale
|
||||
|
||||
background: PaddedRectangle {
|
||||
// https://m3.material.io/components/navigation-drawer/specs#ce8bfbcf-3dec-45d2-9d8b-5e10af1cf87d
|
||||
implicitWidth: 360
|
||||
color: control.Material.dialogColor
|
||||
// FullScale doesn't make sense for Drawer.
|
||||
radius: control.Material.roundedScale
|
||||
leftPadding: edge === Qt.LeftEdge ? -radius : 0
|
||||
rightPadding: edge === Qt.RightEdge ? -radius : 0
|
||||
topPadding: edge === Qt.TopEdge ? -radius : 0
|
||||
bottomPadding: edge === Qt.BottomEdge ? -radius : 0
|
||||
clip: true
|
||||
|
||||
layer.enabled: control.position > 0 && control.Material.elevation > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.background.radius
|
||||
}
|
||||
}
|
||||
|
||||
T.Overlay.modal: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
|
||||
T.Overlay.modeless: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Frame {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 12
|
||||
verticalPadding: Material.frameVerticalPadding
|
||||
|
||||
Material.roundedScale: Material.ExtraSmallScale
|
||||
|
||||
background: Rectangle {
|
||||
radius: control.Material.roundedScale
|
||||
color: control.Material.elevation > 0 ? control.Material.backgroundColor : "transparent"
|
||||
border.color: control.Material.frameColor
|
||||
|
||||
layer.enabled: control.enabled && control.Material.elevation > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.background.radius
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.GroupBox {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding,
|
||||
implicitLabelWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
spacing: 6
|
||||
padding: 12
|
||||
topPadding: Material.frameVerticalPadding + (implicitLabelWidth > 0 ? implicitLabelHeight + spacing : 0)
|
||||
bottomPadding: Material.frameVerticalPadding
|
||||
|
||||
Material.roundedScale: Material.ExtraSmallScale
|
||||
|
||||
label: Text {
|
||||
x: Math.max(control.leftPadding, control.Material.roundedScale)
|
||||
width: control.availableWidth
|
||||
|
||||
text: control.title
|
||||
font: control.font
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
y: control.topPadding - control.bottomPadding
|
||||
width: parent.width
|
||||
height: parent.height - control.topPadding + control.bottomPadding
|
||||
|
||||
radius: control.Material.roundedScale
|
||||
color: control.Material.elevation > 0 ? control.Material.backgroundColor : "transparent"
|
||||
border.color: control.Material.frameColor
|
||||
|
||||
layer.enabled: control.enabled && control.Material.elevation > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.background.radius
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.HorizontalHeaderView {
|
||||
id: control
|
||||
|
||||
implicitWidth: syncView ? syncView.width : 0
|
||||
// The contentHeight of TableView will be zero at start-up, until the delegate
|
||||
// items have been loaded. This means that even if the implicit height of
|
||||
// HorizontalHeaderView should be the same as the content height in the end, we
|
||||
// need to ensure that it has at least a height of 1 at start-up, otherwise
|
||||
// TableView won't bother loading any delegates at all.
|
||||
implicitHeight: Math.max(1, contentHeight)
|
||||
|
||||
delegate: HorizontalHeaderViewDelegate { }
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// Copyright (C) 2025 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Templates as T
|
||||
|
||||
T.HeaderViewDelegate {
|
||||
id: control
|
||||
|
||||
// same as AbstractButton.qml
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 8
|
||||
|
||||
highlighted: selected
|
||||
|
||||
background: Rectangle {
|
||||
color: control.Material.backgroundColor
|
||||
}
|
||||
|
||||
contentItem: Label {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: enabled ? control.Material.foreground
|
||||
: control.Material.hintTextColor
|
||||
text: control.model[control.headerView.textRole]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.ItemDelegate {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 16
|
||||
verticalPadding: 8
|
||||
spacing: 16
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
contentItem: IconLabel {
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: control.Material.delegateHeight
|
||||
|
||||
color: control.highlighted ? control.Material.listHighlightColor : "transparent"
|
||||
|
||||
Ripple {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
clip: visible
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.Label {
|
||||
id: control
|
||||
|
||||
color: enabled ? Material.foreground : Material.hintTextColor
|
||||
linkColor: Material.accentColor
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
import QtQuick.Window
|
||||
|
||||
T.Menu {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
margins: 0
|
||||
verticalPadding: 8
|
||||
|
||||
transformOrigin: !cascade ? Item.Top : (mirrored ? Item.TopRight : Item.TopLeft)
|
||||
|
||||
Material.elevation: 4
|
||||
Material.roundedScale: Material.ExtraSmallScale
|
||||
|
||||
delegate: MenuItem { }
|
||||
|
||||
enter: Transition {
|
||||
// grow_fade_in
|
||||
NumberAnimation { property: "scale"; from: 0.9; to: 1.0; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
exit: Transition {
|
||||
// shrink_fade_out
|
||||
NumberAnimation { property: "scale"; from: 1.0; to: 0.9; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
contentItem: ListView {
|
||||
implicitHeight: contentHeight
|
||||
|
||||
model: control.contentModel
|
||||
interactive: Window.window
|
||||
? contentHeight + control.topPadding + control.bottomPadding > control.height
|
||||
: false
|
||||
clip: true
|
||||
currentIndex: control.currentIndex
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator {}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 200
|
||||
implicitHeight: control.Material.menuItemHeight
|
||||
// FullScale doesn't make sense for Menu.
|
||||
radius: control.Material.roundedScale
|
||||
color: control.Material.dialogColor
|
||||
|
||||
layer.enabled: control.Material.elevation > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.background.radius
|
||||
}
|
||||
}
|
||||
|
||||
T.Overlay.modal: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
|
||||
T.Overlay.modeless: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.MenuBar {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
topPadding: SafeArea.margins.top
|
||||
leftPadding: SafeArea.margins.left
|
||||
rightPadding: SafeArea.margins.right
|
||||
bottomPadding: SafeArea.margins.bottom
|
||||
|
||||
delegate: MenuBarItem { }
|
||||
|
||||
contentItem: Row {
|
||||
spacing: control.spacing
|
||||
Repeater {
|
||||
model: control.contentModel
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: 40
|
||||
color: control.Material.dialogColor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.MenuBarItem {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 16
|
||||
verticalPadding: 12
|
||||
spacing: 16
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
icon.color: enabled ? Material.foreground : Material.hintTextColor
|
||||
|
||||
contentItem: IconLabel {
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
alignment: Qt.AlignLeft
|
||||
|
||||
icon: control.icon
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
color: control.highlighted ? control.Material.listHighlightColor : "transparent"
|
||||
|
||||
Ripple {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
clip: visible
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: control.down || control.highlighted
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
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: 16
|
||||
verticalPadding: Material.menuItemVerticalPadding
|
||||
spacing: 16
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
indicator: CheckIndicator {
|
||||
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
visible: control.checkable
|
||||
control: control
|
||||
checkState: control.checked ? Qt.Checked : Qt.Unchecked
|
||||
}
|
||||
|
||||
arrow: ColorImage {
|
||||
x: control.mirrored ? control.padding : control.width - width - control.padding
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
|
||||
visible: control.subMenu
|
||||
mirror: control.mirrored
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/arrow-indicator.png"
|
||||
}
|
||||
|
||||
contentItem: IconLabel {
|
||||
readonly property real arrowPadding: control.subMenu && control.arrow ? control.arrow.width + control.spacing : 0
|
||||
readonly property real indicatorPadding: control.checkable && control.indicator ? control.indicator.width + control.spacing : 0
|
||||
leftPadding: !control.mirrored ? indicatorPadding : arrowPadding
|
||||
rightPadding: control.mirrored ? indicatorPadding : arrowPadding
|
||||
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
alignment: Qt.AlignLeft
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 200
|
||||
implicitHeight: control.Material.menuItemHeight
|
||||
color: control.highlighted ? control.Material.listHighlightColor : "transparent"
|
||||
|
||||
Ripple {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
clip: visible
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: control.down || control.highlighted
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.MenuSeparator {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
verticalPadding: 8
|
||||
|
||||
contentItem: Rectangle {
|
||||
implicitWidth: 200
|
||||
implicitHeight: 1
|
||||
color: control.Material.dividerColor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Page {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding,
|
||||
implicitHeaderWidth,
|
||||
implicitFooterWidth)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding
|
||||
+ (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0)
|
||||
+ (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0))
|
||||
|
||||
background: Rectangle {
|
||||
color: control.Material.backgroundColor
|
||||
|
||||
layer.enabled: control.enabled && control.Material.elevation > 0
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.PageIndicator {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 6
|
||||
spacing: 6
|
||||
|
||||
delegate: Rectangle {
|
||||
implicitWidth: 8
|
||||
implicitHeight: 8
|
||||
|
||||
radius: width / 2
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
|
||||
// qmllint disable unqualified
|
||||
// We can't make "pressed" a required property, as QQuickPageIndicator doesn't create
|
||||
// the delegates, and so it can't set it as an initial property.
|
||||
opacity: index === control.currentIndex ? 0.95 : pressed ? 0.7 : 0.45
|
||||
|
||||
required property int index
|
||||
|
||||
Behavior on opacity { OpacityAnimator { duration: 100 } }
|
||||
}
|
||||
|
||||
contentItem: Row {
|
||||
spacing: control.spacing
|
||||
|
||||
Repeater {
|
||||
model: control.count
|
||||
delegate: control.delegate
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Pane {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 12
|
||||
Material.roundedScale: control.Material.elevation > 0 ? Material.ExtraSmallScale : Material.NotRounded
|
||||
|
||||
background: Rectangle {
|
||||
color: control.Material.backgroundColor
|
||||
radius: control.Material.roundedScale
|
||||
|
||||
layer.enabled: control.enabled && control.Material.elevation > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.background.radius
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Popup {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 12
|
||||
|
||||
Material.elevation: 4
|
||||
Material.roundedScale: Material.ExtraSmallScale
|
||||
|
||||
enter: Transition {
|
||||
// grow_fade_in
|
||||
NumberAnimation { property: "scale"; from: 0.9; to: 1.0; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
exit: Transition {
|
||||
// shrink_fade_out
|
||||
NumberAnimation { property: "scale"; from: 1.0; to: 0.9; easing.type: Easing.OutQuint; duration: 220 }
|
||||
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing.type: Easing.OutCubic; duration: 150 }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
// FullScale doesn't make sense for Popup.
|
||||
radius: control.Material.roundedScale
|
||||
color: control.Material.dialogColor
|
||||
|
||||
layer.enabled: control.Material.elevation > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
roundedScale: control.Material.roundedScale
|
||||
}
|
||||
}
|
||||
|
||||
T.Overlay.modal: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
|
||||
T.Overlay.modeless: Rectangle {
|
||||
color: control.Material.backgroundDimColor
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.ProgressBar {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
contentItem: ProgressBarImpl {
|
||||
implicitHeight: 4
|
||||
|
||||
scale: control.mirrored ? -1 : 1
|
||||
color: control.Material.accentColor
|
||||
progress: control.position
|
||||
indeterminate: control.visible && control.indeterminate
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 200
|
||||
implicitHeight: 4
|
||||
y: (control.height - height) / 2
|
||||
height: 4
|
||||
|
||||
color: Qt.rgba(control.Material.accentColor.r, control.Material.accentColor.g, control.Material.accentColor.b, 0.25)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.RadioButton {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
spacing: 8
|
||||
padding: 8
|
||||
verticalPadding: padding + 6
|
||||
|
||||
indicator: RadioIndicator {
|
||||
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
control: control
|
||||
|
||||
Ripple {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 28; height: 28
|
||||
|
||||
z: -1
|
||||
anchor: control
|
||||
pressed: control.pressed
|
||||
active: control.down || control.visualFocus || control.hovered
|
||||
color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
|
||||
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
|
||||
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.RadioDelegate {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 16
|
||||
verticalPadding: 8
|
||||
spacing: 16
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
indicator: RadioIndicator {
|
||||
x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
control: control
|
||||
}
|
||||
|
||||
contentItem: IconLabel {
|
||||
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
|
||||
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
|
||||
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: control.Material.delegateHeight
|
||||
|
||||
color: control.highlighted ? control.Material.listHighlightColor : "transparent"
|
||||
|
||||
Ripple {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
clip: visible
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: control.down || control.visualFocus || control.hovered
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.RangeSlider {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
first.implicitHandleWidth + leftPadding + rightPadding,
|
||||
second.implicitHandleWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
first.implicitHandleHeight + topPadding + bottomPadding,
|
||||
second.implicitHandleHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 6
|
||||
|
||||
// The RangeSlider is discrete if all of the following requirements are met:
|
||||
// * stepSize is positive
|
||||
// * snapMode is set to SnapAlways
|
||||
// * the difference between to and from is cleanly divisible by the stepSize
|
||||
// * the number of tick marks intended to be rendered is less than the width to height ratio, or vice versa for vertical sliders.
|
||||
readonly property real __steps: Math.abs(to - from) / stepSize
|
||||
readonly property bool __isDiscrete: stepSize >= Number.EPSILON
|
||||
&& snapMode === Slider.SnapAlways
|
||||
&& Math.abs(Math.round(__steps) - __steps) < Number.EPSILON
|
||||
&& Math.floor(__steps) < (horizontal ? background.width / background.height : background.height / background.width)
|
||||
|
||||
first.handle: SliderHandle {
|
||||
x: control.leftPadding + (control.horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
|
||||
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
|
||||
value: control.first.value
|
||||
handleHasFocus: activeFocus
|
||||
handlePressed: control.first.pressed
|
||||
handleHovered: control.first.hovered
|
||||
}
|
||||
|
||||
second.handle: SliderHandle {
|
||||
x: control.leftPadding + (control.horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
|
||||
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
|
||||
value: control.second.value
|
||||
handleHasFocus: activeFocus
|
||||
handlePressed: control.second.pressed
|
||||
handleHovered: control.second.hovered
|
||||
}
|
||||
|
||||
background: Item {
|
||||
x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
|
||||
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
|
||||
implicitWidth: control.horizontal ? 200 : 48
|
||||
implicitHeight: control.horizontal ? 48 : 200
|
||||
width: control.horizontal ? control.availableWidth : 4
|
||||
height: control.horizontal ? 4 : control.availableHeight
|
||||
|
||||
Rectangle {
|
||||
x: (control.horizontal ? (control.first.implicitHandleWidth / 2) - (control.__isDiscrete ? 2 : 0) : 0)
|
||||
y: (control.horizontal ? 0 : (control.first.implicitHandleHeight / 2) - (control.__isDiscrete ? 2 : 0))
|
||||
width: parent.width - (control.horizontal ? (control.first.implicitHandleWidth - (control.__isDiscrete ? 4 : 0)) : 0)
|
||||
height: parent.height - (control.horizontal ? 0 : (control.first.implicitHandleHeight - (control.__isDiscrete ? 4 : 0)))
|
||||
scale: control.horizontal && control.mirrored ? -1 : 1
|
||||
radius: Math.min(width, height) / 2
|
||||
color: control.enabled ? Color.transparent(control.Material.accentColor, 0.33) : control.Material.sliderDisabledColor
|
||||
|
||||
Rectangle {
|
||||
x: control.horizontal ? control.first.position * parent.width : 0
|
||||
y: control.horizontal ? 0 : control.second.visualPosition * parent.height
|
||||
width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width : 4
|
||||
height: control.horizontal ? 4 : control.second.position * parent.height - control.first.position * parent.height
|
||||
radius: Math.min(width, height) / 2
|
||||
color: control.enabled ? control.Material.accentColor : control.Material.sliderDisabledColor
|
||||
}
|
||||
|
||||
// Declaring this as a property (in combination with the parent binding below) avoids ids,
|
||||
// which prevent deferred execution.
|
||||
property Repeater repeater: Repeater {
|
||||
parent: control.background.children[0]
|
||||
model: control.__isDiscrete ? Math.floor(control.__steps) + 1 : 0
|
||||
delegate: Rectangle {
|
||||
width: 2
|
||||
height: 2
|
||||
radius: 2
|
||||
x: control.horizontal ? (parent.width - width * 2) * currentPosition + (width / 2) : (parent.width - width) / 2
|
||||
y: control.horizontal ? (parent.height - height) / 2 : (parent.height - height * 2) * currentPosition + (height / 2)
|
||||
color: (control.horizontal && control.first.visualPosition < currentPosition && control.second.visualPosition > currentPosition)
|
||||
|| (!control.horizontal && control.first.visualPosition > currentPosition && control.second.visualPosition < currentPosition)
|
||||
? control.Material.primaryHighlightedTextColor : control.Material.accentColor
|
||||
|
||||
required property int index
|
||||
readonly property real currentPosition: index / (parent.repeater.count - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.RoundButton {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
topInset: 6
|
||||
leftInset: 6
|
||||
rightInset: 6
|
||||
bottomInset: 6
|
||||
padding: 12
|
||||
spacing: 6
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
Material.elevation: control.down ? 8 : 2
|
||||
Material.background: flat ? "transparent" : undefined
|
||||
|
||||
contentItem: IconLabel {
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: !control.enabled ? control.Material.hintTextColor
|
||||
: control.flat && control.highlighted ? control.Material.accentColor
|
||||
: control.highlighted ? control.Material.primaryHighlightedTextColor
|
||||
: control.Material.foreground
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
// TODO: Add a proper ripple/ink effect for mouse/touch input and focus state
|
||||
background: Rectangle {
|
||||
implicitWidth: control.Material.buttonHeight
|
||||
implicitHeight: control.Material.buttonHeight
|
||||
|
||||
radius: control.radius
|
||||
color: control.Material.buttonColor(control.Material.theme, control.Material.background,
|
||||
control.Material.accent, control.enabled, control.flat, control.highlighted, false /*checked*/)
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
radius: control.radius
|
||||
visible: enabled && (control.hovered || control.visualFocus)
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
radius: control.radius
|
||||
visible: control.down
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
|
||||
// The layer is disabled when the button color is transparent so that you can do
|
||||
// Material.background: "transparent" and get a proper flat button without needing
|
||||
// to set Material.elevation as well
|
||||
layer.enabled: control.enabled && color.a > 0 && !control.flat
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.ScrollBar {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: control.interactive ? 1 : 2
|
||||
visible: control.policy !== T.ScrollBar.AlwaysOff
|
||||
minimumSize: orientation === Qt.Horizontal ? height / width : width / height
|
||||
|
||||
contentItem: Rectangle {
|
||||
implicitWidth: control.interactive ? 13 : 4
|
||||
implicitHeight: control.interactive ? 13 : 4
|
||||
|
||||
color: control.pressed ? control.Material.scrollBarPressedColor :
|
||||
control.interactive && control.hovered ? control.Material.scrollBarHoveredColor : control.Material.scrollBarColor
|
||||
opacity: 0.0
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: control.interactive ? 16 : 4
|
||||
implicitHeight: control.interactive ? 16 : 4
|
||||
color: "#0e000000"
|
||||
opacity: 0.0
|
||||
visible: control.interactive
|
||||
}
|
||||
|
||||
states: State {
|
||||
name: "active"
|
||||
when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0)
|
||||
}
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
to: "active"
|
||||
NumberAnimation { targets: [control.contentItem, control.background]; property: "opacity"; to: 1.0 }
|
||||
},
|
||||
Transition {
|
||||
from: "active"
|
||||
SequentialAnimation {
|
||||
PropertyAction{ targets: [control.contentItem, control.background]; property: "opacity"; value: 1.0 }
|
||||
PauseAnimation { duration: 2450 }
|
||||
NumberAnimation { targets: [control.contentItem, control.background]; property: "opacity"; to: 0.0 }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.ScrollIndicator {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 2
|
||||
|
||||
contentItem: Rectangle {
|
||||
implicitWidth: 4
|
||||
implicitHeight: 4
|
||||
|
||||
color: control.Material.scrollBarColor
|
||||
visible: control.size < 1.0
|
||||
opacity: 0.0
|
||||
|
||||
states: State {
|
||||
name: "active"
|
||||
when: control.active
|
||||
PropertyChanges { control.contentItem.opacity: 0.75 }
|
||||
}
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "active"
|
||||
SequentialAnimation {
|
||||
PauseAnimation { duration: 450 }
|
||||
NumberAnimation { target: control.contentItem; duration: 200; property: "opacity"; to: 0.0 }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Templates as T
|
||||
|
||||
T.ScrollView {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
parent: control
|
||||
x: control.mirrored ? 0 : control.width - width
|
||||
y: control.topPadding
|
||||
height: control.availableHeight
|
||||
active: control.ScrollBar.horizontal.active
|
||||
}
|
||||
|
||||
ScrollBar.horizontal: ScrollBar {
|
||||
parent: control
|
||||
x: control.leftPadding
|
||||
y: control.height - height
|
||||
width: control.availableWidth
|
||||
active: control.ScrollBar.vertical.active
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
// Copyright (C) 2025 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.SearchField {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
searchIndicator.implicitIndicatorHeight + topPadding + bottomPadding,
|
||||
clearIndicator.implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
leftPadding: padding + (control.mirrored || !searchIndicator.indicator || !searchIndicator.indicator.visible ? 0 : searchIndicator.indicator.width + spacing)
|
||||
rightPadding: padding + (control.mirrored || !clearIndicator.indicator || !clearIndicator.indicator.visible ? 0 : clearIndicator.indicator.width + spacing)
|
||||
|
||||
delegate: MenuItem {
|
||||
width: ListView.view.width
|
||||
text: model[control.textRole]
|
||||
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
|
||||
highlighted: control.highlightedIndex === index
|
||||
hoverEnabled: control.hoverEnabled
|
||||
|
||||
Material.foreground: control.currentIndex === index ? ListView.view.contentItem.Material.accent : ListView.view.contentItem.Material.foreground
|
||||
|
||||
required property var model
|
||||
required property int index
|
||||
}
|
||||
|
||||
searchIndicator.indicator: Item {
|
||||
x: !control.mirrored ? 10 : control.width - width - 10
|
||||
y: control.topPadding
|
||||
height: control.availableHeight
|
||||
width: height / 2
|
||||
|
||||
ColorImage {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
|
||||
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/search-magnifier.png"
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
}
|
||||
}
|
||||
|
||||
clearIndicator.indicator: Item {
|
||||
x: control.mirrored ? 10 : control.width - width - 10
|
||||
y: control.topPadding
|
||||
height: control.availableHeight
|
||||
width: height / 2
|
||||
visible: control.text.length > 0
|
||||
|
||||
ColorImage {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
|
||||
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/close_circle.png"
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: T.TextField {
|
||||
// implicitWidth: Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding
|
||||
implicitHeight: contentHeight + topPadding + bottomPadding
|
||||
|
||||
leftPadding: Material.textFieldHorizontalPadding
|
||||
rightPadding: Material.textFieldHorizontalPadding
|
||||
topPadding: Material.textFieldVerticalPadding
|
||||
bottomPadding: Material.textFieldVerticalPadding
|
||||
|
||||
// If we're clipped, set topInset to half the height of the placeholder text to avoid it being clipped.
|
||||
topInset: clip ? placeholder.height / 2 : 0
|
||||
|
||||
text: control.text
|
||||
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
selectionColor: control.Material.accentColor
|
||||
selectedTextColor: control.Material.primaryHighlightedTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
ContextMenu.menu: TextEditingContextMenu {
|
||||
editor: parent
|
||||
}
|
||||
|
||||
cursorDelegate: CursorDelegate { }
|
||||
}
|
||||
|
||||
background: MaterialTextContainer {
|
||||
implicitWidth: 160
|
||||
implicitHeight: control.Material.textFieldHeight
|
||||
|
||||
outlineColor: (enabled && control.hovered) ? control.Material.primaryTextColor : control.Material.hintTextColor
|
||||
focusedOutlineColor: control.Material.accentColor
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: true
|
||||
horizontalPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
|
||||
popup: T.Popup {
|
||||
y: control.height
|
||||
width: control.width
|
||||
height: contentItem.implicitHeight > 0 ? Math.min(contentItem.implicitHeight + verticalPadding * 2, control.Window.height - control.y - control.height - control.padding) : 0
|
||||
topMargin: 10
|
||||
bottomMargin: 10
|
||||
verticalPadding: 10
|
||||
|
||||
contentItem: ListView {
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
model: control.delegateModel
|
||||
currentIndex: control.highlightedIndex
|
||||
highlightMoveDuration: 0
|
||||
|
||||
T.ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
radius: 5
|
||||
color: control.Material.dialogColor
|
||||
|
||||
layer.enabled: control.enabled > 0
|
||||
layer.effect: RoundedElevationEffect {
|
||||
elevation: 4
|
||||
roundedScale: Material.ExtraSmallScale
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.SelectionRectangle {
|
||||
id: control
|
||||
|
||||
topLeftHandle: handle
|
||||
bottomRightHandle: handle
|
||||
|
||||
Component {
|
||||
id: handle
|
||||
SliderHandle {
|
||||
palette: SelectionRectangle.control.palette
|
||||
handlePressed: tapHandler.pressed || SelectionRectangle.dragging
|
||||
handleHovered: hoverHandler.hovered
|
||||
visible: SelectionRectangle.control.active
|
||||
|
||||
HoverHandler {
|
||||
id: hoverHandler
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
id: tapHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.Slider {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitHandleWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitHandleHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 6
|
||||
|
||||
// The Slider is discrete if all of the following requirements are met:
|
||||
// * stepSize is positive
|
||||
// * snapMode is set to SnapAlways
|
||||
// * the difference between to and from is cleanly divisible by the stepSize
|
||||
// * the number of tick marks intended to be rendered is less than the width to height ratio, or vice versa for vertical sliders.
|
||||
readonly property real __steps: Math.abs(to - from) / stepSize
|
||||
readonly property bool __isDiscrete: stepSize >= Number.EPSILON
|
||||
&& snapMode === Slider.SnapAlways
|
||||
&& Math.abs(Math.round(__steps) - __steps) < Number.EPSILON
|
||||
&& Math.floor(__steps) < (horizontal ? background.width / background.height : background.height / background.width)
|
||||
|
||||
handle: SliderHandle {
|
||||
x: control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
|
||||
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
|
||||
value: control.value
|
||||
handleHasFocus: control.visualFocus
|
||||
handlePressed: control.pressed
|
||||
handleHovered: control.hovered
|
||||
}
|
||||
|
||||
background: Item {
|
||||
x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
|
||||
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
|
||||
implicitWidth: control.horizontal ? 200 : 48
|
||||
implicitHeight: control.horizontal ? 48 : 200
|
||||
width: control.horizontal ? control.availableWidth : 4
|
||||
height: control.horizontal ? 4 : control.availableHeight
|
||||
|
||||
Rectangle {
|
||||
x: (control.horizontal ? (control.implicitHandleWidth / 2) - (control.__isDiscrete ? 2 : 0) : 0)
|
||||
y: (control.horizontal ? 0 : (control.implicitHandleHeight / 2) - (control.__isDiscrete ? 2 : 0))
|
||||
width: parent.width - (control.horizontal ? (control.implicitHandleWidth - (control.__isDiscrete ? 4 : 0)) : 0)
|
||||
height: parent.height - (control.horizontal ? 0 : (control.implicitHandleHeight - (control.__isDiscrete ? 4 : 0)))
|
||||
scale: control.horizontal && control.mirrored ? -1 : 1
|
||||
radius: Math.min(width, height) / 2
|
||||
color: control.enabled ? Color.transparent(control.Material.accentColor, 0.33) : control.Material.sliderDisabledColor
|
||||
|
||||
Rectangle {
|
||||
x: control.horizontal ? 0 : (parent.width - width) / 2
|
||||
y: control.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height
|
||||
width: control.horizontal ? control.position * parent.width : 4
|
||||
height: control.horizontal ? 4 : control.position * parent.height
|
||||
radius: Math.min(width, height) / 2
|
||||
color: control.enabled ? control.Material.accentColor : control.Material.sliderDisabledColor
|
||||
}
|
||||
|
||||
// Declaring this as a property (in combination with the parent binding below) avoids ids,
|
||||
// which prevent deferred execution.
|
||||
property Repeater repeater: Repeater {
|
||||
parent: control.background.children[0]
|
||||
model: control.__isDiscrete ? Math.floor(control.__steps) + 1 : 0
|
||||
delegate: Rectangle {
|
||||
width: 2
|
||||
height: 2
|
||||
radius: 2
|
||||
x: control.horizontal ? (parent.width - width * 2) * currentPosition + (width / 2) : (parent.width - width) / 2
|
||||
y: control.horizontal ? (parent.height - height) / 2 : (parent.height - height * 2) * currentPosition + (height / 2)
|
||||
color: (control.horizontal && control.visualPosition > currentPosition)
|
||||
|| (!control.horizontal && control.visualPosition <= currentPosition)
|
||||
? control.Material.primaryHighlightedTextColor : control.Material.accentColor
|
||||
|
||||
required property int index
|
||||
readonly property real currentPosition: index / (parent.repeater.count - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.SpinBox {
|
||||
id: control
|
||||
|
||||
// Note: the width of the indicators are calculated into the padding
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
up.implicitIndicatorHeight, down.implicitIndicatorHeight)
|
||||
|
||||
spacing: 6
|
||||
topPadding: Material.textFieldVerticalPadding
|
||||
bottomPadding: Material.textFieldVerticalPadding
|
||||
leftPadding: control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0)
|
||||
rightPadding: control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0)
|
||||
|
||||
validator: IntValidator {
|
||||
locale: control.locale.name
|
||||
bottom: Math.min(control.from, control.to)
|
||||
top: Math.max(control.from, control.to)
|
||||
}
|
||||
|
||||
contentItem: TextInput {
|
||||
text: control.displayText
|
||||
|
||||
font: control.font
|
||||
color: enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
selectionColor: control.Material.textSelectionColor
|
||||
selectedTextColor: control.Material.foreground
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
|
||||
cursorDelegate: CursorDelegate { }
|
||||
|
||||
readOnly: !control.editable
|
||||
validator: control.validator
|
||||
inputMethodHints: control.inputMethodHints
|
||||
clip: width < implicitWidth
|
||||
|
||||
ContextMenu.menu: TextEditingContextMenu {
|
||||
editor: parent
|
||||
}
|
||||
}
|
||||
|
||||
up.indicator: Item {
|
||||
x: control.mirrored ? 0 : control.width - width
|
||||
implicitWidth: control.Material.touchTarget
|
||||
implicitHeight: control.Material.touchTarget
|
||||
height: control.height
|
||||
width: height
|
||||
|
||||
Ripple {
|
||||
clipRadius: 2
|
||||
x: control.spacing
|
||||
y: control.spacing
|
||||
width: parent.width - 2 * control.spacing
|
||||
height: parent.height - 2 * control.spacing
|
||||
pressed: control.up.pressed
|
||||
active: control.up.pressed || control.up.hovered || control.visualFocus
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: Math.min(parent.width / 3, parent.height / 3)
|
||||
height: 2
|
||||
color: enabled ? control.Material.foreground : control.Material.spinBoxDisabledIconColor
|
||||
}
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 2
|
||||
height: Math.min(parent.width / 3, parent.height / 3)
|
||||
color: enabled ? control.Material.foreground : control.Material.spinBoxDisabledIconColor
|
||||
}
|
||||
}
|
||||
|
||||
down.indicator: Item {
|
||||
x: control.mirrored ? control.width - width : 0
|
||||
implicitWidth: control.Material.touchTarget
|
||||
implicitHeight: control.Material.touchTarget
|
||||
height: control.height
|
||||
width: height
|
||||
|
||||
Ripple {
|
||||
clipRadius: 2
|
||||
x: control.spacing
|
||||
y: control.spacing
|
||||
width: parent.width - 2 * control.spacing
|
||||
height: parent.height - 2 * control.spacing
|
||||
pressed: control.down.pressed
|
||||
active: control.down.pressed || control.down.hovered || control.visualFocus
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: parent.width / 3
|
||||
height: 2
|
||||
color: enabled ? control.Material.foreground : control.Material.spinBoxDisabledIconColor
|
||||
}
|
||||
}
|
||||
|
||||
background: MaterialTextContainer {
|
||||
implicitWidth: 140
|
||||
implicitHeight: control.Material.textFieldHeight
|
||||
|
||||
outlineColor: (enabled && control.hovered) ? control.Material.primaryTextColor : control.Material.hintTextColor
|
||||
focusedOutlineColor: control.Material.accentColor
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: true
|
||||
horizontalPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (C) 2018 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.SplitView {
|
||||
id: control
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
handle: Rectangle {
|
||||
implicitWidth: control.orientation === Qt.Horizontal ? 6 : control.width
|
||||
implicitHeight: control.orientation === Qt.Horizontal ? control.height : 6
|
||||
color: T.SplitHandle.pressed ? control.Material.background
|
||||
: Qt.lighter(control.Material.background, T.SplitHandle.hovered ? 1.2 : 1.1)
|
||||
|
||||
Rectangle {
|
||||
color: control.Material.secondaryTextColor
|
||||
width: control.orientation === Qt.Horizontal ? thickness : length
|
||||
height: control.orientation === Qt.Horizontal ? length : thickness
|
||||
radius: thickness
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
|
||||
property int length: parent.T.SplitHandle.pressed ? 3 : 8
|
||||
readonly property int thickness: parent.T.SplitHandle.pressed ? 3 : 1
|
||||
|
||||
Behavior on length {
|
||||
NumberAnimation {
|
||||
duration: 100
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.StackView {
|
||||
id: control
|
||||
|
||||
component LineAnimation: NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
|
||||
component FadeIn: LineAnimation {
|
||||
property: "opacity"
|
||||
from: 0.0
|
||||
to: 1.0
|
||||
}
|
||||
|
||||
component FadeOut: LineAnimation {
|
||||
property: "opacity"
|
||||
from: 1.0
|
||||
to: 0.0
|
||||
}
|
||||
|
||||
popEnter: Transition {
|
||||
// slide_in_left
|
||||
LineAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * -control.width; to: 0 }
|
||||
FadeIn {}
|
||||
}
|
||||
|
||||
popExit: Transition {
|
||||
// slide_out_right
|
||||
LineAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * control.width }
|
||||
FadeOut {}
|
||||
}
|
||||
|
||||
pushEnter: Transition {
|
||||
// slide_in_right
|
||||
LineAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * control.width; to: 0 }
|
||||
FadeIn {}
|
||||
}
|
||||
|
||||
pushExit: Transition {
|
||||
// slide_out_left
|
||||
LineAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * -control.width }
|
||||
FadeOut {}
|
||||
}
|
||||
|
||||
replaceEnter: Transition {
|
||||
// slide_in_right
|
||||
LineAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * control.width; to: 0 }
|
||||
FadeIn {}
|
||||
}
|
||||
|
||||
replaceExit: Transition {
|
||||
// slide_out_left
|
||||
LineAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * -control.width }
|
||||
FadeOut {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.SwipeDelegate {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 16
|
||||
verticalPadding: 8
|
||||
spacing: 16
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
|
||||
|
||||
contentItem: IconLabel {
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: control.Material.delegateHeight
|
||||
|
||||
color: control.Material.backgroundColor
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
visible: control.highlighted
|
||||
color: control.Material.listHighlightColor
|
||||
}
|
||||
|
||||
Ripple {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
clip: visible
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.Material.rippleColor
|
||||
enabled: control.swipe.position === 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.SwipeView {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
contentItem: ListView {
|
||||
model: control.contentModel
|
||||
interactive: control.interactive
|
||||
currentIndex: control.currentIndex
|
||||
focus: control.focus
|
||||
|
||||
spacing: control.spacing
|
||||
orientation: control.orientation
|
||||
snapMode: ListView.SnapOneItem
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
highlightRangeMode: ListView.StrictlyEnforceRange
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 250
|
||||
maximumFlickVelocity: 4 * (control.orientation === Qt.Horizontal ? width : height)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
import QtQuick.Templates as T
|
||||
|
||||
T.Switch {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 8
|
||||
spacing: 8
|
||||
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
icon.color: checked
|
||||
? (Material.theme === Material.Light
|
||||
? enabled ? Qt.darker(Material.switchCheckedTrackColor, 1.8) : Material.switchDisabledCheckedIconColor
|
||||
: enabled ? Material.primaryTextColor : Material.switchDisabledCheckedIconColor)
|
||||
: enabled ? Material.switchUncheckedTrackColor : Material.switchDisabledUncheckedIconColor
|
||||
|
||||
indicator: SwitchIndicator {
|
||||
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
control: control
|
||||
|
||||
Ripple {
|
||||
x: parent.handle.x + parent.handle.width / 2 - width / 2
|
||||
y: parent.handle.y + parent.handle.height / 2 - height / 2
|
||||
width: 28
|
||||
height: 28
|
||||
pressed: control.pressed
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
|
||||
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
|
||||
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.SwitchDelegate {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding,
|
||||
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 16
|
||||
verticalPadding: Material.switchDelegateVerticalPadding
|
||||
spacing: 16
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
indicator: SwitchIndicator {
|
||||
x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
control: control
|
||||
}
|
||||
|
||||
contentItem: IconLabel {
|
||||
leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
|
||||
rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
|
||||
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: control.Material.delegateHeight
|
||||
|
||||
color: control.highlighted ? control.Material.listHighlightColor : "transparent"
|
||||
|
||||
Ripple {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
clip: visible
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.TabBar {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
spacing: 1
|
||||
|
||||
contentItem: ListView {
|
||||
model: control.contentModel
|
||||
currentIndex: control.currentIndex
|
||||
|
||||
spacing: control.spacing
|
||||
orientation: ListView.Horizontal
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
flickableDirection: Flickable.AutoFlickIfNeeded
|
||||
snapMode: ListView.SnapToItem
|
||||
|
||||
highlightMoveDuration: 250
|
||||
highlightResizeDuration: 0
|
||||
highlightFollowsCurrentItem: true
|
||||
highlightRangeMode: ListView.ApplyRange
|
||||
preferredHighlightBegin: 48
|
||||
preferredHighlightEnd: width - 48
|
||||
|
||||
highlight: Item {
|
||||
z: 2
|
||||
Rectangle {
|
||||
height: 2
|
||||
width: parent.width
|
||||
y: control.position === T.TabBar.Footer ? 0 : parent.height - height
|
||||
color: control.Material.accentColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: control.Material.backgroundColor
|
||||
|
||||
layer.enabled: control.Material.elevation > 0
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
fullWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.TabButton {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 12
|
||||
spacing: 6
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
contentItem: IconLabel {
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: !control.enabled ? control.Material.hintTextColor
|
||||
: control.down || control.checked ? control.Material.accentColor : control.Material.foreground
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Ripple {
|
||||
implicitHeight: control.Material.touchTarget
|
||||
|
||||
clip: true
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.TextArea {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(contentWidth + leftPadding + rightPadding,
|
||||
implicitBackgroundWidth + leftInset + rightInset,
|
||||
placeholder.implicitWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
|
||||
implicitBackgroundHeight + topInset + bottomInset)
|
||||
|
||||
// If we're clipped, or we're in a Flickable that's clipped, set our topInset
|
||||
// to half the height of the placeholder text to avoid it being clipped.
|
||||
topInset: clip || (parent?.parent as Flickable && parent?.parent.clip) ? placeholder.largestHeight / 2 : 0
|
||||
|
||||
leftPadding: Material.textFieldHorizontalPadding
|
||||
rightPadding: Material.textFieldHorizontalPadding
|
||||
// Need to account for the placeholder text when it's sitting on top.
|
||||
topPadding: Material.containerStyle === Material.Filled && placeholderText.length > 0 && (activeFocus || length > 0)
|
||||
? Material.textFieldVerticalPadding + placeholder.largestHeight
|
||||
// When the condition above is not met, the text should always sit in the middle
|
||||
// of a default-height TextArea, which is just near the top for a higher-than-default one.
|
||||
// Account for any topInset as well, otherwise the text will be too close to the background.
|
||||
: ((implicitBackgroundHeight - placeholder.largestHeight) / 2) + topInset
|
||||
bottomPadding: Material.textFieldVerticalPadding
|
||||
|
||||
color: enabled ? Material.foreground : Material.hintTextColor
|
||||
selectionColor: Material.accentColor
|
||||
selectedTextColor: Material.primaryHighlightedTextColor
|
||||
placeholderTextColor: enabled && activeFocus ? Material.accentColor : Material.hintTextColor
|
||||
|
||||
Material.containerStyle: Material.Outlined
|
||||
|
||||
ContextMenu.menu: TextEditingContextMenu {
|
||||
editor: control
|
||||
}
|
||||
|
||||
cursorDelegate: CursorDelegate { }
|
||||
|
||||
FloatingPlaceholderText {
|
||||
id: placeholder
|
||||
width: control.width - (control.leftPadding + control.rightPadding)
|
||||
text: control.placeholderText
|
||||
font: control.font
|
||||
color: control.placeholderTextColor
|
||||
elide: Text.ElideRight
|
||||
renderType: control.renderType
|
||||
// When the TextArea is in a Flickable, the background is reparented to it
|
||||
// so that decorations don't move with the content. We need to do the same.
|
||||
// Also allow the background to be set to null; in that case we're just not visible.
|
||||
parent: control.background?.parent ?? null
|
||||
|
||||
filled: control.Material.containerStyle === Material.Filled
|
||||
verticalPadding: control.Material.textFieldVerticalPadding
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: control.length > 0
|
||||
controlImplicitBackgroundHeight: control.implicitBackgroundHeight
|
||||
controlHeight: control.height
|
||||
leftPadding: control.leftPadding
|
||||
floatingLeftPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
|
||||
background: MaterialTextContainer {
|
||||
implicitWidth: 120
|
||||
implicitHeight: control.Material.textFieldHeight
|
||||
|
||||
filled: control.Material.containerStyle === Material.Filled
|
||||
fillColor: control.Material.textFieldFilledContainerColor
|
||||
outlineColor: (enabled && control.hovered) ? control.Material.primaryTextColor : control.Material.hintTextColor
|
||||
focusedOutlineColor: control.Material.accentColor
|
||||
// When the control's size is set larger than its implicit size, use whatever size is smaller
|
||||
// so that the gap isn't too big.
|
||||
placeholderTextWidth: Math.min(placeholder.width, placeholder.implicitWidth) * placeholder.scale
|
||||
placeholderTextHAlign: control.effectiveHorizontalAlignment
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: control.length > 0
|
||||
placeholderHasText: placeholder.text.length > 0
|
||||
horizontalPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.TextField {
|
||||
id: control
|
||||
|
||||
implicitWidth: implicitBackgroundWidth + leftInset + rightInset
|
||||
|| Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
contentHeight + topPadding + bottomPadding)
|
||||
|
||||
// If we're clipped, set topInset to half the height of the placeholder text to avoid it being clipped.
|
||||
topInset: clip ? placeholder.largestHeight / 2 : 0
|
||||
|
||||
leftPadding: Material.textFieldHorizontalPadding
|
||||
rightPadding: Material.textFieldHorizontalPadding
|
||||
// Need to account for the placeholder text when it's sitting on top.
|
||||
topPadding: Material.containerStyle === Material.Filled
|
||||
? placeholderText.length > 0 && (activeFocus || length > 0)
|
||||
? Material.textFieldVerticalPadding + placeholder.largestHeight
|
||||
: Material.textFieldVerticalPadding
|
||||
// Account for any topInset (used to avoid floating placeholder text being clipped),
|
||||
// otherwise the text will be too close to the background.
|
||||
: Material.textFieldVerticalPadding + topInset
|
||||
bottomPadding: Material.textFieldVerticalPadding
|
||||
|
||||
color: enabled ? Material.foreground : Material.hintTextColor
|
||||
selectionColor: Material.accentColor
|
||||
selectedTextColor: Material.primaryHighlightedTextColor
|
||||
placeholderTextColor: enabled && activeFocus ? Material.accentColor : Material.hintTextColor
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
|
||||
Material.containerStyle: Material.Outlined
|
||||
|
||||
ContextMenu.menu: TextEditingContextMenu {
|
||||
editor: control
|
||||
}
|
||||
|
||||
cursorDelegate: CursorDelegate { }
|
||||
|
||||
FloatingPlaceholderText {
|
||||
id: placeholder
|
||||
width: control.width - (control.leftPadding + control.rightPadding)
|
||||
text: control.placeholderText
|
||||
font: control.font
|
||||
color: control.placeholderTextColor
|
||||
elide: Text.ElideRight
|
||||
renderType: control.renderType
|
||||
|
||||
filled: control.Material.containerStyle === Material.Filled
|
||||
verticalPadding: control.Material.textFieldVerticalPadding
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: control.length > 0
|
||||
controlImplicitBackgroundHeight: control.implicitBackgroundHeight
|
||||
controlHeight: control.height
|
||||
leftPadding: control.leftPadding
|
||||
floatingLeftPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
|
||||
background: MaterialTextContainer {
|
||||
implicitWidth: 120
|
||||
implicitHeight: control.Material.textFieldHeight
|
||||
|
||||
filled: control.Material.containerStyle === Material.Filled
|
||||
fillColor: control.Material.textFieldFilledContainerColor
|
||||
outlineColor: (enabled && control.hovered) ? control.Material.primaryTextColor : control.Material.hintTextColor
|
||||
focusedOutlineColor: control.Material.accentColor
|
||||
// When the control's size is set larger than its implicit size, use whatever size is smaller
|
||||
// so that the gap isn't too big.
|
||||
placeholderTextWidth: Math.min(placeholder.width, placeholder.implicitWidth) * placeholder.scale
|
||||
placeholderTextHAlign: control.effectiveHorizontalAlignment
|
||||
controlHasActiveFocus: control.activeFocus
|
||||
controlHasText: control.length > 0
|
||||
placeholderHasText: placeholder.text.length > 0
|
||||
horizontalPadding: control.Material.textFieldHorizontalPadding
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.ToolBar {
|
||||
id: control
|
||||
|
||||
Material.elevation: 0
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
topPadding: SafeArea.margins.top
|
||||
leftPadding: SafeArea.margins.left
|
||||
rightPadding: SafeArea.margins.right
|
||||
bottomPadding: SafeArea.margins.bottom
|
||||
|
||||
Material.background: Material.primary
|
||||
|
||||
spacing: 16
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: 48
|
||||
color: control.Material.background
|
||||
|
||||
layer.enabled: control.Material.elevation > 0
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: control.Material.elevation
|
||||
fullWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
T.ToolButton {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 6
|
||||
spacing: 6
|
||||
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
|
||||
contentItem: IconLabel {
|
||||
spacing: control.spacing
|
||||
mirrored: control.mirrored
|
||||
display: control.display
|
||||
|
||||
icon: control.icon
|
||||
defaultIconColor: !control.enabled ? control.Material.hintTextColor
|
||||
: control.checked || control.highlighted ? control.Material.accent : control.Material.foreground
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: defaultIconColor
|
||||
}
|
||||
|
||||
background: Ripple {
|
||||
implicitWidth: control.Material.touchTarget
|
||||
implicitHeight: control.Material.touchTarget
|
||||
|
||||
readonly property bool square: control.contentItem.width <= control.contentItem.height
|
||||
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
clip: !square
|
||||
width: square ? parent.height / 2 : parent.width
|
||||
height: square ? parent.height / 2 : parent.height
|
||||
pressed: control.pressed
|
||||
anchor: control
|
||||
active: control.enabled && (control.down || control.visualFocus || control.hovered)
|
||||
color: control.Material.rippleColor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.ToolSeparator {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
horizontalPadding: vertical ? 12 : 5
|
||||
verticalPadding: vertical ? 5 : 12
|
||||
|
||||
contentItem: Rectangle {
|
||||
implicitWidth: control.vertical ? 1 : 38
|
||||
implicitHeight: control.vertical ? 38 : 1
|
||||
color: control.Material.hintTextColor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.ToolTip {
|
||||
id: control
|
||||
|
||||
x: parent ? (parent.width - implicitWidth) / 2 : 0
|
||||
y: -implicitHeight - 24
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
margins: 12
|
||||
padding: 8
|
||||
horizontalPadding: padding + 8
|
||||
|
||||
closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
|
||||
|
||||
Material.theme: Material.Dark
|
||||
|
||||
enter: Transition {
|
||||
// toast_enter
|
||||
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutQuad; duration: 500 }
|
||||
}
|
||||
|
||||
exit: Transition {
|
||||
// toast_exit
|
||||
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing.type: Easing.InQuad; duration: 500 }
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: control.text
|
||||
font: control.font
|
||||
wrapMode: Text.Wrap
|
||||
color: control.Material.foreground
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: control.Material.tooltipHeight
|
||||
color: control.Material.tooltipColor
|
||||
opacity: 0.9
|
||||
radius: 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.TreeViewDelegate {
|
||||
id: control
|
||||
|
||||
implicitWidth: leftMargin + __contentIndent + implicitContentWidth + rightPadding + rightMargin
|
||||
implicitHeight: Math.max(implicitBackgroundHeight, implicitContentHeight, implicitIndicatorHeight)
|
||||
|
||||
indentation: indicator ? indicator.width : 12
|
||||
leftMargin: 16
|
||||
rightMargin: 16
|
||||
spacing: 14
|
||||
|
||||
topPadding: contentItem ? (height - contentItem.implicitHeight) / 2 : 0
|
||||
leftPadding: !mirrored ? leftMargin + __contentIndent : width - leftMargin - __contentIndent - implicitContentWidth
|
||||
|
||||
highlighted: control.selected || control.current
|
||||
|| ((control.treeView.selectionBehavior === TableView.SelectRows
|
||||
|| control.treeView.selectionBehavior === TableView.SelectionDisabled)
|
||||
&& control.row === control.treeView.currentRow)
|
||||
|
||||
required property int row
|
||||
required property var model
|
||||
readonly property real __contentIndent: !isTreeNode ? 0 : (depth * indentation) + (indicator ? indicator.width + spacing : 0)
|
||||
|
||||
indicator: Item {
|
||||
readonly property real __indicatorIndent: control.leftMargin + (control.depth * control.indentation)
|
||||
x: !control.mirrored ? __indicatorIndent : control.width - __indicatorIndent - width
|
||||
y: (control.height - height) / 2
|
||||
implicitWidth: Math.max(arrow.implicitWidth, 20)
|
||||
implicitHeight: control.Material.buttonHeight
|
||||
|
||||
property ColorImage arrow : ColorImage {
|
||||
parent: control.indicator
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
rotation: control.expanded ? 90 : (control.mirrored ? 180 : 0)
|
||||
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/arrow-indicator.png"
|
||||
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
|
||||
defaultColor: "#353637"
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: control.Material.buttonHeight
|
||||
color: control.highlighted
|
||||
? control.Material.accentColor
|
||||
: (control.treeView.alternatingRows && control.row % 2 !== 0
|
||||
? control.Material.background
|
||||
// The Material.shade() is used as the alternate background color for rows
|
||||
// based on the Material.theme value.
|
||||
: control.Material.shade(control.Material.background,
|
||||
control.Material.theme === Material.Dark
|
||||
? Material.Shade100 // the lighter background color
|
||||
: Material.Shade700 // the darker background color
|
||||
))
|
||||
}
|
||||
|
||||
contentItem: Label {
|
||||
text: control.model.display
|
||||
elide: Text.ElideRight
|
||||
visible: !control.editing
|
||||
}
|
||||
|
||||
// The edit delegate is a separate component, and doesn't need
|
||||
// to follow the same strict rules that are applied to a control.
|
||||
// qmllint disable attached-property-reuse
|
||||
// qmllint disable controls-attached-property-reuse
|
||||
// qmllint disable QuickControlsSanity.controls-sanity
|
||||
TableView.editDelegate: FocusScope {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
readonly property int __role: {
|
||||
let model = control.treeView.model
|
||||
let index = control.treeView.index(row, column)
|
||||
let editText = model.data(index, Qt.EditRole)
|
||||
return editText !== undefined ? Qt.EditRole : Qt.DisplayRole
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: textField
|
||||
x: control.contentItem.x
|
||||
y: (parent.height - height) / 2
|
||||
width: control.contentItem.width
|
||||
text: control.treeView.model.data(control.treeView.index(row, column), __role)
|
||||
focus: true
|
||||
}
|
||||
|
||||
TableView.onCommit: {
|
||||
let index = TableView.view.index(row, column)
|
||||
TableView.view.model.setData(index, textField.text, __role)
|
||||
}
|
||||
|
||||
Component.onCompleted: textField.selectAll()
|
||||
}
|
||||
// qmllint enable attached-property-reuse
|
||||
// qmllint enable controls-attached-property-reuse
|
||||
// qmllint enable QuickControlsSanity.controls-sanity
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.Tumbler {
|
||||
id: control
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
readonly property real __delegateHeight: availableHeight / visibleItemCount
|
||||
|
||||
delegate: Text {
|
||||
text: modelData
|
||||
color: control.Material.foreground
|
||||
font: control.font
|
||||
opacity: (1.0 - Math.abs(Tumbler.displacement) / (control.visibleItemCount / 2)) * (control.enabled ? 1 : 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
required property var modelData
|
||||
required property int index
|
||||
}
|
||||
|
||||
contentItem: TumblerView {
|
||||
implicitWidth: 60
|
||||
implicitHeight: 200
|
||||
model: control.model
|
||||
delegate: control.delegate
|
||||
path: Path {
|
||||
startX: control.contentItem.width / 2
|
||||
startY: -control.__delegateHeight / 2
|
||||
PathLine {
|
||||
x: control.contentItem.width / 2
|
||||
y: (control.visibleItemCount + 1) * control.__delegateHeight - control.__delegateHeight / 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
T.VerticalHeaderView {
|
||||
id: control
|
||||
|
||||
// The contentWidth of TableView will be zero at start-up, until the delegate
|
||||
// items have been loaded. This means that even if the implicit width of
|
||||
// VerticalHeaderView should be the same as the content width in the end, we
|
||||
// need to ensure that it has at least a width of 1 at start-up, otherwise
|
||||
// TableView won't bother loading any delegates at all.
|
||||
implicitWidth: Math.max(1, contentWidth)
|
||||
implicitHeight: syncView ? syncView.height : 0
|
||||
|
||||
delegate: VerticalHeaderViewDelegate { }
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// Copyright (C) 2025 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Templates as T
|
||||
|
||||
T.HeaderViewDelegate {
|
||||
id: control
|
||||
|
||||
// same as AbstractButton.qml
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
implicitContentWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 8
|
||||
|
||||
highlighted: selected
|
||||
|
||||
background: Rectangle {
|
||||
color: control.Material.backgroundColor
|
||||
}
|
||||
|
||||
contentItem: Label {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: enabled ? control.Material.foreground
|
||||
: control.Material.hintTextColor
|
||||
text: control.model[control.headerView.textRole]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
/*
|
||||
A implementation of CSS's box-shadow, used by ElevationEffect for a Material Design
|
||||
elevation shadow effect.
|
||||
*/
|
||||
RectangularGlow {
|
||||
// The 4 properties from CSS box-shadow, plus the inherited color property
|
||||
property int offsetX
|
||||
property int offsetY
|
||||
property int blurRadius
|
||||
property int spreadRadius
|
||||
|
||||
// The strength of the shadow. We have this because RectangularGlow spreads
|
||||
// out the shadow thinly, whereas lower elevation levels in Material 3
|
||||
// are less spread out and stronger. This is only used for items with fully-rounded
|
||||
// corners, like buttons.
|
||||
property real strength
|
||||
|
||||
// The source item the shadow is being applied to, used for correctly
|
||||
// calculating the corner radious
|
||||
property Item source
|
||||
|
||||
property bool fullWidth
|
||||
property bool fullHeight
|
||||
|
||||
// qmllint disable unqualified
|
||||
// Intentionally duck-typed (QTBUG-94807)
|
||||
readonly property real sourceRadius: source && source.radius || 0
|
||||
|
||||
x: (parent.width - width)/2 + offsetX
|
||||
y: (parent.height - height)/2 + offsetY
|
||||
|
||||
implicitWidth: source ? source.width : parent.width
|
||||
implicitHeight: source ? source.height : parent.height
|
||||
|
||||
width: implicitWidth + 2 * spreadRadius + (fullWidth ? 2 * cornerRadius : 0)
|
||||
height: implicitHeight + 2 * spreadRadius + (fullHeight ? 2 * cornerRadius : 0)
|
||||
glowRadius: blurRadius/2
|
||||
spread: strength
|
||||
|
||||
cornerRadius: blurRadius + sourceRadius
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
Rectangle {
|
||||
id: indicatorItem
|
||||
implicitWidth: 18
|
||||
implicitHeight: 18
|
||||
color: "transparent"
|
||||
border.color: !control.enabled ? control.Material.hintTextColor
|
||||
: checkState !== Qt.Unchecked ? control.Material.accentColor : control.Material.secondaryTextColor
|
||||
border.width: checkState !== Qt.Unchecked ? width / 2 : 2
|
||||
radius: 2
|
||||
|
||||
property Item control
|
||||
property int checkState: control.checkState
|
||||
|
||||
Behavior on border.width {
|
||||
NumberAnimation {
|
||||
duration: 100
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: 100
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: This needs to be transparent
|
||||
Image {
|
||||
id: checkImage
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 14
|
||||
height: 14
|
||||
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/check.png"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
scale: indicatorItem.checkState === Qt.Checked ? 1 : 0
|
||||
Behavior on scale { NumberAnimation { duration: 100 } }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 12
|
||||
height: 3
|
||||
|
||||
scale: indicatorItem.checkState === Qt.PartiallyChecked ? 1 : 0
|
||||
Behavior on scale { NumberAnimation { duration: 100 } }
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "checked"
|
||||
when: indicatorItem.checkState === Qt.Checked
|
||||
},
|
||||
State {
|
||||
name: "partiallychecked"
|
||||
when: indicatorItem.checkState === Qt.PartiallyChecked
|
||||
}
|
||||
]
|
||||
|
||||
transitions: Transition {
|
||||
SequentialAnimation {
|
||||
NumberAnimation {
|
||||
target: indicatorItem
|
||||
property: "scale"
|
||||
// Go down 2 pixels in size.
|
||||
to: 1 - 2 / indicatorItem.width
|
||||
duration: 120
|
||||
}
|
||||
NumberAnimation {
|
||||
target: indicatorItem
|
||||
property: "scale"
|
||||
to: 1
|
||||
duration: 120
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
Rectangle {
|
||||
id: cursor
|
||||
|
||||
color: parent.Material.accentColor
|
||||
width: 2
|
||||
visible: parent.activeFocus && !parent.readOnly && parent.selectionStart === parent.selectionEnd
|
||||
|
||||
Connections {
|
||||
target: cursor.parent
|
||||
function onCursorPositionChanged() {
|
||||
// keep a moving cursor visible
|
||||
cursor.opacity = 1
|
||||
timer.restart()
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
running: cursor.parent.activeFocus && !cursor.parent.readOnly && interval != 0
|
||||
repeat: true
|
||||
interval: Application.styleHints.cursorFlashTime / 2
|
||||
onTriggered: cursor.opacity = !cursor.opacity ? 1 : 0
|
||||
// force the cursor visible when gaining focus
|
||||
onRunningChanged: cursor.opacity = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
/*
|
||||
An effect for standard Material Design elevation shadows. Useful for using as \c layer.effect.
|
||||
*/
|
||||
Item {
|
||||
id: effect
|
||||
|
||||
/*
|
||||
The source the effect is applied to.
|
||||
*/
|
||||
property var source
|
||||
|
||||
/*
|
||||
The elevation of the \l source Item.
|
||||
*/
|
||||
property int elevation: 0
|
||||
|
||||
/*
|
||||
Set to \c true if the \l source Item is the same width as its parent and the shadow
|
||||
should be full width instead of rounding around the corner of the Item.
|
||||
|
||||
\sa fullHeight
|
||||
*/
|
||||
property bool fullWidth: false
|
||||
|
||||
/*
|
||||
Set to \c true if the \l source Item is the same height as its parent and the shadow
|
||||
should be full height instead of rounding around the corner of the Item.
|
||||
|
||||
\sa fullWidth
|
||||
*/
|
||||
property bool fullHeight: false
|
||||
|
||||
/*
|
||||
\internal
|
||||
|
||||
The actual source Item the effect is applied to.
|
||||
*/
|
||||
readonly property Item sourceItem: source.sourceItem
|
||||
|
||||
/*
|
||||
* The following shadow values are taken from Angular Material
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2016 Google, Inc. http://angularjs.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
/*
|
||||
\internal
|
||||
|
||||
The shadows to use for each possible elevation. There are three shadows that when combined
|
||||
make up the elevation.
|
||||
*/
|
||||
property var _shadows: _defaultShadows
|
||||
|
||||
readonly property var _defaultShadows: [
|
||||
{ // 0
|
||||
angularValues: [
|
||||
{offset: 0, blur: 0, spread: 0},
|
||||
{offset: 0, blur: 0, spread: 0},
|
||||
{offset: 0, blur: 0, spread: 0}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 1
|
||||
angularValues: [
|
||||
{offset: 1, blur: 3, spread: 0},
|
||||
{offset: 1, blur: 1, spread: 0},
|
||||
{offset: 2, blur: 1, spread: -1}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 2
|
||||
angularValues: [
|
||||
{offset: 1, blur: 5, spread: 0},
|
||||
{offset: 2, blur: 2, spread: 0},
|
||||
{offset: 3, blur: 1, spread: -2}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 3
|
||||
angularValues: [
|
||||
{offset: 1, blur: 8, spread: 0},
|
||||
{offset: 3, blur: 4, spread: 0},
|
||||
{offset: 3, blur: 3, spread: -2}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 4
|
||||
angularValues: [
|
||||
{offset: 2, blur: 4, spread: -1},
|
||||
{offset: 4, blur: 5, spread: 0},
|
||||
{offset: 1, blur: 10, spread: 0}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 5
|
||||
angularValues: [
|
||||
{offset: 3, blur: 5, spread: -1},
|
||||
{offset: 5, blur: 8, spread: 0},
|
||||
{offset: 1, blur: 14, spread: 0}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 6
|
||||
angularValues: [
|
||||
{offset: 3, blur: 5, spread: -1},
|
||||
{offset: 6, blur: 10, spread: 0},
|
||||
{offset: 1, blur: 18, spread: 0}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 7
|
||||
angularValues: [
|
||||
{offset: 4, blur: 5, spread: -2},
|
||||
{offset: 7, blur: 10, spread: 1},
|
||||
{offset: 2, blur: 16, spread: 1}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 8
|
||||
angularValues: [
|
||||
{offset: 5, blur: 5, spread: -3},
|
||||
{offset: 8, blur: 10, spread: 1},
|
||||
{offset: 3, blur: 14, spread: 2}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 9
|
||||
angularValues: [
|
||||
{offset: 5, blur: 6, spread: -3},
|
||||
{offset: 9, blur: 12, spread: 1},
|
||||
{offset: 3, blur: 16, spread: 2}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 10
|
||||
angularValues: [
|
||||
{offset: 6, blur: 6, spread: -3},
|
||||
{offset: 10, blur: 14, spread: 1},
|
||||
{offset: 4, blur: 18, spread: 3}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 11
|
||||
angularValues: [
|
||||
{offset: 6, blur: 7, spread: -4},
|
||||
{offset: 11, blur: 15, spread: 1},
|
||||
{offset: 4, blur: 20, spread: 3}
|
||||
],
|
||||
strength: 0.05
|
||||
},
|
||||
{ // 12
|
||||
angularValues: [
|
||||
{offset: 7, blur: 8, spread: -4},
|
||||
{offset: 12, blur: 17, spread: 2},
|
||||
{offset: 5, blur: 22, spread: 4}
|
||||
],
|
||||
strength: 0.05
|
||||
}
|
||||
]
|
||||
|
||||
/*
|
||||
\internal
|
||||
|
||||
The current shadow based on the elevation.
|
||||
*/
|
||||
readonly property var _shadow: _shadows[Math.max(0, Math.min(elevation, _shadows.length - 1))]
|
||||
|
||||
// Nest the shadows and source view in two items rendered as a layer
|
||||
// so the shadow is not clipped by the bounds of the source view
|
||||
Item {
|
||||
property int margin: -100
|
||||
|
||||
x: margin
|
||||
y: margin
|
||||
width: parent.width - 2 * margin
|
||||
height: parent.height - 2 * margin
|
||||
|
||||
// By rendering as a layer, the shadow will never show through the source item,
|
||||
// even when the source item's opacity is less than 1
|
||||
layer.enabled: true
|
||||
layer.smooth: true
|
||||
|
||||
// The box shadows automatically pick up the size of the source Item and not
|
||||
// the size of the parent, so we don't need to worry about the extra padding
|
||||
// in the parent Item
|
||||
BoxShadow {
|
||||
offsetY: effect._shadow.angularValues[0].offset
|
||||
blurRadius: effect._shadow.angularValues[0].blur
|
||||
spreadRadius: effect._shadow.angularValues[0].spread
|
||||
strength: effect._shadow.strength
|
||||
color: Qt.rgba(0,0,0, 0.2)
|
||||
|
||||
fullWidth: effect.fullWidth
|
||||
fullHeight: effect.fullHeight
|
||||
source: effect.sourceItem
|
||||
}
|
||||
|
||||
BoxShadow {
|
||||
offsetY: effect._shadow.angularValues[1].offset
|
||||
blurRadius: effect._shadow.angularValues[1].blur
|
||||
spreadRadius: effect._shadow.angularValues[1].spread
|
||||
strength: effect._shadow.strength
|
||||
color: Qt.rgba(0,0,0, 0.14)
|
||||
|
||||
fullWidth: effect.fullWidth
|
||||
fullHeight: effect.fullHeight
|
||||
source: effect.sourceItem
|
||||
}
|
||||
|
||||
BoxShadow {
|
||||
offsetY: effect._shadow.angularValues[2].offset
|
||||
blurRadius: effect._shadow.angularValues[2].blur
|
||||
spreadRadius: effect._shadow.angularValues[2].spread
|
||||
strength: effect._shadow.strength
|
||||
color: Qt.rgba(0,0,0, 0.12)
|
||||
|
||||
fullWidth: effect.fullWidth
|
||||
fullHeight: effect.fullHeight
|
||||
source: effect.sourceItem
|
||||
}
|
||||
|
||||
ShaderEffect {
|
||||
property alias source: effect.source
|
||||
|
||||
x: (parent.width - width)/2
|
||||
y: (parent.height - height)/2
|
||||
width: effect.sourceItem.width
|
||||
height: effect.sourceItem.height
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
Rectangle {
|
||||
id: indicator
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
radius: width / 2
|
||||
border.width: 2
|
||||
border.color: targetColor
|
||||
color: "transparent"
|
||||
|
||||
// Store the target color in a separate property, because there are two animations that depend on it.
|
||||
readonly property color targetColor: !control.enabled ? control.Material.hintTextColor
|
||||
: control.checked || control.down ? control.Material.accentColor : control.Material.secondaryTextColor
|
||||
|
||||
property T.AbstractButton control
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: 100
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 10
|
||||
height: 10
|
||||
radius: width / 2
|
||||
color: indicator.targetColor
|
||||
scale: indicator.control.checked || indicator.control.down ? 1 : 0
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 100
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
duration: 100
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
|
||||
/*
|
||||
A cross-graphics API implementation of QtGraphicalEffects' RectangularGlow.
|
||||
*/
|
||||
Item {
|
||||
id: rootItem
|
||||
|
||||
/*
|
||||
This property defines how many pixels outside the item area are reached
|
||||
by the glow.
|
||||
|
||||
The value ranges from 0.0 (no glow) to inf (infinite glow). By default,
|
||||
the property is set to \c 0.0.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Output examples with different glowRadius values
|
||||
\li
|
||||
\li
|
||||
\row
|
||||
\li \image RectangularGlow_glowRadius1.png
|
||||
\li \image RectangularGlow_glowRadius2.png
|
||||
\li \image RectangularGlow_glowRadius3.png
|
||||
\row
|
||||
\li \b { glowRadius: 10 }
|
||||
\li \b { glowRadius: 20 }
|
||||
\li \b { glowRadius: 40 }
|
||||
\row
|
||||
\li \l spread: 0
|
||||
\li \l spread: 0
|
||||
\li \l spread: 0
|
||||
\row
|
||||
\li \l color: #ffffff
|
||||
\li \l color: #ffffff
|
||||
\li \l color: #ffffff
|
||||
\row
|
||||
\li \l cornerRadius: 25
|
||||
\li \l cornerRadius: 25
|
||||
\li \l cornerRadius: 25
|
||||
\endtable
|
||||
|
||||
*/
|
||||
property real glowRadius: 0.0
|
||||
|
||||
/*
|
||||
This property defines how large part of the glow color is strenghtened
|
||||
near the source edges.
|
||||
|
||||
The value ranges from 0.0 (no strenght increase) to 1.0 (maximum
|
||||
strenght increase). By default, the property is set to \c 0.0.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Output examples with different spread values
|
||||
\li
|
||||
\li
|
||||
\row
|
||||
\li \image RectangularGlow_spread1.png
|
||||
\li \image RectangularGlow_spread2.png
|
||||
\li \image RectangularGlow_spread3.png
|
||||
\row
|
||||
\li \b { spread: 0.0 }
|
||||
\li \b { spread: 0.5 }
|
||||
\li \b { spread: 1.0 }
|
||||
\row
|
||||
\li \l glowRadius: 20
|
||||
\li \l glowRadius: 20
|
||||
\li \l glowRadius: 20
|
||||
\row
|
||||
\li \l color: #ffffff
|
||||
\li \l color: #ffffff
|
||||
\li \l color: #ffffff
|
||||
\row
|
||||
\li \l cornerRadius: 25
|
||||
\li \l cornerRadius: 25
|
||||
\li \l cornerRadius: 25
|
||||
\endtable
|
||||
*/
|
||||
property real spread: 0.0
|
||||
|
||||
/*
|
||||
This property defines the RGBA color value which is used for the glow.
|
||||
|
||||
By default, the property is set to \c "white".
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Output examples with different color values
|
||||
\li
|
||||
\li
|
||||
\row
|
||||
\li \image RectangularGlow_color1.png
|
||||
\li \image RectangularGlow_color2.png
|
||||
\li \image RectangularGlow_color3.png
|
||||
\row
|
||||
\li \b { color: #ffffff }
|
||||
\li \b { color: #55ff55 }
|
||||
\li \b { color: #5555ff }
|
||||
\row
|
||||
\li \l glowRadius: 20
|
||||
\li \l glowRadius: 20
|
||||
\li \l glowRadius: 20
|
||||
\row
|
||||
\li \l spread: 0
|
||||
\li \l spread: 0
|
||||
\li \l spread: 0
|
||||
\row
|
||||
\li \l cornerRadius: 25
|
||||
\li \l cornerRadius: 25
|
||||
\li \l cornerRadius: 25
|
||||
\endtable
|
||||
*/
|
||||
property color color: "white"
|
||||
|
||||
/*
|
||||
This property defines the corner radius that is used to draw a glow with
|
||||
rounded corners.
|
||||
|
||||
The value ranges from 0.0 to half of the effective width or height of
|
||||
the glow, whichever is smaller. This can be calculated with: \c{
|
||||
min(width, height) / 2.0 + glowRadius}
|
||||
|
||||
By default, the property is bound to glowRadius property. The glow
|
||||
behaves as if the rectangle was blurred when adjusting the glowRadius
|
||||
property.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Output examples with different cornerRadius values
|
||||
\li
|
||||
\li
|
||||
\row
|
||||
\li \image RectangularGlow_cornerRadius1.png
|
||||
\li \image RectangularGlow_cornerRadius2.png
|
||||
\li \image RectangularGlow_cornerRadius3.png
|
||||
\row
|
||||
\li \b { cornerRadius: 0 }
|
||||
\li \b { cornerRadius: 25 }
|
||||
\li \b { cornerRadius: 50 }
|
||||
\row
|
||||
\li \l glowRadius: 20
|
||||
\li \l glowRadius: 20
|
||||
\li \l glowRadius: 20
|
||||
\row
|
||||
\li \l spread: 0
|
||||
\li \l spread: 0
|
||||
\li \l spread: 0
|
||||
\row
|
||||
\li \l color: #ffffff
|
||||
\li \l color: #ffffff
|
||||
\li \l color: #ffffff
|
||||
\endtable
|
||||
*/
|
||||
property real cornerRadius: glowRadius
|
||||
|
||||
/*
|
||||
This property allows the effect output pixels to be cached in order to
|
||||
improve the rendering performance.
|
||||
|
||||
Every time the source or effect properties are changed, the pixels in
|
||||
the cache must be updated. Memory consumption is increased, because an
|
||||
extra buffer of memory is required for storing the effect output.
|
||||
|
||||
It is recommended to disable the cache when the source or the effect
|
||||
properties are animated.
|
||||
|
||||
By default, the property is set to \c false.
|
||||
*/
|
||||
property bool cached: false
|
||||
|
||||
ShaderEffectSource {
|
||||
id: cacheItem
|
||||
anchors.fill: shaderItem
|
||||
visible: rootItem.cached
|
||||
smooth: true
|
||||
sourceItem: shaderItem
|
||||
live: true
|
||||
hideSource: visible
|
||||
}
|
||||
|
||||
ShaderEffect {
|
||||
id: shaderItem
|
||||
|
||||
x: (parent.width - width) / 2.0
|
||||
y: (parent.height - height) / 2.0
|
||||
width: parent.width + rootItem.glowRadius * 2 + cornerRadius * 2
|
||||
height: parent.height + rootItem.glowRadius * 2 + cornerRadius * 2
|
||||
|
||||
function clampedCornerRadius() {
|
||||
var maxCornerRadius = Math.min(rootItem.width, rootItem.height) / 2 + rootItem.glowRadius;
|
||||
return Math.max(0, Math.min(rootItem.cornerRadius, maxCornerRadius))
|
||||
}
|
||||
|
||||
property color color: rootItem.color
|
||||
property real inverseSpread: 1.0 - rootItem.spread
|
||||
property real relativeSizeX: ((inverseSpread * inverseSpread) * rootItem.glowRadius + cornerRadius * 2.0) / width
|
||||
property real relativeSizeY: relativeSizeX * (width / height)
|
||||
property real spread: rootItem.spread / 2.0
|
||||
property real cornerRadius: clampedCornerRadius()
|
||||
|
||||
fragmentShader: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/shaders/RectangularGlow.frag.qsb"
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
ElevationEffect {
|
||||
required property int roundedScale
|
||||
|
||||
_shadows: roundedScale === Material.NotRounded ? _defaultShadows : roundedShadows()
|
||||
|
||||
function roundedShadows() {
|
||||
// Make a deep copy.
|
||||
let shadows = [..._defaultShadows]
|
||||
for (let i = 0, strength = 0.95; i < shadows.length; ++i) {
|
||||
// See comment on BoxShadow's strength property for why we do this.
|
||||
shadows[i].strength = strength
|
||||
// We don't want the strength to be too high for the controls with very slightly rounded
|
||||
// corners, as they are quite close to the non-rounded ones in terms of not needing adjustments.
|
||||
// This is still not great for the higher elevations for ExtraSmallScale, but it's as good
|
||||
// as I can get it.
|
||||
strength = Math.max(0.05, strength - (roundedScale > Material.ExtraSmallScale ? 0.1 : 0.3))
|
||||
|
||||
// The values at index 0 are already 0, and we don't want our Math.max(1, ...) code to affect them.
|
||||
if (i > 0) {
|
||||
// The blur values for e.g. buttons with rounded corners are too large, so we reduce them.
|
||||
for (let angularShadowIndex = 0; angularShadowIndex < shadows[i].angularValues.length; ++angularShadowIndex) {
|
||||
shadows[i].angularValues[angularShadowIndex].blur =
|
||||
Math.max(1, Math.floor(shadows[i].angularValues[angularShadowIndex].blur / 4))
|
||||
}
|
||||
}
|
||||
}
|
||||
return shadows
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
Item {
|
||||
id: root
|
||||
implicitWidth: initialSize
|
||||
implicitHeight: initialSize
|
||||
|
||||
property real value: 0
|
||||
property bool handleHasFocus: false
|
||||
property bool handlePressed: false
|
||||
property bool handleHovered: false
|
||||
readonly property int initialSize: 13
|
||||
readonly property var control: parent
|
||||
|
||||
Rectangle {
|
||||
id: handleRect
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
radius: width / 2
|
||||
color: root.control
|
||||
? root.control.enabled ? root.control.Material.accentColor : root.control.Material.sliderDisabledColor
|
||||
: "transparent"
|
||||
}
|
||||
|
||||
Ripple {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 22; height: 22
|
||||
pressed: root.handlePressed
|
||||
active: root.handlePressed || root.handleHasFocus || (enabled && root.handleHovered)
|
||||
color: root.control ? root.control.Material.highlightedRippleColor : "transparent"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Copyright (C) 2017 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
|
||||
Rectangle {
|
||||
id: indicator
|
||||
width: control.Material.switchIndicatorWidth
|
||||
height: control.Material.switchIndicatorHeight
|
||||
radius: height / 2
|
||||
y: parent.height / 2 - height / 2
|
||||
color: control.enabled
|
||||
? (control.checked
|
||||
? control.Material.switchCheckedTrackColor : control.Material.switchUncheckedTrackColor)
|
||||
: (control.checked
|
||||
? control.Material.switchDisabledCheckedTrackColor
|
||||
: control.Material.switchDisabledUncheckedTrackColor)
|
||||
border.width: 2
|
||||
border.color: control.enabled
|
||||
? (control.checked ? control.Material.switchCheckedTrackColor : control.Material.switchUncheckedHandleColor)
|
||||
: (control.checked ? control.Material.switchDisabledCheckedTrackColor : control.Material.switchDisabledUncheckedTrackBorderColor)
|
||||
|
||||
property T.AbstractButton control
|
||||
property alias handle: handle
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: handle
|
||||
x: Math.max(offset, Math.min(parent.width - offset - width,
|
||||
indicator.control.visualPosition * parent.width - (width / 2)))
|
||||
y: (parent.height - height) / 2
|
||||
// We use scale to allow us to enlarge the circle from the center,
|
||||
// as using width/height will cause it to jump due to the position x/y bindings.
|
||||
// However, a large enough scale on certain displays will show the triangles
|
||||
// that make up the circle, so instead we make sure that the circle is always
|
||||
// its largest size so that more triangles are used, and downscale instead.
|
||||
width: normalSize * largestScale
|
||||
height: normalSize * largestScale
|
||||
radius: width / 2
|
||||
color: indicator.control.enabled
|
||||
? (indicator.control.checked
|
||||
? indicator.control.Material.switchCheckedHandleColor
|
||||
: indicator.control.hovered
|
||||
? indicator.control.Material.switchUncheckedHoveredHandleColor : indicator.control.Material.switchUncheckedHandleColor)
|
||||
: (indicator.control.checked
|
||||
? indicator.control.Material.switchDisabledCheckedHandleColor
|
||||
: indicator.control.Material.switchDisabledUncheckedHandleColor)
|
||||
scale: indicator.control.down ? 1 : (indicator.control.checked ? checkedSize / largestSize : normalSize / largestSize)
|
||||
|
||||
readonly property int offset: 2
|
||||
readonly property real normalSize: !hasIcon ? indicator.control.Material.switchNormalHandleHeight : checkedSize
|
||||
readonly property real checkedSize: indicator.control.Material.switchCheckedHandleHeight
|
||||
readonly property real largestSize: indicator.control.Material.switchLargestHandleHeight
|
||||
readonly property real largestScale: largestSize / normalSize
|
||||
readonly property bool hasIcon: indicator.control.icon.name.length > 0
|
||||
|| indicator.control.icon.source.toString().length > 0
|
||||
|
||||
Behavior on x {
|
||||
enabled: !indicator.control.pressed
|
||||
SmoothedAnimation {
|
||||
duration: 300
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
duration: 100
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
|
||||
IconImage {
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
name: indicator.control.icon.name
|
||||
source: indicator.control.icon.source
|
||||
sourceSize: Qt.size(indicator.control.icon.width, indicator.control.icon.height)
|
||||
color: indicator.control.icon.color
|
||||
visible: handle.hasIcon
|
||||
}
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2025 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
// Qt-Security score:significant reason:default
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
Menu {
|
||||
id: menu
|
||||
popupType: Qt.platform.pluginName !== "wayland" ? Popup.Window : Popup.Item
|
||||
|
||||
required property Item editor
|
||||
|
||||
UndoAction {
|
||||
editor: menu.editor
|
||||
}
|
||||
RedoAction {
|
||||
editor: menu.editor
|
||||
}
|
||||
|
||||
MenuSeparator {}
|
||||
|
||||
CutAction {
|
||||
editor: menu.editor
|
||||
}
|
||||
CopyAction {
|
||||
editor: menu.editor
|
||||
}
|
||||
PasteAction {
|
||||
editor: menu.editor
|
||||
}
|
||||
DeleteAction {
|
||||
editor: menu.editor
|
||||
}
|
||||
|
||||
MenuSeparator {}
|
||||
|
||||
SelectAllAction {
|
||||
editor: menu.editor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,408 @@
|
||||
import QtQuick.tooling 1.2
|
||||
|
||||
// This file describes the plugin-supplied types contained in the library.
|
||||
// It is used for QML tooling purposes only.
|
||||
//
|
||||
// This file was auto-generated by qmltyperegistrar.
|
||||
|
||||
Module {
|
||||
Component {
|
||||
file: "private/qquickmaterialbusyindicator_p.h"
|
||||
lineNumber: 25
|
||||
name: "QQuickMaterialBusyIndicator"
|
||||
accessSemantics: "reference"
|
||||
defaultProperty: "data"
|
||||
parentProperty: "parent"
|
||||
prototype: "QQuickItem"
|
||||
exports: [
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 2.0",
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 2.1",
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 2.4",
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 2.7",
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 2.11",
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 6.0",
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 6.3",
|
||||
"QtQuick.Controls.Material.impl/BusyIndicatorImpl 6.7"
|
||||
]
|
||||
exportMetaObjectRevisions: [512, 513, 516, 519, 523, 1536, 1539, 1543]
|
||||
Property {
|
||||
name: "color"
|
||||
type: "QColor"
|
||||
read: "color"
|
||||
write: "setColor"
|
||||
index: 0
|
||||
lineNumber: 28
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "running"
|
||||
type: "bool"
|
||||
read: "isRunning"
|
||||
write: "setRunning"
|
||||
index: 1
|
||||
lineNumber: 29
|
||||
isFinal: true
|
||||
}
|
||||
}
|
||||
Component {
|
||||
file: "private/qquickmaterialplaceholdertext_p.h"
|
||||
lineNumber: 29
|
||||
name: "QQuickMaterialPlaceholderText"
|
||||
accessSemantics: "reference"
|
||||
prototype: "QQuickPlaceholderText"
|
||||
exports: [
|
||||
"QtQuick.Controls.Material.impl/FloatingPlaceholderText 6.5",
|
||||
"QtQuick.Controls.Material.impl/FloatingPlaceholderText 6.7"
|
||||
]
|
||||
exportMetaObjectRevisions: [1541, 1543]
|
||||
Property {
|
||||
name: "filled"
|
||||
type: "bool"
|
||||
read: "isFilled"
|
||||
write: "setFilled"
|
||||
notify: "filledChanged"
|
||||
index: 0
|
||||
lineNumber: 32
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "controlHasActiveFocus"
|
||||
type: "bool"
|
||||
read: "controlHasActiveFocus"
|
||||
write: "setControlHasActiveFocus"
|
||||
notify: "controlHasActiveFocusChanged"
|
||||
index: 1
|
||||
lineNumber: 33
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "controlHasText"
|
||||
type: "bool"
|
||||
read: "controlHasText"
|
||||
write: "setControlHasText"
|
||||
notify: "controlHasTextChanged"
|
||||
index: 2
|
||||
lineNumber: 35
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "largestHeight"
|
||||
type: "int"
|
||||
read: "largestHeight"
|
||||
notify: "largestHeightChanged"
|
||||
index: 3
|
||||
lineNumber: 36
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "verticalPadding"
|
||||
type: "double"
|
||||
read: "verticalPadding"
|
||||
write: "setVerticalPadding"
|
||||
notify: "verticalPaddingChanged"
|
||||
index: 4
|
||||
lineNumber: 37
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "controlImplicitBackgroundHeight"
|
||||
type: "double"
|
||||
read: "controlImplicitBackgroundHeight"
|
||||
write: "setControlImplicitBackgroundHeight"
|
||||
notify: "controlImplicitBackgroundHeightChanged"
|
||||
index: 5
|
||||
lineNumber: 38
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "controlHeight"
|
||||
type: "double"
|
||||
read: "controlHeight"
|
||||
write: "setControlHeight"
|
||||
index: 6
|
||||
lineNumber: 40
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "leftPadding"
|
||||
type: "int"
|
||||
write: "setLeftPadding"
|
||||
index: 7
|
||||
lineNumber: 41
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "floatingLeftPadding"
|
||||
type: "int"
|
||||
write: "setFloatingLeftPadding"
|
||||
index: 8
|
||||
lineNumber: 42
|
||||
isFinal: true
|
||||
}
|
||||
Signal { name: "filledChanged"; lineNumber: 72 }
|
||||
Signal { name: "largestHeightChanged"; lineNumber: 73 }
|
||||
Signal { name: "controlHasActiveFocusChanged"; lineNumber: 74 }
|
||||
Signal { name: "controlHasTextChanged"; lineNumber: 75 }
|
||||
Signal { name: "controlImplicitBackgroundHeightChanged"; lineNumber: 76 }
|
||||
Signal { name: "verticalPaddingChanged"; lineNumber: 77 }
|
||||
Method { name: "adjustTransformOrigin"; lineNumber: 80 }
|
||||
}
|
||||
Component {
|
||||
file: "private/qquickmaterialprogressbar_p.h"
|
||||
lineNumber: 25
|
||||
name: "QQuickMaterialProgressBar"
|
||||
accessSemantics: "reference"
|
||||
defaultProperty: "data"
|
||||
parentProperty: "parent"
|
||||
prototype: "QQuickItem"
|
||||
exports: [
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 2.0",
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 2.1",
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 2.4",
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 2.7",
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 2.11",
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 6.0",
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 6.3",
|
||||
"QtQuick.Controls.Material.impl/ProgressBarImpl 6.7"
|
||||
]
|
||||
exportMetaObjectRevisions: [512, 513, 516, 519, 523, 1536, 1539, 1543]
|
||||
Property {
|
||||
name: "color"
|
||||
type: "QColor"
|
||||
read: "color"
|
||||
write: "setColor"
|
||||
index: 0
|
||||
lineNumber: 28
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "progress"
|
||||
type: "double"
|
||||
read: "progress"
|
||||
write: "setProgress"
|
||||
index: 1
|
||||
lineNumber: 29
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "indeterminate"
|
||||
type: "bool"
|
||||
read: "isIndeterminate"
|
||||
write: "setIndeterminate"
|
||||
index: 2
|
||||
lineNumber: 30
|
||||
isFinal: true
|
||||
}
|
||||
}
|
||||
Component {
|
||||
file: "private/qquickmaterialripple_p.h"
|
||||
lineNumber: 25
|
||||
name: "QQuickMaterialRipple"
|
||||
accessSemantics: "reference"
|
||||
defaultProperty: "data"
|
||||
parentProperty: "parent"
|
||||
prototype: "QQuickItem"
|
||||
exports: [
|
||||
"QtQuick.Controls.Material.impl/Ripple 2.0",
|
||||
"QtQuick.Controls.Material.impl/Ripple 2.1",
|
||||
"QtQuick.Controls.Material.impl/Ripple 2.4",
|
||||
"QtQuick.Controls.Material.impl/Ripple 2.7",
|
||||
"QtQuick.Controls.Material.impl/Ripple 2.11",
|
||||
"QtQuick.Controls.Material.impl/Ripple 6.0",
|
||||
"QtQuick.Controls.Material.impl/Ripple 6.3",
|
||||
"QtQuick.Controls.Material.impl/Ripple 6.7"
|
||||
]
|
||||
exportMetaObjectRevisions: [512, 513, 516, 519, 523, 1536, 1539, 1543]
|
||||
Enum {
|
||||
name: "Trigger"
|
||||
lineNumber: 52
|
||||
values: ["Press", "Release"]
|
||||
}
|
||||
Property {
|
||||
name: "color"
|
||||
type: "QColor"
|
||||
read: "color"
|
||||
write: "setColor"
|
||||
index: 0
|
||||
lineNumber: 28
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "clipRadius"
|
||||
type: "double"
|
||||
read: "clipRadius"
|
||||
write: "setClipRadius"
|
||||
index: 1
|
||||
lineNumber: 29
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "pressed"
|
||||
type: "bool"
|
||||
read: "isPressed"
|
||||
write: "setPressed"
|
||||
index: 2
|
||||
lineNumber: 30
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "active"
|
||||
type: "bool"
|
||||
read: "isActive"
|
||||
write: "setActive"
|
||||
index: 3
|
||||
lineNumber: 31
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "anchor"
|
||||
type: "QQuickItem"
|
||||
isPointer: true
|
||||
read: "anchor"
|
||||
write: "setAnchor"
|
||||
index: 4
|
||||
lineNumber: 32
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "trigger"
|
||||
type: "Trigger"
|
||||
read: "trigger"
|
||||
write: "setTrigger"
|
||||
index: 5
|
||||
lineNumber: 33
|
||||
isFinal: true
|
||||
}
|
||||
}
|
||||
Component {
|
||||
file: "private/qquickmaterialtextcontainer_p.h"
|
||||
lineNumber: 27
|
||||
name: "QQuickMaterialTextContainer"
|
||||
accessSemantics: "reference"
|
||||
prototype: "QQuickPaintedItem"
|
||||
exports: [
|
||||
"QtQuick.Controls.Material.impl/MaterialTextContainer 6.5",
|
||||
"QtQuick.Controls.Material.impl/MaterialTextContainer 6.7"
|
||||
]
|
||||
exportMetaObjectRevisions: [1541, 1543]
|
||||
Enum {
|
||||
name: "PlaceHolderHAlignment"
|
||||
lineNumber: 48
|
||||
values: [
|
||||
"AlignLeft",
|
||||
"AlignRight",
|
||||
"AlignHCenter",
|
||||
"AlignJustify"
|
||||
]
|
||||
}
|
||||
Property {
|
||||
name: "filled"
|
||||
type: "bool"
|
||||
read: "isFilled"
|
||||
write: "setFilled"
|
||||
index: 0
|
||||
lineNumber: 30
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "controlHasActiveFocus"
|
||||
type: "bool"
|
||||
read: "controlHasActiveFocus"
|
||||
write: "setControlHasActiveFocus"
|
||||
notify: "controlHasActiveFocusChanged"
|
||||
index: 1
|
||||
lineNumber: 31
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "fillColor"
|
||||
type: "QColor"
|
||||
read: "fillColor"
|
||||
write: "setFillColor"
|
||||
index: 2
|
||||
lineNumber: 33
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "outlineColor"
|
||||
type: "QColor"
|
||||
read: "outlineColor"
|
||||
write: "setOutlineColor"
|
||||
index: 3
|
||||
lineNumber: 34
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "focusedOutlineColor"
|
||||
type: "QColor"
|
||||
read: "focusedOutlineColor"
|
||||
write: "setFocusedOutlineColor"
|
||||
index: 4
|
||||
lineNumber: 35
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "focusAnimationProgress"
|
||||
type: "double"
|
||||
read: "focusAnimationProgress"
|
||||
write: "setFocusAnimationProgress"
|
||||
index: 5
|
||||
lineNumber: 36
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "placeholderTextWidth"
|
||||
type: "double"
|
||||
read: "placeholderTextWidth"
|
||||
write: "setPlaceholderTextWidth"
|
||||
index: 6
|
||||
lineNumber: 37
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "placeholderTextHAlign"
|
||||
type: "PlaceHolderHAlignment"
|
||||
read: "placeholderTextHAlign"
|
||||
write: "setPlaceholderTextHAlign"
|
||||
index: 7
|
||||
lineNumber: 38
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "controlHasText"
|
||||
type: "bool"
|
||||
read: "controlHasText"
|
||||
write: "setControlHasText"
|
||||
notify: "controlHasTextChanged"
|
||||
index: 8
|
||||
lineNumber: 39
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "placeholderHasText"
|
||||
type: "bool"
|
||||
read: "placeholderHasText"
|
||||
write: "setPlaceholderHasText"
|
||||
notify: "placeholderHasTextChanged"
|
||||
index: 9
|
||||
lineNumber: 40
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "horizontalPadding"
|
||||
type: "int"
|
||||
read: "horizontalPadding"
|
||||
write: "setHorizontalPadding"
|
||||
notify: "horizontalPaddingChanged"
|
||||
index: 10
|
||||
lineNumber: 41
|
||||
isFinal: true
|
||||
}
|
||||
Signal { name: "animateChanged"; lineNumber: 92 }
|
||||
Signal { name: "controlHasActiveFocusChanged"; lineNumber: 93 }
|
||||
Signal { name: "controlHasTextChanged"; lineNumber: 94 }
|
||||
Signal { name: "placeholderHasTextChanged"; lineNumber: 95 }
|
||||
Signal { name: "horizontalPaddingChanged"; lineNumber: 96 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
module QtQuick.Controls.Material.impl
|
||||
linktarget Qt6::qtquickcontrols2materialstyleimplplugin
|
||||
optional plugin qtquickcontrols2materialstyleimplplugin
|
||||
classname QtQuickControls2MaterialStyleImplPlugin
|
||||
typeinfo plugins.qmltypes
|
||||
depends QtQuick auto
|
||||
depends QtQuick.Controls.impl auto
|
||||
prefer :/qt-project.org/imports/QtQuick/Controls/Material/impl/
|
||||
BoxShadow 6.0 BoxShadow.qml
|
||||
BoxShadow 2.0 BoxShadow.qml
|
||||
CheckIndicator 6.0 CheckIndicator.qml
|
||||
CheckIndicator 2.0 CheckIndicator.qml
|
||||
CursorDelegate 6.0 CursorDelegate.qml
|
||||
CursorDelegate 2.0 CursorDelegate.qml
|
||||
ElevationEffect 6.0 ElevationEffect.qml
|
||||
ElevationEffect 2.0 ElevationEffect.qml
|
||||
RadioIndicator 6.0 RadioIndicator.qml
|
||||
RadioIndicator 2.0 RadioIndicator.qml
|
||||
RectangularGlow 6.0 RectangularGlow.qml
|
||||
RectangularGlow 2.0 RectangularGlow.qml
|
||||
RoundedElevationEffect 6.0 RoundedElevationEffect.qml
|
||||
RoundedElevationEffect 2.0 RoundedElevationEffect.qml
|
||||
SliderHandle 6.0 SliderHandle.qml
|
||||
SliderHandle 2.0 SliderHandle.qml
|
||||
SwitchIndicator 6.0 SwitchIndicator.qml
|
||||
SwitchIndicator 2.0 SwitchIndicator.qml
|
||||
TextEditingContextMenu 6.11 TextEditingContextMenu.qml
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,853 @@
|
||||
import QtQuick.tooling 1.2
|
||||
|
||||
// This file describes the plugin-supplied types contained in the library.
|
||||
// It is used for QML tooling purposes only.
|
||||
//
|
||||
// This file was auto-generated by qmltyperegistrar.
|
||||
|
||||
Module {
|
||||
Component {
|
||||
file: "qquickattachedpropertypropagator.h"
|
||||
lineNumber: 15
|
||||
name: "QQuickAttachedPropertyPropagator"
|
||||
accessSemantics: "reference"
|
||||
prototype: "QObject"
|
||||
}
|
||||
Component {
|
||||
file: "private/qquickmaterialstyle_p.h"
|
||||
lineNumber: 26
|
||||
name: "QQuickMaterialStyle"
|
||||
accessSemantics: "reference"
|
||||
prototype: "QQuickAttachedPropertyPropagator"
|
||||
exports: [
|
||||
"QtQuick.Controls.Material/Material 2.0",
|
||||
"QtQuick.Controls.Material/Material 2.15",
|
||||
"QtQuick.Controls.Material/Material 6.0"
|
||||
]
|
||||
isCreatable: false
|
||||
exportMetaObjectRevisions: [512, 527, 1536]
|
||||
attachedType: "QQuickMaterialStyle"
|
||||
Enum {
|
||||
name: "Theme"
|
||||
lineNumber: 107
|
||||
values: ["Light", "Dark", "System"]
|
||||
}
|
||||
Enum {
|
||||
name: "Variant"
|
||||
lineNumber: 113
|
||||
values: ["Normal", "Dense"]
|
||||
}
|
||||
Enum {
|
||||
name: "Color"
|
||||
lineNumber: 118
|
||||
values: [
|
||||
"Red",
|
||||
"Pink",
|
||||
"Purple",
|
||||
"DeepPurple",
|
||||
"Indigo",
|
||||
"Blue",
|
||||
"LightBlue",
|
||||
"Cyan",
|
||||
"Teal",
|
||||
"Green",
|
||||
"LightGreen",
|
||||
"Lime",
|
||||
"Yellow",
|
||||
"Amber",
|
||||
"Orange",
|
||||
"DeepOrange",
|
||||
"Brown",
|
||||
"Grey",
|
||||
"BlueGrey"
|
||||
]
|
||||
}
|
||||
Enum {
|
||||
name: "Shade"
|
||||
lineNumber: 140
|
||||
values: [
|
||||
"Shade50",
|
||||
"Shade100",
|
||||
"Shade200",
|
||||
"Shade300",
|
||||
"Shade400",
|
||||
"Shade500",
|
||||
"Shade600",
|
||||
"Shade700",
|
||||
"Shade800",
|
||||
"Shade900",
|
||||
"ShadeA100",
|
||||
"ShadeA200",
|
||||
"ShadeA400",
|
||||
"ShadeA700"
|
||||
]
|
||||
}
|
||||
Enum {
|
||||
name: "RoundedScale"
|
||||
isScoped: true
|
||||
lineNumber: 157
|
||||
values: [
|
||||
"NotRounded",
|
||||
"ExtraSmallScale",
|
||||
"SmallScale",
|
||||
"MediumScale",
|
||||
"LargeScale",
|
||||
"ExtraLargeScale",
|
||||
"FullScale"
|
||||
]
|
||||
}
|
||||
Enum {
|
||||
name: "ContainerStyle"
|
||||
isScoped: true
|
||||
lineNumber: 167
|
||||
values: ["Filled", "Outlined"]
|
||||
}
|
||||
Property {
|
||||
name: "theme"
|
||||
type: "Theme"
|
||||
read: "theme"
|
||||
write: "setTheme"
|
||||
reset: "resetTheme"
|
||||
notify: "themeChanged"
|
||||
index: 0
|
||||
lineNumber: 29
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "primary"
|
||||
type: "QVariant"
|
||||
read: "primary"
|
||||
write: "setPrimary"
|
||||
reset: "resetPrimary"
|
||||
notify: "primaryChanged"
|
||||
index: 1
|
||||
lineNumber: 30
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "accent"
|
||||
type: "QVariant"
|
||||
read: "accent"
|
||||
write: "setAccent"
|
||||
reset: "resetAccent"
|
||||
notify: "accentChanged"
|
||||
index: 2
|
||||
lineNumber: 31
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "foreground"
|
||||
type: "QVariant"
|
||||
read: "foreground"
|
||||
write: "setForeground"
|
||||
reset: "resetForeground"
|
||||
notify: "foregroundChanged"
|
||||
index: 3
|
||||
lineNumber: 32
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "background"
|
||||
type: "QVariant"
|
||||
read: "background"
|
||||
write: "setBackground"
|
||||
reset: "resetBackground"
|
||||
notify: "backgroundChanged"
|
||||
index: 4
|
||||
lineNumber: 33
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "elevation"
|
||||
type: "int"
|
||||
read: "elevation"
|
||||
write: "setElevation"
|
||||
reset: "resetElevation"
|
||||
notify: "elevationChanged"
|
||||
index: 5
|
||||
lineNumber: 34
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "roundedScale"
|
||||
type: "RoundedScale"
|
||||
read: "roundedScale"
|
||||
write: "setRoundedScale"
|
||||
reset: "resetRoundedScale"
|
||||
notify: "roundedScaleChanged"
|
||||
index: 6
|
||||
lineNumber: 35
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "containerStyle"
|
||||
type: "ContainerStyle"
|
||||
read: "containerStyle"
|
||||
write: "setContainerStyle"
|
||||
reset: "resetContainerStyle"
|
||||
notify: "containerStyleChanged"
|
||||
index: 7
|
||||
lineNumber: 37
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "primaryColor"
|
||||
type: "QColor"
|
||||
read: "primaryColor"
|
||||
notify: "primaryChanged"
|
||||
index: 8
|
||||
lineNumber: 40
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "accentColor"
|
||||
type: "QColor"
|
||||
read: "accentColor"
|
||||
notify: "accentChanged"
|
||||
index: 9
|
||||
lineNumber: 41
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "backgroundColor"
|
||||
type: "QColor"
|
||||
read: "backgroundColor"
|
||||
notify: "backgroundChanged"
|
||||
index: 10
|
||||
lineNumber: 42
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "primaryTextColor"
|
||||
type: "QColor"
|
||||
read: "primaryTextColor"
|
||||
notify: "themeChanged"
|
||||
index: 11
|
||||
lineNumber: 43
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "primaryHighlightedTextColor"
|
||||
type: "QColor"
|
||||
read: "primaryHighlightedTextColor"
|
||||
notify: "primaryHighlightedTextColorChanged"
|
||||
index: 12
|
||||
lineNumber: 44
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "secondaryTextColor"
|
||||
type: "QColor"
|
||||
read: "secondaryTextColor"
|
||||
notify: "themeChanged"
|
||||
index: 13
|
||||
lineNumber: 45
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "hintTextColor"
|
||||
type: "QColor"
|
||||
read: "hintTextColor"
|
||||
notify: "themeChanged"
|
||||
index: 14
|
||||
lineNumber: 46
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "textSelectionColor"
|
||||
type: "QColor"
|
||||
read: "textSelectionColor"
|
||||
notify: "themeOrAccentChanged"
|
||||
index: 15
|
||||
lineNumber: 47
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "dropShadowColor"
|
||||
type: "QColor"
|
||||
read: "dropShadowColor"
|
||||
index: 16
|
||||
lineNumber: 48
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "dividerColor"
|
||||
type: "QColor"
|
||||
read: "dividerColor"
|
||||
notify: "themeChanged"
|
||||
index: 17
|
||||
lineNumber: 49
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "iconColor"
|
||||
type: "QColor"
|
||||
read: "iconColor"
|
||||
notify: "themeChanged"
|
||||
index: 18
|
||||
lineNumber: 50
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "iconDisabledColor"
|
||||
type: "QColor"
|
||||
read: "iconDisabledColor"
|
||||
notify: "themeChanged"
|
||||
index: 19
|
||||
lineNumber: 51
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "frameColor"
|
||||
type: "QColor"
|
||||
read: "frameColor"
|
||||
notify: "themeChanged"
|
||||
index: 20
|
||||
lineNumber: 52
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "rippleColor"
|
||||
type: "QColor"
|
||||
read: "rippleColor"
|
||||
notify: "themeChanged"
|
||||
index: 21
|
||||
lineNumber: 53
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "highlightedRippleColor"
|
||||
type: "QColor"
|
||||
read: "highlightedRippleColor"
|
||||
notify: "themeOrAccentChanged"
|
||||
index: 22
|
||||
lineNumber: 54
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchUncheckedTrackColor"
|
||||
type: "QColor"
|
||||
read: "switchUncheckedTrackColor"
|
||||
notify: "themeChanged"
|
||||
index: 23
|
||||
lineNumber: 55
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchCheckedTrackColor"
|
||||
type: "QColor"
|
||||
read: "switchCheckedTrackColor"
|
||||
notify: "themeOrAccentChanged"
|
||||
index: 24
|
||||
lineNumber: 56
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchUncheckedHandleColor"
|
||||
type: "QColor"
|
||||
read: "switchUncheckedHandleColor"
|
||||
notify: "themeChanged"
|
||||
index: 25
|
||||
lineNumber: 57
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchUncheckedHoveredHandleColor"
|
||||
type: "QColor"
|
||||
read: "switchUncheckedHoveredHandleColor"
|
||||
notify: "themeChanged"
|
||||
index: 26
|
||||
lineNumber: 58
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDisabledUncheckedTrackColor"
|
||||
type: "QColor"
|
||||
read: "switchDisabledUncheckedTrackColor"
|
||||
notify: "themeChanged"
|
||||
index: 27
|
||||
lineNumber: 59
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDisabledCheckedTrackColor"
|
||||
type: "QColor"
|
||||
read: "switchDisabledCheckedTrackColor"
|
||||
notify: "themeChanged"
|
||||
index: 28
|
||||
lineNumber: 60
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDisabledUncheckedTrackBorderColor"
|
||||
type: "QColor"
|
||||
read: "switchDisabledUncheckedTrackBorderColor"
|
||||
notify: "themeChanged"
|
||||
index: 29
|
||||
lineNumber: 61
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchCheckedHandleColor"
|
||||
type: "QColor"
|
||||
read: "switchCheckedHandleColor"
|
||||
notify: "themeOrAccentChanged"
|
||||
index: 30
|
||||
lineNumber: 62
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDisabledUncheckedHandleColor"
|
||||
type: "QColor"
|
||||
read: "switchDisabledUncheckedHandleColor"
|
||||
notify: "themeChanged"
|
||||
index: 31
|
||||
lineNumber: 63
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDisabledCheckedHandleColor"
|
||||
type: "QColor"
|
||||
read: "switchDisabledCheckedHandleColor"
|
||||
notify: "themeChanged"
|
||||
index: 32
|
||||
lineNumber: 64
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDisabledCheckedIconColor"
|
||||
type: "QColor"
|
||||
read: "switchDisabledCheckedIconColor"
|
||||
notify: "themeChanged"
|
||||
index: 33
|
||||
lineNumber: 65
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDisabledUncheckedIconColor"
|
||||
type: "QColor"
|
||||
read: "switchDisabledUncheckedIconColor"
|
||||
notify: "themeChanged"
|
||||
index: 34
|
||||
lineNumber: 66
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "scrollBarColor"
|
||||
type: "QColor"
|
||||
read: "scrollBarColor"
|
||||
notify: "themeChanged"
|
||||
index: 35
|
||||
lineNumber: 67
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "scrollBarHoveredColor"
|
||||
type: "QColor"
|
||||
read: "scrollBarHoveredColor"
|
||||
notify: "themeChanged"
|
||||
index: 36
|
||||
lineNumber: 68
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "scrollBarPressedColor"
|
||||
type: "QColor"
|
||||
read: "scrollBarPressedColor"
|
||||
notify: "themeChanged"
|
||||
index: 37
|
||||
lineNumber: 69
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "dialogColor"
|
||||
type: "QColor"
|
||||
read: "dialogColor"
|
||||
notify: "dialogColorChanged"
|
||||
index: 38
|
||||
lineNumber: 70
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "backgroundDimColor"
|
||||
type: "QColor"
|
||||
read: "backgroundDimColor"
|
||||
notify: "themeChanged"
|
||||
index: 39
|
||||
lineNumber: 71
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "listHighlightColor"
|
||||
type: "QColor"
|
||||
read: "listHighlightColor"
|
||||
notify: "themeChanged"
|
||||
index: 40
|
||||
lineNumber: 72
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "tooltipColor"
|
||||
type: "QColor"
|
||||
read: "tooltipColor"
|
||||
notify: "tooltipColorChanged"
|
||||
index: 41
|
||||
lineNumber: 73
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "toolBarColor"
|
||||
type: "QColor"
|
||||
read: "toolBarColor"
|
||||
notify: "toolBarColorChanged"
|
||||
index: 42
|
||||
lineNumber: 74
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "toolTextColor"
|
||||
type: "QColor"
|
||||
read: "toolTextColor"
|
||||
notify: "toolTextColorChanged"
|
||||
index: 43
|
||||
lineNumber: 75
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "spinBoxDisabledIconColor"
|
||||
type: "QColor"
|
||||
read: "spinBoxDisabledIconColor"
|
||||
notify: "themeChanged"
|
||||
index: 44
|
||||
lineNumber: 76
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "sliderDisabledColor"
|
||||
revision: 527
|
||||
type: "QColor"
|
||||
read: "sliderDisabledColor"
|
||||
notify: "themeChanged"
|
||||
index: 45
|
||||
lineNumber: 77
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "textFieldFilledContainerColor"
|
||||
type: "QColor"
|
||||
read: "textFieldFilledContainerColor"
|
||||
notify: "themeChanged"
|
||||
index: 46
|
||||
lineNumber: 78
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
}
|
||||
Property {
|
||||
name: "touchTarget"
|
||||
type: "int"
|
||||
read: "touchTarget"
|
||||
index: 47
|
||||
lineNumber: 80
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "buttonVerticalPadding"
|
||||
type: "int"
|
||||
read: "buttonVerticalPadding"
|
||||
index: 48
|
||||
lineNumber: 81
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "buttonHeight"
|
||||
type: "int"
|
||||
read: "buttonHeight"
|
||||
index: 49
|
||||
lineNumber: 82
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "delegateHeight"
|
||||
type: "int"
|
||||
read: "delegateHeight"
|
||||
index: 50
|
||||
lineNumber: 83
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "dialogButtonBoxHeight"
|
||||
type: "int"
|
||||
read: "dialogButtonBoxHeight"
|
||||
index: 51
|
||||
lineNumber: 84
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "dialogTitleFontPixelSize"
|
||||
type: "int"
|
||||
read: "dialogTitleFontPixelSize"
|
||||
index: 52
|
||||
lineNumber: 85
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "dialogRoundedScale"
|
||||
type: "RoundedScale"
|
||||
read: "dialogRoundedScale"
|
||||
index: 53
|
||||
lineNumber: 86
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "frameVerticalPadding"
|
||||
type: "int"
|
||||
read: "frameVerticalPadding"
|
||||
index: 54
|
||||
lineNumber: 87
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "menuItemHeight"
|
||||
type: "int"
|
||||
read: "menuItemHeight"
|
||||
index: 55
|
||||
lineNumber: 88
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "menuItemVerticalPadding"
|
||||
type: "int"
|
||||
read: "menuItemVerticalPadding"
|
||||
index: 56
|
||||
lineNumber: 89
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "switchIndicatorWidth"
|
||||
type: "int"
|
||||
read: "switchIndicatorWidth"
|
||||
index: 57
|
||||
lineNumber: 90
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "switchIndicatorHeight"
|
||||
type: "int"
|
||||
read: "switchIndicatorHeight"
|
||||
index: 58
|
||||
lineNumber: 91
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "switchNormalHandleHeight"
|
||||
type: "int"
|
||||
read: "switchNormalHandleHeight"
|
||||
index: 59
|
||||
lineNumber: 92
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "switchCheckedHandleHeight"
|
||||
type: "int"
|
||||
read: "switchCheckedHandleHeight"
|
||||
index: 60
|
||||
lineNumber: 93
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "switchLargestHandleHeight"
|
||||
type: "int"
|
||||
read: "switchLargestHandleHeight"
|
||||
index: 61
|
||||
lineNumber: 94
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "switchDelegateVerticalPadding"
|
||||
type: "int"
|
||||
read: "switchDelegateVerticalPadding"
|
||||
index: 62
|
||||
lineNumber: 95
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "textFieldHeight"
|
||||
type: "int"
|
||||
read: "textFieldHeight"
|
||||
index: 63
|
||||
lineNumber: 96
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "textFieldHorizontalPadding"
|
||||
type: "int"
|
||||
read: "textFieldHorizontalPadding"
|
||||
index: 64
|
||||
lineNumber: 97
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "textFieldVerticalPadding"
|
||||
type: "int"
|
||||
read: "textFieldVerticalPadding"
|
||||
index: 65
|
||||
lineNumber: 98
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Property {
|
||||
name: "tooltipHeight"
|
||||
type: "int"
|
||||
read: "tooltipHeight"
|
||||
index: 66
|
||||
lineNumber: 99
|
||||
isReadonly: true
|
||||
isFinal: true
|
||||
isPropertyConstant: true
|
||||
}
|
||||
Signal { name: "themeChanged"; lineNumber: 304 }
|
||||
Signal { name: "primaryChanged"; lineNumber: 305 }
|
||||
Signal { name: "accentChanged"; lineNumber: 306 }
|
||||
Signal { name: "foregroundChanged"; lineNumber: 307 }
|
||||
Signal { name: "backgroundChanged"; lineNumber: 308 }
|
||||
Signal { name: "elevationChanged"; lineNumber: 309 }
|
||||
Signal { name: "themeOrAccentChanged"; lineNumber: 311 }
|
||||
Signal { name: "primaryHighlightedTextColorChanged"; lineNumber: 313 }
|
||||
Signal { name: "dialogColorChanged"; lineNumber: 314 }
|
||||
Signal { name: "tooltipColorChanged"; lineNumber: 315 }
|
||||
Signal { name: "toolBarColorChanged"; lineNumber: 316 }
|
||||
Signal { name: "toolTextColorChanged"; lineNumber: 317 }
|
||||
Signal { name: "roundedScaleChanged"; lineNumber: 318 }
|
||||
Signal { name: "containerStyleChanged"; lineNumber: 319 }
|
||||
Method {
|
||||
name: "buttonColor"
|
||||
type: "QColor"
|
||||
isMethodConstant: true
|
||||
lineNumber: 243
|
||||
Parameter { name: "theme"; type: "Theme" }
|
||||
Parameter { name: "background"; type: "QVariant" }
|
||||
Parameter { name: "accent"; type: "QVariant" }
|
||||
Parameter { name: "enabled"; type: "bool" }
|
||||
Parameter { name: "flat"; type: "bool" }
|
||||
Parameter { name: "highlighted"; type: "bool" }
|
||||
Parameter { name: "checked"; type: "bool" }
|
||||
}
|
||||
Method {
|
||||
name: "color"
|
||||
type: "QColor"
|
||||
isMethodConstant: true
|
||||
lineNumber: 273
|
||||
Parameter { name: "color"; type: "Color" }
|
||||
Parameter { name: "shade"; type: "Shade" }
|
||||
}
|
||||
Method {
|
||||
name: "color"
|
||||
type: "QColor"
|
||||
isCloned: true
|
||||
isMethodConstant: true
|
||||
lineNumber: 273
|
||||
Parameter { name: "color"; type: "Color" }
|
||||
}
|
||||
Method {
|
||||
name: "shade"
|
||||
type: "QColor"
|
||||
isMethodConstant: true
|
||||
lineNumber: 274
|
||||
Parameter { name: "color"; type: "QColor" }
|
||||
Parameter { name: "shade"; type: "Shade" }
|
||||
}
|
||||
Method {
|
||||
name: "buttonLeftPadding"
|
||||
type: "int"
|
||||
isMethodConstant: true
|
||||
lineNumber: 278
|
||||
Parameter { name: "flat"; type: "bool" }
|
||||
Parameter { name: "hasIcon"; type: "bool" }
|
||||
}
|
||||
Method {
|
||||
name: "buttonRightPadding"
|
||||
type: "int"
|
||||
isMethodConstant: true
|
||||
lineNumber: 279
|
||||
Parameter { name: "flat"; type: "bool" }
|
||||
Parameter { name: "hasIcon"; type: "bool" }
|
||||
Parameter { name: "hasText"; type: "bool" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
module QtQuick.Controls.Material
|
||||
linktarget Qt6::qtquickcontrols2materialstyleplugin
|
||||
plugin qtquickcontrols2materialstyleplugin
|
||||
classname QtQuickControls2MaterialStylePlugin
|
||||
typeinfo plugins.qmltypes
|
||||
import QtQuick.Controls.Basic auto
|
||||
depends QtQuick auto
|
||||
prefer :/qt-project.org/imports/QtQuick/Controls/Material/
|
||||
ApplicationWindow 6.0 ApplicationWindow.qml
|
||||
ApplicationWindow 2.0 ApplicationWindow.qml
|
||||
BusyIndicator 6.0 BusyIndicator.qml
|
||||
BusyIndicator 2.0 BusyIndicator.qml
|
||||
Button 6.0 Button.qml
|
||||
Button 2.0 Button.qml
|
||||
CheckBox 6.0 CheckBox.qml
|
||||
CheckBox 2.0 CheckBox.qml
|
||||
CheckDelegate 6.0 CheckDelegate.qml
|
||||
CheckDelegate 2.0 CheckDelegate.qml
|
||||
ComboBox 6.0 ComboBox.qml
|
||||
ComboBox 2.0 ComboBox.qml
|
||||
DelayButton 2.2 DelayButton.qml
|
||||
DelayButton 6.0 DelayButton.qml
|
||||
Dial 6.0 Dial.qml
|
||||
Dial 2.0 Dial.qml
|
||||
Dialog 2.1 Dialog.qml
|
||||
Dialog 6.0 Dialog.qml
|
||||
DialogButtonBox 2.1 DialogButtonBox.qml
|
||||
DialogButtonBox 6.0 DialogButtonBox.qml
|
||||
DoubleSpinBox 6.11 DoubleSpinBox.qml
|
||||
Drawer 6.0 Drawer.qml
|
||||
Drawer 2.0 Drawer.qml
|
||||
Frame 6.0 Frame.qml
|
||||
Frame 2.0 Frame.qml
|
||||
GroupBox 6.0 GroupBox.qml
|
||||
GroupBox 2.0 GroupBox.qml
|
||||
HorizontalHeaderView 2.15 HorizontalHeaderView.qml
|
||||
HorizontalHeaderView 6.0 HorizontalHeaderView.qml
|
||||
HorizontalHeaderViewDelegate 6.10 HorizontalHeaderViewDelegate.qml
|
||||
ItemDelegate 6.0 ItemDelegate.qml
|
||||
ItemDelegate 2.0 ItemDelegate.qml
|
||||
Label 6.0 Label.qml
|
||||
Label 2.0 Label.qml
|
||||
Menu 6.0 Menu.qml
|
||||
Menu 2.0 Menu.qml
|
||||
MenuBar 2.3 MenuBar.qml
|
||||
MenuBar 6.0 MenuBar.qml
|
||||
MenuBarItem 2.3 MenuBarItem.qml
|
||||
MenuBarItem 6.0 MenuBarItem.qml
|
||||
MenuItem 6.0 MenuItem.qml
|
||||
MenuItem 2.0 MenuItem.qml
|
||||
MenuSeparator 2.1 MenuSeparator.qml
|
||||
MenuSeparator 6.0 MenuSeparator.qml
|
||||
Page 6.0 Page.qml
|
||||
Page 2.0 Page.qml
|
||||
PageIndicator 6.0 PageIndicator.qml
|
||||
PageIndicator 2.0 PageIndicator.qml
|
||||
Pane 6.0 Pane.qml
|
||||
Pane 2.0 Pane.qml
|
||||
Popup 6.0 Popup.qml
|
||||
Popup 2.0 Popup.qml
|
||||
ProgressBar 6.0 ProgressBar.qml
|
||||
ProgressBar 2.0 ProgressBar.qml
|
||||
RadioButton 6.0 RadioButton.qml
|
||||
RadioButton 2.0 RadioButton.qml
|
||||
RadioDelegate 6.0 RadioDelegate.qml
|
||||
RadioDelegate 2.0 RadioDelegate.qml
|
||||
RangeSlider 6.0 RangeSlider.qml
|
||||
RangeSlider 2.0 RangeSlider.qml
|
||||
RoundButton 2.1 RoundButton.qml
|
||||
RoundButton 6.0 RoundButton.qml
|
||||
ScrollView 6.0 ScrollView.qml
|
||||
ScrollView 2.0 ScrollView.qml
|
||||
ScrollBar 6.0 ScrollBar.qml
|
||||
ScrollBar 2.0 ScrollBar.qml
|
||||
ScrollIndicator 6.0 ScrollIndicator.qml
|
||||
ScrollIndicator 2.0 ScrollIndicator.qml
|
||||
SearchField 6.10 SearchField.qml
|
||||
SelectionRectangle 6.0 SelectionRectangle.qml
|
||||
SelectionRectangle 2.0 SelectionRectangle.qml
|
||||
Slider 6.0 Slider.qml
|
||||
Slider 2.0 Slider.qml
|
||||
SpinBox 6.0 SpinBox.qml
|
||||
SpinBox 2.0 SpinBox.qml
|
||||
SplitView 2.13 SplitView.qml
|
||||
SplitView 6.0 SplitView.qml
|
||||
StackView 6.0 StackView.qml
|
||||
StackView 2.0 StackView.qml
|
||||
SwipeDelegate 6.0 SwipeDelegate.qml
|
||||
SwipeDelegate 2.0 SwipeDelegate.qml
|
||||
SwipeView 6.0 SwipeView.qml
|
||||
SwipeView 2.0 SwipeView.qml
|
||||
Switch 6.0 Switch.qml
|
||||
Switch 2.0 Switch.qml
|
||||
SwitchDelegate 6.0 SwitchDelegate.qml
|
||||
SwitchDelegate 2.0 SwitchDelegate.qml
|
||||
TabBar 6.0 TabBar.qml
|
||||
TabBar 2.0 TabBar.qml
|
||||
TabButton 6.0 TabButton.qml
|
||||
TabButton 2.0 TabButton.qml
|
||||
TextArea 6.0 TextArea.qml
|
||||
TextArea 2.0 TextArea.qml
|
||||
TextField 6.0 TextField.qml
|
||||
TextField 2.0 TextField.qml
|
||||
ToolBar 6.0 ToolBar.qml
|
||||
ToolBar 2.0 ToolBar.qml
|
||||
ToolButton 6.0 ToolButton.qml
|
||||
ToolButton 2.0 ToolButton.qml
|
||||
ToolSeparator 2.1 ToolSeparator.qml
|
||||
ToolSeparator 6.0 ToolSeparator.qml
|
||||
ToolTip 6.0 ToolTip.qml
|
||||
ToolTip 2.0 ToolTip.qml
|
||||
TreeViewDelegate 6.0 TreeViewDelegate.qml
|
||||
TreeViewDelegate 2.0 TreeViewDelegate.qml
|
||||
Tumbler 6.0 Tumbler.qml
|
||||
Tumbler 2.0 Tumbler.qml
|
||||
VerticalHeaderView 2.15 VerticalHeaderView.qml
|
||||
VerticalHeaderView 6.0 VerticalHeaderView.qml
|
||||
VerticalHeaderViewDelegate 6.10 VerticalHeaderViewDelegate.qml
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user