Initial commit

This commit is contained in:
2026-04-29 07:19:21 +03:00
commit 9a8cdfa08a
5964 changed files with 1194660 additions and 0 deletions
@@ -0,0 +1,22 @@
// 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.Universal
import QtQuick.Controls.Universal.impl
T.ApplicationWindow {
id: window
color: Universal.background
FocusRectangle {
parent: window.activeFocusControl
width: parent ? parent.width : 0
height: parent ? parent.height : 0
visible: parent && !!parent.useSystemFocusVisuals && !!parent.visualFocus
}
}
@@ -0,0 +1,28 @@
// 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.Universal
import QtQuick.Controls.Universal.impl
T.BusyIndicator {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
contentItem: BusyIndicatorImpl {
implicitWidth: 20
implicitHeight: 20
readonly property real size: Math.min(control.availableWidth, control.availableHeight)
count: size < 60 ? 5 : 6 // "Small" vs. "Large"
color: control.Universal.accent
visible: control.running
}
}
@@ -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.impl
import QtQuick.Controls.Universal
T.Button {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 8
verticalPadding: padding - 4
spacing: 8
icon.width: 20
icon.height: 20
property bool useSystemFocusVisuals: true
contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
defaultIconColor: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
implicitWidth: 32
implicitHeight: 32
visible: !control.flat || control.down || control.checked || control.highlighted
color: control.down ? control.Universal.baseMediumLowColor :
control.enabled && (control.highlighted || control.checked) ? control.Universal.accent :
control.Universal.baseLowColor
Rectangle {
width: parent.width
height: parent.height
color: "transparent"
visible: enabled && control.hovered
border.width: 2 // ButtonBorderThemeThickness
border.color: control.Universal.baseMediumLowColor
}
}
}
@@ -0,0 +1,42 @@
// 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.Universal
import QtQuick.Controls.Universal.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)
padding: 6
spacing: 8
property bool useSystemFocusVisuals: true
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
}
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
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
opacity: enabled ? 1.0 : 0.2
color: control.Universal.foreground
}
}
@@ -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.impl
import QtQuick.Controls.Universal
import QtQuick.Controls.Universal.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)
spacing: 12
padding: 12
topPadding: padding - 1
bottomPadding: padding + 1
icon.width: 20
icon.height: 20
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: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
visible: enabled && (control.down || control.highlighted || control.visualFocus || control.hovered)
color: control.down ? control.Universal.listMediumColor :
control.hovered ? control.Universal.listLowColor : control.Universal.altMediumLowColor
Rectangle {
width: parent.width
height: parent.height
visible: control.visualFocus || control.highlighted
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
}
@@ -0,0 +1,135 @@
// 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.Universal
import QtQuick.Controls.Universal.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)
Universal.theme: editable && activeFocus ? Universal.Light : undefined
delegate: ItemDelegate {
required property var model
required property int index
width: ListView.view.width
text: model[control.textRole]
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
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.Universal.baseLowColor : control.Universal.baseMediumHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/downarrow.png"
Rectangle {
z: -1
width: parent.width
height: parent.height
color: control.activeFocus ? control.Universal.accent :
control.pressed ? control.Universal.baseMediumLowColor :
control.hovered ? control.Universal.baseLowColor : "transparent"
visible: control.editable && !control.contentItem.hovered && (control.pressed || control.hovered)
opacity: control.activeFocus && !control.pressed ? 0.4 : 1.0
}
}
contentItem: T.TextField {
leftPadding: control.mirrored ? 1 : 12
rightPadding: control.mirrored ? 10 : 1
topPadding: 5 - control.topPadding
bottomPadding: 7 - control.bottomPadding
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.Universal.chromeDisabledLowColor :
control.editable && control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.foreground
selectionColor: control.Universal.accent
selectedTextColor: control.Universal.chromeWhiteColor
verticalAlignment: Text.AlignVCenter
ContextMenu.menu: TextEditingContextMenu {
editor: parent
}
}
background: Rectangle {
implicitWidth: 120
implicitHeight: 32
border.width: control.flat ? 0 : 2 // ComboBoxBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.editable && control.activeFocus ? control.Universal.accent :
control.down ? control.Universal.baseMediumLowColor :
control.hovered ? control.Universal.baseMediumColor : control.Universal.baseMediumLowColor
color: !control.enabled ? control.Universal.baseLowColor :
control.down ? control.Universal.listMediumColor :
control.flat && control.hovered ? control.Universal.listLowColor :
control.editable && control.activeFocus ? control.Universal.background : control.Universal.altMediumLowColor
visible: !control.flat || control.pressed || control.hovered || control.visualFocus
Rectangle {
x: 2
y: 2
width: parent.width - 4
height: parent.height - 4
visible: control.visualFocus && !control.editable
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
popup: T.Popup {
width: control.width
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
topMargin: 8
bottomMargin: 8
Universal.theme: control.Universal.theme
Universal.accent: control.Universal.accent
contentItem: ListView {
clip: true
implicitHeight: contentHeight
model: control.delegateModel
currentIndex: control.highlightedIndex
highlightMoveDuration: 0
T.ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle {
color: control.Universal.chromeMediumLowColor
border.color: control.Universal.chromeHighColor
border.width: 1 // FlyoutBorderThemeThickness
}
}
}
@@ -0,0 +1,62 @@
// 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.Universal
T.DelayButton {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 8
verticalPadding: padding - 4
property bool useSystemFocusVisuals: true
transition: Transition {
NumberAnimation {
duration: control.delay * (control.pressed ? 1.0 - control.progress : 0.3 * control.progress)
}
}
contentItem: Text {
text: control.text
font: control.font
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
opacity: enabled ? 1.0 : 0.2
color: control.Universal.foreground
}
background: Rectangle {
implicitWidth: 32
implicitHeight: 32
color: control.down ? control.Universal.baseMediumLowColor :
control.enabled && control.checked ? control.Universal.accent : control.Universal.baseLowColor
Rectangle {
visible: !control.checked
width: parent.width * control.progress
height: parent.height
color: control.Universal.accent
}
Rectangle {
width: parent.width
height: parent.height
color: "transparent"
visible: enabled && control.hovered
border.width: 2 // ButtonBorderThemeThickness
border.color: control.Universal.baseMediumLowColor
}
}
}
@@ -0,0 +1,55 @@
// 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.Universal
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
radius: width / 2
color: "transparent"
border.color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumColor
border.width: 2
}
handle: Rectangle {
implicitWidth: 14
implicitHeight: 14
x: control.background.x + control.background.width / 2 - width / 2
y: control.background.y + control.background.height / 2 - height / 2
radius: width / 2
color: !control.enabled ? control.Universal.baseLowColor :
control.pressed ? control.Universal.baseMediumColor :
control.hovered ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor
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
}
]
}
}
@@ -0,0 +1,58 @@
// 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.Universal
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))
padding: 24
verticalPadding: 18
background: Rectangle {
color: control.Universal.chromeMediumLowColor
border.color: control.Universal.chromeHighColor
border.width: 1 // FlyoutBorderThemeThickness
}
header: Label {
text: control.title
visible: parent?.parent === Overlay.overlay && control.title
elide: Label.ElideRight
topPadding: 18
leftPadding: 24
rightPadding: 24
// TODO: QPlatformTheme::TitleBarFont
font.pixelSize: 20
background: Rectangle {
x: 1; y: 1 // // FlyoutBorderThemeThickness
color: control.Universal.chromeMediumLowColor
width: parent.width - 2
height: parent.height - 1
}
}
footer: DialogButtonBox {
visible: count > 0
}
T.Overlay.modal: Rectangle {
color: control.Universal.baseLowColor
}
T.Overlay.modeless: Rectangle {
color: control.Universal.baseLowColor
}
}
@@ -0,0 +1,44 @@
// 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.Templates as T
import QtQuick.Controls.Universal
T.DialogButtonBox {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
(control.count === 1 ? implicitContentWidth * 2 : implicitContentWidth) + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
contentWidth: (contentItem as ListView)?.contentWidth
spacing: 4
padding: 24
topPadding: position === T.DialogButtonBox.Footer ? 6 : 24
bottomPadding: position === T.DialogButtonBox.Header ? 6 : 24
alignment: count === 1 ? Qt.AlignRight : undefined
delegate: Button {
width: control.count === 1 ? control.availableWidth / 2 : undefined
}
contentItem: ListView {
implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
boundsBehavior: Flickable.StopAtBounds
snapMode: ListView.SnapToItem
}
background: Rectangle {
implicitHeight: 32
color: control.Universal.chromeMediumLowColor
x: 1; y: 1
width: parent.width - 2
height: parent.height - 2
}
}
@@ -0,0 +1,121 @@
// 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.impl
import QtQuick.Controls.Universal
import QtQuick.Controls.Universal.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)
// TextControlThemePadding + 2 (border)
padding: 12
topPadding: padding - 7
leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
bottomPadding: padding - 5
Universal.theme: activeFocus ? Universal.Light : undefined
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.Universal.chromeDisabledLowColor :
activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.foreground
selectionColor: control.Universal.accent
selectedTextColor: control.Universal.chromeWhiteColor
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: TextInput.AlignVCenter
readOnly: !control.editable
validator: control.validator
inputMethodHints: control.inputMethodHints
clip: width < implicitWidth
ContextMenu.menu: TextEditingContextMenu {
editor: parent
}
}
up.indicator: Item {
implicitWidth: 28
height: control.height + 4
y: -2
x: control.mirrored ? 0 : control.width - width
Rectangle {
x: 2; y: 4
width: parent.width - 4
height: parent.height - 8
color: control.activeFocus ? control.Universal.accent :
control.up.pressed ? control.Universal.baseMediumLowColor :
control.up.hovered ? control.Universal.baseLowColor : "transparent"
visible: control.up.pressed || control.up.hovered
opacity: control.activeFocus && !control.up.pressed ? 0.4 : 1.0
}
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/" + (control.mirrored ? "left" : "right") + "arrow.png"
}
}
down.indicator: Item {
implicitWidth: 28
height: control.height + 4
y: -2
x: control.mirrored ? control.width - width : 0
Rectangle {
x: 2; y: 4
width: parent.width - 4
height: parent.height - 8
color: control.activeFocus ? control.Universal.accent :
control.down.pressed ? control.Universal.baseMediumLowColor :
control.down.hovered ? control.Universal.baseLowColor : "transparent"
visible: control.down.pressed || control.down.hovered
opacity: control.activeFocus && !control.down.pressed ? 0.4 : 1.0
}
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/" + (control.mirrored ? "right" : "left") + "arrow.png"
}
}
background: Rectangle {
implicitWidth: 60 + 28 // TextControlThemeMinWidth - 4 (border)
implicitHeight: 28 // TextControlThemeMinHeight - 4 (border)
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent :
control.hovered ? control.Universal.baseMediumColor : control.Universal.chromeDisabledLowColor
color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
}
@@ -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.Templates as T
import QtQuick.Controls.Universal
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 + (control.edge === Qt.BottomEdge)
leftPadding: SafeArea.margins.left + (control.edge === Qt.RightEdge)
rightPadding: SafeArea.margins.right + (control.edge === Qt.LeftEdge)
bottomPadding: SafeArea.margins.bottom + (control.edge === Qt.TopEdge)
enter: Transition { SmoothedAnimation { velocity: 5 } }
exit: Transition { SmoothedAnimation { velocity: 5 } }
background: Rectangle {
color: control.Universal.chromeMediumLowColor
Rectangle {
readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
width: horizontal ? 1 : parent.width
height: horizontal ? parent.height : 1
color: control.Universal.chromeHighColor
x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0
y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
}
}
T.Overlay.modal: Rectangle {
color: control.Universal.baseLowColor
}
T.Overlay.modeless: Rectangle {
color: control.Universal.baseLowColor
}
}
@@ -0,0 +1,23 @@
// 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.Universal
T.Frame {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 12
background: Rectangle {
color: "transparent"
border.color: control.Universal.chromeDisabledLowColor
}
}
@@ -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.Universal
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: 12
padding: 12
topPadding: padding + (implicitLabelWidth > 0 ? implicitLabelHeight + spacing : 0)
label: Text {
x: control.leftPadding
width: control.availableWidth
text: control.title
font: control.font
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
opacity: enabled ? 1.0 : 0.2
color: control.Universal.foreground
}
background: Rectangle {
y: control.topPadding - control.bottomPadding
width: parent.width
height: parent.height - control.topPadding + control.bottomPadding
color: "transparent"
border.color: control.Universal.chromeDisabledLowColor
}
}
@@ -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.Universal
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 { }
}
@@ -0,0 +1,34 @@
// 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 as ControlsImpl
import QtQuick.Controls.Universal
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.Universal.background
}
contentItem: Label {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: ControlsImpl.Color.transparent(control.Universal.foreground,
enabled ? 1.0 : 0.2)
text: control.model[control.headerView.textRole]
}
}
@@ -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.Universal
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)
spacing: 12
padding: 12
topPadding: padding - 1
bottomPadding: padding + 1
icon.width: 20
icon.height: 20
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: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
visible: enabled && (control.down || control.highlighted || control.visualFocus || control.hovered)
color: control.down ? control.Universal.listMediumColor :
control.hovered ? control.Universal.listLowColor : control.Universal.altMediumLowColor
Rectangle {
width: parent.width
height: parent.height
visible: control.visualFocus || control.highlighted
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
}
@@ -0,0 +1,15 @@
// 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.Universal
T.Label {
id: control
opacity: enabled ? 1.0 : 0.2
color: control.Universal.foreground
linkColor: Universal.accent
}
@@ -0,0 +1,50 @@
// 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.Universal
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
overlap: 1
delegate: MenuItem { }
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: 40
color: control.Universal.chromeMediumLowColor
border.color: control.Universal.chromeHighColor
border.width: 1 // FlyoutBorderThemeThickness
}
T.Overlay.modal: Rectangle {
color: control.Universal.baseLowColor
}
T.Overlay.modeless: Rectangle {
color: control.Universal.baseLowColor
}
}
@@ -0,0 +1,36 @@
// 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.Universal
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.Universal.chromeMediumColor
}
}
@@ -0,0 +1,58 @@
// 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.Universal
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: 12
topPadding: padding - 1
bottomPadding: padding + 1
spacing: 12
icon.width: 20
icon.height: 20
icon.color: !enabled ? Universal.baseLowColor : Universal.baseHighColor
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.Universal.baseLowColor : control.Universal.baseHighColor
}
background: Rectangle {
implicitWidth: 40
implicitHeight: 40
color: !control.enabled ? control.Universal.baseLowColor :
control.down ? control.Universal.listMediumColor :
control.highlighted ? control.Universal.listLowColor : "transparent"
Rectangle {
x: 1; y: 1
width: parent.width - 2
height: parent.height - 2
visible: control.visualFocus
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
}
@@ -0,0 +1,82 @@
// 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.Universal
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: 12
topPadding: padding - 1
bottomPadding: padding + 1
spacing: 12
icon.width: 20
icon.height: 20
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.Universal.baseLowColor : control.Universal.baseHighColor
text: control.text
font: control.font
color: defaultIconColor
}
arrow: ColorImage {
x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
visible: control.subMenu
mirror: control.mirrored
color: !enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/rightarrow.png"
}
indicator: ColorImage {
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.checked
color: !control.enabled ? control.Universal.baseLowColor : control.down ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor
source: !control.checkable ? "" : "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/checkmark.png"
}
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
color: !control.enabled ? control.Universal.baseLowColor :
control.down ? control.Universal.listMediumColor :
control.highlighted ? control.Universal.listLowColor : control.Universal.altMediumLowColor
Rectangle {
x: 1; y: 1
width: parent.width - 2
height: parent.height - 2
visible: control.visualFocus
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
}
@@ -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.Universal
T.MenuSeparator {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 12
topPadding: 9
bottomPadding: 10
contentItem: Rectangle {
implicitWidth: 188
implicitHeight: 1
color: control.Universal.baseMediumLowColor
}
background: Rectangle {
color: control.Universal.altMediumLowColor
}
}
@@ -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.Universal
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.Universal.background
}
}
@@ -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.Universal
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: 7
delegate: Rectangle {
implicitWidth: 5
implicitHeight: 5
radius: width / 2
color: index === control.currentIndex ? control.Universal.baseMediumHighColor :
pressed ? control.Universal.baseMediumLowColor : control.Universal.baseLowColor
required property int index
}
contentItem: Row {
spacing: control.spacing
Repeater {
model: control.count
delegate: control.delegate
}
}
}
@@ -0,0 +1,22 @@
// 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.Universal
T.Pane {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 12
background: Rectangle {
color: control.Universal.background
}
}
@@ -0,0 +1,32 @@
// 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.Universal
T.Popup {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 12
background: Rectangle {
color: control.Universal.chromeMediumLowColor
border.color: control.Universal.chromeHighColor
border.width: 1 // FlyoutBorderThemeThickness
}
T.Overlay.modal: Rectangle {
color: control.Universal.baseLowColor
}
T.Overlay.modeless: Rectangle {
color: control.Universal.baseLowColor
}
}
@@ -0,0 +1,36 @@
// 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.Universal
import QtQuick.Controls.Universal.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: 10
scale: control.mirrored ? -1 : 1
color: control.Universal.accent
progress: control.position
indeterminate: control.visible && control.indeterminate
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 10
y: (control.height - height) / 2
height: 10
visible: !control.indeterminate
color: control.Universal.baseLowColor
}
}
@@ -0,0 +1,42 @@
// 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.Universal
import QtQuick.Controls.Universal.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)
padding: 6
spacing: 8
property bool useSystemFocusVisuals: true
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
}
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
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
opacity: enabled ? 1.0 : 0.2
color: control.Universal.foreground
}
}
@@ -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.impl
import QtQuick.Controls.Universal
import QtQuick.Controls.Universal.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)
spacing: 12
padding: 12
topPadding: padding - 1
bottomPadding: padding + 1
icon.width: 20
icon.height: 20
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: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
visible: enabled && (control.down || control.highlighted || control.visualFocus || control.hovered)
color: control.down ? control.Universal.listMediumColor :
control.hovered ? control.Universal.listLowColor : control.Universal.altMediumLowColor
Rectangle {
width: parent.width
height: parent.height
visible: control.visualFocus || control.highlighted
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
}
@@ -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.Universal
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
first.handle: Rectangle {
implicitWidth: control.horizontal ? 8 : 24
implicitHeight: control.horizontal ? 24 : 8
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))
radius: 4
color: control.first.pressed ? control.Universal.chromeHighColor :
control.first.hovered ? control.Universal.chromeAltLowColor :
control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
second.handle: Rectangle {
implicitWidth: control.horizontal ? 8 : 24
implicitHeight: control.horizontal ? 24 : 8
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))
radius: 4
color: control.second.pressed ? control.Universal.chromeHighColor :
control.second.hovered ? control.Universal.chromeAltLowColor :
control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
background: Item {
implicitWidth: control.horizontal ? 200 : 18
implicitHeight: control.horizontal ? 18 : 200
x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
width: control.horizontal ? control.availableWidth : implicitWidth
height: control.horizontal ? implicitHeight : control.availableHeight
scale: control.horizontal && control.mirrored ? -1 : 1
Rectangle {
x: control.horizontal ? 0 : (parent.width - width) / 2
y: control.horizontal ? (parent.height - height) / 2 : 0
width: control.horizontal ? parent.width : 2 // SliderBackgroundThemeHeight
height: control.vertical ? parent.height : 2 // SliderBackgroundThemeHeight
color: enabled && control.hovered && !control.pressed ? control.Universal.baseMediumColor :
control.enabled ? control.Universal.baseMediumLowColor : control.Universal.chromeDisabledHighColor
}
Rectangle {
x: control.horizontal ? control.first.position * parent.width : (parent.width - width) / 2
y: control.horizontal ? (parent.height - height) / 2 : control.second.visualPosition * parent.height
width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width : 2 // SliderBackgroundThemeHeight
height: control.vertical ? control.second.position * parent.height - control.first.position * parent.height : 2 // SliderBackgroundThemeHeight
color: control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
}
}
@@ -0,0 +1,58 @@
// 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.Universal
T.RoundButton {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 8
spacing: 8
icon.width: 20
icon.height: 20
property bool useSystemFocusVisuals: true
contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
defaultIconColor: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
implicitWidth: 32
implicitHeight: 32
radius: control.radius
visible: !control.flat || control.down || control.checked || control.highlighted
color: control.down ? control.Universal.baseMediumLowColor :
control.enabled && (control.highlighted || control.checked) ? control.Universal.accent :
control.Universal.baseLowColor
Rectangle {
width: parent.width
height: parent.height
radius: control.radius
color: "transparent"
visible: enabled && control.hovered
border.width: 2 // ButtonBorderThemeThickness
border.color: control.Universal.baseMediumLowColor
}
}
}
@@ -0,0 +1,62 @@
// 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.Universal
T.ScrollBar {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
visible: control.policy !== T.ScrollBar.AlwaysOff
minimumSize: orientation === Qt.Horizontal ? height / width : width / height
// TODO: arrows
contentItem: Rectangle {
implicitWidth: control.interactive ? 12 : 6
implicitHeight: control.interactive ? 12: 6
color: control.pressed ? control.Universal.baseMediumColor :
enabled && control.interactive && control.hovered ? control.Universal.baseMediumLowColor :
control.Universal.chromeHighColor
opacity: 0.0
}
background: Rectangle {
implicitWidth: control.interactive ? 12 : 6
implicitHeight: control.interactive ? 12: 6
color: control.Universal.chromeLowColor
visible: control.size < 1.0
opacity: 0.0
}
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: 3000 }
NumberAnimation { targets: [control.contentItem, control.background]; property: "opacity"; to: 0.0 }
}
}
]
}
@@ -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.Templates as T
import QtQuick.Controls.Universal
T.ScrollIndicator {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
contentItem: Rectangle {
implicitWidth: 6
implicitHeight: 6
color: control.Universal.baseMediumLowColor
visible: control.size < 1.0
opacity: 0.0
states: [
State {
name: "active"
when: control.active
}
]
transitions: [
Transition {
to: "active"
NumberAnimation { target: control.contentItem; property: "opacity"; to: 1.0 }
},
Transition {
from: "active"
SequentialAnimation {
PauseAnimation { duration: 5000 }
NumberAnimation { target: control.contentItem; 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,153 @@
// 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.impl
import QtQuick.Controls.Universal
import QtQuick.Controls.Universal.impl
T.SearchField {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
+ searchIndicator.implicitIndicatorWidth + clearIndicator.implicitIndicatorWidth
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
searchIndicator.implicitIndicatorHeight + topPadding + bottomPadding)
leftPadding: padding + (control.mirrored ? __clearIndicatorWidth : __searchIndicatorWidth)
rightPadding: padding + (control.mirrored ? __searchIndicatorWidth : __clearIndicatorWidth)
readonly property real __clearIndicatorWidth: !clearIndicator.indicator || !clearIndicator.indicator.visible
? 0 : clearIndicator.indicator.width + spacing
readonly property real __searchIndicatorWidth: !searchIndicator.indicator || !searchIndicator.indicator.visible
? 0 : searchIndicator.indicator.width + spacing
Universal.theme: activeFocus ? Universal.Light : undefined
delegate: ItemDelegate {
width: ListView.view.width
text: model[control.textRole]
palette.text: control.palette.text
palette.highlightedText: control.palette.highlightedText
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
highlighted: control.highlightedIndex === index
hoverEnabled: control.hoverEnabled
required property var model
required property int index
}
searchIndicator.indicator: Item {
x: !control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
implicitWidth: 28
implicitHeight: 28
Rectangle {
width: parent.width
height: parent.height
color: control.activeFocus ? control.Universal.accent :
control.searchIndicator.pressed ? control.Universal.baseMediumLowColor :
control.searchIndicator.hovered ? control.Universal.baseLowColor : "transparent"
visible: control.searchIndicator.pressed || control.searchIndicator.hovered
opacity: control.activeFocus && !control.searchIndicator.pressed ? 0.4 : 1.0
}
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: 20
height: 20
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/search-magnifier.png"
}
}
clearIndicator.indicator: Item {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
implicitWidth: 28
implicitHeight: 28
visible: control.text.length > 0
Rectangle {
width: parent.width
height: parent.height
color: control.activeFocus ? control.Universal.accent :
control.clearIndicator.pressed ? control.Universal.baseMediumLowColor :
control.clearIndicator.hovered ? control.Universal.baseLowColor : "transparent"
visible: control.clearIndicator.pressed || control.clearIndicator.hovered
opacity: control.activeFocus && !control.clearIndicator.pressed ? 0.4 : 1.0
}
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: 20
height: 20
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/close_big.png"
}
}
contentItem: T.TextField {
leftPadding: !control.mirrored ? 6 : 0
rightPadding: !control.mirrored ? 6 : 0
text: control.text
color: !control.enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.foreground
selectionColor: control.Universal.accent
selectedTextColor: control.Universal.chromeWhiteColor
verticalAlignment: TextInput.AlignVCenter
ContextMenu.menu: TextEditingContextMenu {
editor: parent
}
}
background: Rectangle {
implicitWidth: 120
implicitHeight: 32
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent :
control.hovered ? control.Universal.baseMediumColor : control.Universal.chromeDisabledLowColor
color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
popup: T.Popup {
y: control.height
width: control.width
height: Math.min(contentItem.implicitHeight, control.Window.height - control.y - control.height - control.padding)
topMargin: 6
bottomMargin: 6
Universal.theme: control.Universal.theme
Universal.accent: control.Universal.accent
contentItem: ListView {
clip: true
implicitHeight: contentHeight
model: control.delegateModel
currentIndex: control.highlightedIndex
highlightMoveDuration: 0
T.ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle {
color: control.Universal.chromeMediumLowColor
border.color: control.Universal.chromeHighColor
border.width: 1
}
}
}
@@ -0,0 +1,38 @@
// 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.Universal
T.SelectionRectangle {
id: control
topLeftHandle: handle
bottomRightHandle: handle
Component {
id: handle
Rectangle {
implicitWidth: 8
implicitHeight: 24
radius: 4
color: tapHandler.pressed || SelectionRectangle.dragging ? control.Universal.chromeHighColor :
hoverHandler.hovered ? control.Universal.chromeAltLowColor :
control.Universal.accent
visible: control.active
property Item control: SelectionRectangle.control
HoverHandler {
id: hoverHandler
}
TapHandler {
id: tapHandler
}
}
}
}
@@ -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.Universal
T.Slider {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitHandleWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitHandleHeight + topPadding + bottomPadding)
padding: 6
property bool useSystemFocusVisuals: true
handle: Rectangle {
implicitWidth: control.horizontal ? 8 : 24
implicitHeight: control.horizontal ? 24 : 8
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))
radius: 4
color: control.pressed ? control.Universal.chromeHighColor :
control.enabled ? control.hovered ? control.Universal.chromeAltLowColor :
control.Universal.accent : control.Universal.chromeDisabledHighColor
}
background: Item {
implicitWidth: control.horizontal ? 200 : 18
implicitHeight: control.horizontal ? 18 : 200
x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
width: control.horizontal ? control.availableWidth : implicitWidth
height: control.horizontal ? implicitHeight : control.availableHeight
scale: control.horizontal && control.mirrored ? -1 : 1
Rectangle {
x: control.horizontal ? 0 : (parent.width - width) / 2
y: control.horizontal ? (parent.height - height) / 2 : 0
width: control.horizontal ? parent.width : 2 // SliderTrackThemeHeight
height: !control.horizontal ? parent.height : 2 // SliderTrackThemeHeight
color: enabled && control.hovered && !control.pressed ? control.Universal.baseMediumColor :
control.enabled ? control.Universal.baseMediumLowColor : control.Universal.chromeDisabledHighColor
}
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 : 2 // SliderTrackThemeHeight
height: !control.horizontal ? control.position * parent.height : 2 // SliderTrackThemeHeight
color: control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
}
}
@@ -0,0 +1,120 @@
// 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.Universal
import QtQuick.Controls.Universal.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)
// TextControlThemePadding + 2 (border)
padding: 12
topPadding: padding - 7
leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
bottomPadding: padding - 5
Universal.theme: activeFocus ? Universal.Light : undefined
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.Universal.chromeDisabledLowColor :
activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.foreground
selectionColor: control.Universal.accent
selectedTextColor: control.Universal.chromeWhiteColor
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: TextInput.AlignVCenter
readOnly: !control.editable
validator: control.validator
inputMethodHints: control.inputMethodHints
clip: width < implicitWidth
ContextMenu.menu: TextEditingContextMenu {
editor: parent
}
}
up.indicator: Item {
implicitWidth: 28
height: control.height + 4
y: -2
x: control.mirrored ? 0 : control.width - width
Rectangle {
x: 2; y: 4
width: parent.width - 4
height: parent.height - 8
color: control.activeFocus ? control.Universal.accent :
control.up.pressed ? control.Universal.baseMediumLowColor :
control.up.hovered ? control.Universal.baseLowColor : "transparent"
visible: control.up.pressed || control.up.hovered
opacity: control.activeFocus && !control.up.pressed ? 0.4 : 1.0
}
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/" + (control.mirrored ? "left" : "right") + "arrow.png"
}
}
down.indicator: Item {
implicitWidth: 28
height: control.height + 4
y: -2
x: control.mirrored ? control.width - width : 0
Rectangle {
x: 2; y: 4
width: parent.width - 4
height: parent.height - 8
color: control.activeFocus ? control.Universal.accent :
control.down.pressed ? control.Universal.baseMediumLowColor :
control.down.hovered ? control.Universal.baseLowColor : "transparent"
visible: control.down.pressed || control.down.hovered
opacity: control.activeFocus && !control.down.pressed ? 0.4 : 1.0
}
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/" + (control.mirrored ? "right" : "left") + "arrow.png"
}
}
background: Rectangle {
implicitWidth: 60 + 28 // TextControlThemeMinWidth - 4 (border)
implicitHeight: 28 // TextControlThemeMinHeight - 4 (border)
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent :
control.hovered ? control.Universal.baseMediumColor : control.Universal.chromeDisabledLowColor
color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
}
@@ -0,0 +1,23 @@
// 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.Universal
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.Universal.baseMediumColor
: (enabled && T.SplitHandle.hovered ? control.Universal.baseMediumLowColor : control.Universal.chromeHighColor)
}
}
@@ -0,0 +1,44 @@
// 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.Universal
T.StackView {
id: control
popEnter: Transition {
ParallelAnimation {
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint }
NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
}
popExit: Transition {
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.OutQuint }
}
pushEnter: Transition {
ParallelAnimation {
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint }
NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
}
pushExit: Transition {
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.OutQuint }
}
replaceEnter: Transition {
ParallelAnimation {
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint }
NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
}
replaceExit: Transition {
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.OutQuint }
}
}
@@ -0,0 +1,60 @@
// 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.Universal
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)
spacing: 12
padding: 12
topPadding: padding - 1
bottomPadding: padding + 1
icon.width: 20
icon.height: 20
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: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
color: control.Universal.background
Rectangle {
width: parent.width
height: parent.height
color: control.down ? control.Universal.listMediumColor :
enabled && control.hovered ? control.Universal.listLowColor : control.Universal.altMediumLowColor
Rectangle {
width: parent.width
height: parent.height
visible: control.visualFocus || control.highlighted
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
}
}
@@ -0,0 +1,42 @@
// 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.Universal
import QtQuick.Controls.Universal.impl
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: 5
spacing: 8
property bool useSystemFocusVisuals: true
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
}
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
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
opacity: enabled ? 1.0 : 0.2
color: control.Universal.foreground
}
}
@@ -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.impl
import QtQuick.Controls.Universal
import QtQuick.Controls.Universal.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)
spacing: 12
padding: 12
topPadding: padding - 1
bottomPadding: padding + 1
icon.width: 20
icon.height: 20
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: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
visible: enabled && (control.down || control.highlighted || control.visualFocus || control.hovered)
color: control.down ? control.Universal.listMediumColor :
control.hovered ? control.Universal.listLowColor : control.Universal.altMediumLowColor
Rectangle {
width: parent.width
height: parent.height
visible: control.visualFocus || control.highlighted
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
}
@@ -0,0 +1,38 @@
// 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.Universal
T.TabBar {
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
currentIndex: control.currentIndex
spacing: control.spacing
orientation: ListView.Horizontal
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.AutoFlickIfNeeded
snapMode: ListView.SnapToItem
highlightMoveDuration: 100
highlightRangeMode: ListView.ApplyRange
preferredHighlightBegin: 48
preferredHighlightEnd: width - 48
}
background: Rectangle {
implicitWidth: 200
implicitHeight: 48
color: control.Universal.background
}
}
@@ -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.Universal
T.TabButton {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 12 // PivotItemMargin
spacing: 8
icon.width: 20
icon.height: 20
contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
defaultIconColor: Color.transparent(enabled && control.hovered
? control.Universal.baseMediumHighColor : control.Universal.foreground,
control.checked || control.down || (enabled && control.hovered) ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
}
@@ -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.Universal
import QtQuick.Controls.Universal.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,
placeholder.implicitHeight + topPadding + bottomPadding)
// TextControlThemePadding + 2 (border)
padding: 12
topPadding: padding - 7
rightPadding: padding - 4
bottomPadding: padding - 5
Universal.theme: activeFocus ? Universal.Light : undefined
color: !enabled ? Universal.chromeDisabledLowColor : Universal.foreground
selectionColor: Universal.accent
selectedTextColor: Universal.chromeWhiteColor
placeholderTextColor: !enabled ? Universal.chromeDisabledLowColor :
activeFocus ? Universal.chromeBlackMediumLowColor :
Universal.baseMediumColor
ContextMenu.menu: TextEditingContextMenu {
editor: control
}
PlaceholderText {
id: placeholder
x: control.leftPadding
y: control.topPadding
width: control.width - (control.leftPadding + control.rightPadding)
height: control.height - (control.topPadding + control.bottomPadding)
text: control.placeholderText
font: control.font
color: control.placeholderTextColor
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
renderType: control.renderType
}
background: Rectangle {
implicitWidth: 60 // TextControlThemeMinWidth - 4 (border)
implicitHeight: 28 // TextControlThemeMinHeight - 4 (border)
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent :
control.hovered ? control.Universal.baseMediumColor : control.Universal.chromeDisabledLowColor
color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
}
@@ -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.Universal
import QtQuick.Controls.Universal.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,
placeholder.implicitHeight + topPadding + bottomPadding)
// TextControlThemePadding + 2 (border)
padding: 12
topPadding: padding - 7
rightPadding: padding - 4
bottomPadding: padding - 5
Universal.theme: activeFocus ? Universal.Light : undefined
color: !enabled ? Universal.chromeDisabledLowColor : Universal.foreground
selectionColor: Universal.accent
selectedTextColor: Universal.chromeWhiteColor
placeholderTextColor: !enabled ? Universal.chromeDisabledLowColor :
activeFocus ? Universal.chromeBlackMediumLowColor :
Universal.baseMediumColor
verticalAlignment: TextInput.AlignVCenter
ContextMenu.menu: TextEditingContextMenu {
editor: control
}
PlaceholderText {
id: placeholder
x: control.leftPadding
y: control.topPadding
width: control.width - (control.leftPadding + control.rightPadding)
height: control.height - (control.topPadding + control.bottomPadding)
text: control.placeholderText
font: control.font
color: control.placeholderTextColor
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
renderType: control.renderType
}
background: Rectangle {
implicitWidth: 60 // TextControlThemeMinWidth - 4 (border)
implicitHeight: 28 // TextControlThemeMinHeight - 4 (border)
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent :
control.hovered ? control.Universal.baseMediumColor : control.Universal.chromeDisabledLowColor
color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
}
@@ -0,0 +1,26 @@
// 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.Universal
T.ToolBar {
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
background: Rectangle {
implicitHeight: 48 // AppBarThemeCompactHeight
color: control.Universal.chromeMediumColor
}
}
@@ -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.impl
import QtQuick.Controls.Universal
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: 8
icon.width: 20
icon.height: 20
property bool useSystemFocusVisuals: true
contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
defaultIconColor: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
text: control.text
font: control.font
color: defaultIconColor
}
background: Rectangle {
implicitWidth: 68
implicitHeight: 48 // AppBarThemeCompactHeight
color: control.enabled && (control.highlighted || control.checked) ? control.Universal.accent : "transparent"
Rectangle {
width: parent.width
height: parent.height
visible: enabled && (control.down || control.hovered)
color: control.down ? control.Universal.listMediumColor : control.Universal.listLowColor
}
}
}
@@ -0,0 +1,27 @@
// 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.Universal
T.ToolSeparator {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
leftPadding: vertical ? 16 : 12
rightPadding: vertical ? 15 : 12
topPadding: vertical ? 12 : 16
bottomPadding: vertical ? 12 : 15
contentItem: Rectangle {
implicitWidth: control.vertical ? 1 : 20
implicitHeight: control.vertical ? 20 : 1
color: control.Universal.baseMediumLowColor
}
}
@@ -0,0 +1,40 @@
// 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.Universal
T.ToolTip {
id: control
x: parent ? (parent.width - implicitWidth) / 2 : 0
y: -implicitHeight - 16
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
margins: 8
padding: 8
topPadding: padding - 3
bottomPadding: padding - 1
closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
contentItem: Text {
text: control.text
font: control.font
wrapMode: Text.Wrap
opacity: enabled ? 1.0 : 0.2
color: control.Universal.foreground
}
background: Rectangle {
color: control.Universal.chromeMediumLowColor
border.color: control.Universal.chromeHighColor
border.width: 1 // ToolTipBorderThemeThickness
}
}
@@ -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.Universal
import QtQuick.Controls.impl
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
font: control.font
color: control.Universal.foreground
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
}
}
property real delegateHeight: control.availableHeight / control.visibleItemCount
}
}
@@ -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.Universal
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 { }
}
@@ -0,0 +1,40 @@
// 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 as ControlsImpl
import QtQuick.Controls.Universal
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 {
implicitWidth: Math.max(control.headerView.width,
control.contentItem.implicitWidth
+ (control.padding * 2))
implicitHeight: control.contentItem.implicitHeight + (control.padding * 2)
color: control.Universal.background
}
contentItem: Label {
width: control.width
height: control.height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: ControlsImpl.Color.transparent(control.Universal.foreground,
enabled ? 1.0 : 0.2)
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.Templates as T
import QtQuick.Controls.impl
import QtQuick.Controls.Universal
Rectangle {
id: indicator
implicitWidth: 20
implicitHeight: 20
color: !control.enabled ? "transparent" :
control.down && !partiallyChecked ? control.Universal.baseMediumColor :
control.checkState === Qt.Checked ? control.Universal.accent : "transparent"
border.color: !control.enabled ? control.Universal.baseLowColor :
control.down ? control.Universal.baseMediumColor :
control.checked ? control.Universal.accent : control.Universal.baseMediumHighColor
border.width: 2 // CheckBoxBorderThemeThickness
property Item control
readonly property bool partiallyChecked: control.checkState === Qt.PartiallyChecked
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
visible: indicator.control.checkState === Qt.Checked
color: !indicator.control.enabled ? indicator.control.Universal.baseLowColor : indicator.control.Universal.chromeWhiteColor
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/checkmark.png"
}
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: indicator.partiallyChecked ? parent.width / 2 : parent.width
height: indicator.partiallyChecked ? parent.height / 2 : parent.height
visible: !indicator.control.pressed && enabled && indicator.control.hovered || indicator.partiallyChecked
color: !indicator.partiallyChecked ? "transparent" :
!indicator.control.enabled ? indicator.control.Universal.baseLowColor :
indicator.control.down ? indicator.control.Universal.baseMediumColor :
indicator.control.hovered ? indicator.control.Universal.baseHighColor : indicator.control.Universal.baseMediumHighColor
border.width: indicator.partiallyChecked ? 0 : 2 // CheckBoxBorderThemeThickness
border.color: indicator.control.Universal.baseMediumLowColor
}
}
@@ -0,0 +1,10 @@
// 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.Controls.impl
CopyAction {
icon.width: 20
icon.height: 20
}
@@ -0,0 +1,10 @@
// 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.Controls.impl
CutAction {
icon.width: 20
icon.height: 20
}
@@ -0,0 +1,10 @@
// 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.Controls.impl
DeleteAction {
icon.width: 20
icon.height: 20
}
@@ -0,0 +1,10 @@
// 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.Controls.impl
PasteAction {
icon.width: 20
icon.height: 20
}
@@ -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.Controls.Universal
Rectangle {
id: indicator
implicitWidth: 20
implicitHeight: 20
radius: width / 2
color: "transparent"
border.width: 2 // RadioButtonBorderThemeThickness
border.color: control.checked ? "transparent" :
!control.enabled ? control.Universal.baseLowColor :
control.down ? control.Universal.baseMediumColor :
control.hovered ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor
property var control
Rectangle {
id: checkOuterEllipse
width: parent.width
height: parent.height
radius: width / 2
opacity: indicator.control.checked ? 1 : 0
color: "transparent"
border.width: 2 // RadioButtonBorderThemeThickness
border.color: !indicator.control.enabled ? indicator.control.Universal.baseLowColor :
indicator.control.down ? indicator.control.Universal.baseMediumColor : indicator.control.Universal.accent
}
Rectangle {
id: checkGlyph
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: parent.width / 2
height: parent.height / 2
radius: width / 2
opacity: indicator.control.checked ? 1 : 0
color: !indicator.control.enabled ? indicator.control.Universal.baseLowColor :
indicator.control.down ? indicator.control.Universal.baseMediumColor :
indicator.control.hovered ? indicator.control.Universal.baseHighColor : indicator.control.Universal.baseMediumHighColor
}
}
@@ -0,0 +1,9 @@
// 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
import QtQuick.Controls.impl
RedoAction {
icon.width: 20
icon.height: 20
}
@@ -0,0 +1,10 @@
// 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.Controls.impl
SelectAllAction {
icon.width: 20
icon.height: 20
}
@@ -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.Templates as T
import QtQuick.Controls.Universal
Item {
id: indicator
implicitWidth: 44
implicitHeight: 20
property T.AbstractButton control
Rectangle {
width: parent.width
height: parent.height
radius: 10
color: !indicator.control.enabled ? "transparent" :
indicator.control.pressed ? indicator.control.Universal.baseMediumColor :
indicator.control.checked ? indicator.control.Universal.accent : "transparent"
border.color: !indicator.control.enabled ? indicator.control.Universal.baseLowColor :
indicator.control.checked && !indicator.control.pressed ? indicator.control.Universal.accent :
indicator.control.hovered && !indicator.control.checked && !indicator.control.pressed ? indicator.control.Universal.baseHighColor : indicator.control.Universal.baseMediumColor
opacity: enabled && indicator.control.hovered && indicator.control.checked && !indicator.control.pressed ? (indicator.control.Universal.theme === Universal.Light ? 0.7 : 0.9) : 1.0
border.width: 2
}
Rectangle {
width: 10
height: 10
radius: 5
color: !indicator.control.enabled ? indicator.control.Universal.baseLowColor :
indicator.control.pressed || indicator.control.checked ? indicator.control.Universal.chromeWhiteColor :
indicator.control.hovered && !indicator.control.checked ? indicator.control.Universal.baseHighColor : indicator.control.Universal.baseMediumHighColor
x: Math.max(5, Math.min(parent.width - width - 5,
indicator.control.visualPosition * parent.width - (width / 2)))
y: (parent.height - height) / 2
Behavior on x {
enabled: !indicator.control.pressed
SmoothedAnimation { velocity: 200 }
}
}
}
@@ -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.Universal
import QtQuick.Controls.Universal.impl as UniversalImpl
Menu {
id: menu
popupType: Qt.platform.pluginName !== "wayland" ? Popup.Window : Popup.Item
required property Item editor
UniversalImpl.UndoAction {
editor: menu.editor
}
UniversalImpl.RedoAction {
editor: menu.editor
}
MenuSeparator {}
UniversalImpl.CutAction {
editor: menu.editor
}
UniversalImpl.CopyAction {
editor: menu.editor
}
UniversalImpl.PasteAction {
editor: menu.editor
}
UniversalImpl.DeleteAction {
editor: menu.editor
}
MenuSeparator {}
UniversalImpl.SelectAllAction {
editor: menu.editor
}
}
@@ -0,0 +1,9 @@
// 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
import QtQuick.Controls.impl
UndoAction {
icon.width: 20
icon.height: 20
}
@@ -0,0 +1,112 @@
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/qquickuniversalbusyindicator_p.h"
lineNumber: 25
name: "QQuickUniversalBusyIndicator"
accessSemantics: "reference"
defaultProperty: "data"
parentProperty: "parent"
prototype: "QQuickItem"
exports: [
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 2.0",
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 2.1",
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 2.4",
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 2.7",
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 2.11",
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 6.0",
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 6.3",
"QtQuick.Controls.Universal.impl/BusyIndicatorImpl 6.7"
]
exportMetaObjectRevisions: [512, 513, 516, 519, 523, 1536, 1539, 1543]
Property {
name: "count"
type: "int"
read: "count"
write: "setCount"
index: 0
lineNumber: 28
isFinal: true
}
Property {
name: "color"
type: "QColor"
read: "color"
write: "setColor"
index: 1
lineNumber: 29
isFinal: true
}
}
Component {
file: "private/qquickuniversalfocusrectangle_p.h"
lineNumber: 24
name: "QQuickUniversalFocusRectangle"
accessSemantics: "reference"
prototype: "QQuickPaintedItem"
exports: [
"QtQuick.Controls.Universal.impl/FocusRectangle 2.0",
"QtQuick.Controls.Universal.impl/FocusRectangle 2.1",
"QtQuick.Controls.Universal.impl/FocusRectangle 2.4",
"QtQuick.Controls.Universal.impl/FocusRectangle 2.7",
"QtQuick.Controls.Universal.impl/FocusRectangle 2.11",
"QtQuick.Controls.Universal.impl/FocusRectangle 6.0",
"QtQuick.Controls.Universal.impl/FocusRectangle 6.3",
"QtQuick.Controls.Universal.impl/FocusRectangle 6.7"
]
exportMetaObjectRevisions: [512, 513, 516, 519, 523, 1536, 1539, 1543]
}
Component {
file: "private/qquickuniversalprogressbar_p.h"
lineNumber: 25
name: "QQuickUniversalProgressBar"
accessSemantics: "reference"
defaultProperty: "data"
parentProperty: "parent"
prototype: "QQuickItem"
exports: [
"QtQuick.Controls.Universal.impl/ProgressBarImpl 2.0",
"QtQuick.Controls.Universal.impl/ProgressBarImpl 2.1",
"QtQuick.Controls.Universal.impl/ProgressBarImpl 2.4",
"QtQuick.Controls.Universal.impl/ProgressBarImpl 2.7",
"QtQuick.Controls.Universal.impl/ProgressBarImpl 2.11",
"QtQuick.Controls.Universal.impl/ProgressBarImpl 6.0",
"QtQuick.Controls.Universal.impl/ProgressBarImpl 6.3",
"QtQuick.Controls.Universal.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
}
}
}
@@ -0,0 +1,22 @@
module QtQuick.Controls.Universal.impl
linktarget Qt6::qtquickcontrols2universalstyleimplplugin
optional plugin qtquickcontrols2universalstyleimplplugin
classname QtQuickControls2UniversalStyleImplPlugin
typeinfo plugins.qmltypes
depends QtQuick auto
prefer :/qt-project.org/imports/QtQuick/Controls/Universal/impl/
CheckIndicator 6.0 CheckIndicator.qml
CheckIndicator 2.0 CheckIndicator.qml
CopyAction 6.11 CopyAction.qml
CutAction 6.11 CutAction.qml
DeleteAction 6.11 DeleteAction.qml
PasteAction 6.11 PasteAction.qml
RadioIndicator 6.0 RadioIndicator.qml
RadioIndicator 2.0 RadioIndicator.qml
RedoAction 6.11 RedoAction.qml
SelectAllAction 6.11 SelectAllAction.qml
SwitchIndicator 6.0 SwitchIndicator.qml
SwitchIndicator 2.0 SwitchIndicator.qml
TextEditingContextMenu 6.11 TextEditingContextMenu.qml
UndoAction 6.11 UndoAction.qml
@@ -0,0 +1,357 @@
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/qquickuniversalstyle_p.h"
lineNumber: 28
name: "QQuickUniversalStyle"
accessSemantics: "reference"
prototype: "QQuickAttachedPropertyPropagator"
exports: [
"QtQuick.Controls.Universal/Universal 2.0",
"QtQuick.Controls.Universal/Universal 6.0"
]
isCreatable: false
exportMetaObjectRevisions: [512, 1536]
attachedType: "QQuickUniversalStyle"
Enum {
name: "Theme"
lineNumber: 71
values: ["Light", "Dark", "System"]
}
Enum {
name: "Color"
lineNumber: 80
values: [
"Lime",
"Green",
"Emerald",
"Teal",
"Cyan",
"Cobalt",
"Indigo",
"Violet",
"Pink",
"Magenta",
"Crimson",
"Red",
"Orange",
"Amber",
"Yellow",
"Brown",
"Olive",
"Steel",
"Mauve",
"Taupe"
]
}
Property {
name: "theme"
type: "Theme"
read: "theme"
write: "setTheme"
reset: "resetTheme"
notify: "themeChanged"
index: 0
lineNumber: 31
isFinal: true
}
Property {
name: "accent"
type: "QVariant"
read: "accent"
write: "setAccent"
reset: "resetAccent"
notify: "accentChanged"
index: 1
lineNumber: 32
isFinal: true
}
Property {
name: "foreground"
type: "QVariant"
read: "foreground"
write: "setForeground"
reset: "resetForeground"
notify: "foregroundChanged"
index: 2
lineNumber: 33
isFinal: true
}
Property {
name: "background"
type: "QVariant"
read: "background"
write: "setBackground"
reset: "resetBackground"
notify: "backgroundChanged"
index: 3
lineNumber: 34
isFinal: true
}
Property {
name: "altHighColor"
type: "QColor"
read: "altHighColor"
notify: "paletteChanged"
index: 4
lineNumber: 36
isReadonly: true
isFinal: true
}
Property {
name: "altLowColor"
type: "QColor"
read: "altLowColor"
notify: "paletteChanged"
index: 5
lineNumber: 37
isReadonly: true
isFinal: true
}
Property {
name: "altMediumColor"
type: "QColor"
read: "altMediumColor"
notify: "paletteChanged"
index: 6
lineNumber: 38
isReadonly: true
isFinal: true
}
Property {
name: "altMediumHighColor"
type: "QColor"
read: "altMediumHighColor"
notify: "paletteChanged"
index: 7
lineNumber: 39
isReadonly: true
isFinal: true
}
Property {
name: "altMediumLowColor"
type: "QColor"
read: "altMediumLowColor"
notify: "paletteChanged"
index: 8
lineNumber: 40
isReadonly: true
isFinal: true
}
Property {
name: "baseHighColor"
type: "QColor"
read: "baseHighColor"
notify: "paletteChanged"
index: 9
lineNumber: 41
isReadonly: true
isFinal: true
}
Property {
name: "baseLowColor"
type: "QColor"
read: "baseLowColor"
notify: "paletteChanged"
index: 10
lineNumber: 42
isReadonly: true
isFinal: true
}
Property {
name: "baseMediumColor"
type: "QColor"
read: "baseMediumColor"
notify: "paletteChanged"
index: 11
lineNumber: 43
isReadonly: true
isFinal: true
}
Property {
name: "baseMediumHighColor"
type: "QColor"
read: "baseMediumHighColor"
notify: "paletteChanged"
index: 12
lineNumber: 44
isReadonly: true
isFinal: true
}
Property {
name: "baseMediumLowColor"
type: "QColor"
read: "baseMediumLowColor"
notify: "paletteChanged"
index: 13
lineNumber: 45
isReadonly: true
isFinal: true
}
Property {
name: "chromeAltLowColor"
type: "QColor"
read: "chromeAltLowColor"
notify: "paletteChanged"
index: 14
lineNumber: 46
isReadonly: true
isFinal: true
}
Property {
name: "chromeBlackHighColor"
type: "QColor"
read: "chromeBlackHighColor"
notify: "paletteChanged"
index: 15
lineNumber: 47
isReadonly: true
isFinal: true
}
Property {
name: "chromeBlackLowColor"
type: "QColor"
read: "chromeBlackLowColor"
notify: "paletteChanged"
index: 16
lineNumber: 48
isReadonly: true
isFinal: true
}
Property {
name: "chromeBlackMediumLowColor"
type: "QColor"
read: "chromeBlackMediumLowColor"
notify: "paletteChanged"
index: 17
lineNumber: 49
isReadonly: true
isFinal: true
}
Property {
name: "chromeBlackMediumColor"
type: "QColor"
read: "chromeBlackMediumColor"
notify: "paletteChanged"
index: 18
lineNumber: 50
isReadonly: true
isFinal: true
}
Property {
name: "chromeDisabledHighColor"
type: "QColor"
read: "chromeDisabledHighColor"
notify: "paletteChanged"
index: 19
lineNumber: 51
isReadonly: true
isFinal: true
}
Property {
name: "chromeDisabledLowColor"
type: "QColor"
read: "chromeDisabledLowColor"
notify: "paletteChanged"
index: 20
lineNumber: 52
isReadonly: true
isFinal: true
}
Property {
name: "chromeHighColor"
type: "QColor"
read: "chromeHighColor"
notify: "paletteChanged"
index: 21
lineNumber: 53
isReadonly: true
isFinal: true
}
Property {
name: "chromeLowColor"
type: "QColor"
read: "chromeLowColor"
notify: "paletteChanged"
index: 22
lineNumber: 54
isReadonly: true
isFinal: true
}
Property {
name: "chromeMediumColor"
type: "QColor"
read: "chromeMediumColor"
notify: "paletteChanged"
index: 23
lineNumber: 55
isReadonly: true
isFinal: true
}
Property {
name: "chromeMediumLowColor"
type: "QColor"
read: "chromeMediumLowColor"
notify: "paletteChanged"
index: 24
lineNumber: 56
isReadonly: true
isFinal: true
}
Property {
name: "chromeWhiteColor"
type: "QColor"
read: "chromeWhiteColor"
notify: "paletteChanged"
index: 25
lineNumber: 57
isReadonly: true
isFinal: true
}
Property {
name: "listLowColor"
type: "QColor"
read: "listLowColor"
notify: "paletteChanged"
index: 26
lineNumber: 58
isReadonly: true
isFinal: true
}
Property {
name: "listMediumColor"
type: "QColor"
read: "listMediumColor"
notify: "paletteChanged"
index: 27
lineNumber: 59
isReadonly: true
isFinal: true
}
Signal { name: "themeChanged"; lineNumber: 181 }
Signal { name: "accentChanged"; lineNumber: 182 }
Signal { name: "foregroundChanged"; lineNumber: 183 }
Signal { name: "backgroundChanged"; lineNumber: 184 }
Signal { name: "paletteChanged"; lineNumber: 185 }
Method {
name: "color"
type: "QColor"
isMethodConstant: true
lineNumber: 122
Parameter { name: "color"; type: "Color" }
}
}
}
@@ -0,0 +1,115 @@
module QtQuick.Controls.Universal
linktarget Qt6::qtquickcontrols2universalstyleplugin
plugin qtquickcontrols2universalstyleplugin
classname QtQuickControls2UniversalStylePlugin
typeinfo plugins.qmltypes
import QtQuick.Controls.Basic auto
depends QtQuick auto
prefer :/qt-project.org/imports/QtQuick/Controls/Universal/
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
SwitchDelegate 6.0 SwitchDelegate.qml
SwitchDelegate 2.0 SwitchDelegate.qml
Switch 6.0 Switch.qml
Switch 2.0 Switch.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
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