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,10 @@
// 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.NativeStyle
import QtQuick.Templates as T
T.ApplicationWindow {
color: palette.window
}
@@ -0,0 +1,48 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultButton {
id: control
background: NativeStyle.Button {
control: control
contentWidth: contentItem.implicitWidth
contentHeight: contentItem.implicitHeight
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.NeverHovered
readonly property bool __ignoreNotCustomizable: true
}
NativeStyle.Button {
id: hoverButton
control: control
x: background.x
y: background.y
width: background.width
height: background.height
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.AlwaysHovered
opacity: control.hovered ? 1 : 0
visible: opacity !== 0
Behavior on opacity { NumberAnimation { duration: hoverButton.transitionDuration } }
}
contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
text: control.text
font: control.font
color: control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,80 @@
// 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.Templates as T
import QtQuick.Controls
import QtQuick.Controls.impl
import QtQuick.NativeStyle as NativeStyle
T.CheckBox {
id: control
readonly property bool nativeIndicator: indicator instanceof NativeStyle.StyleItem
readonly property bool __notCustomizable: true
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
spacing: nativeIndicator ? 0 : 6
padding: nativeIndicator ? 0 : 6
indicator: NativeStyle.CheckBox {
control: control
y: control.topPadding + (control.availableHeight - height) >> 1
contentWidth: contentItem.implicitWidth
contentHeight: contentItem.implicitHeight
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.NeverHovered
readonly property bool __ignoreNotCustomizable: true
}
NativeStyle.CheckBox {
id: hoverCheckBox
control: control
x: indicator.x
y: indicator.y
z: 99 // Needs to be above the "unhovered" indicator
width: indicator.width
height: indicator.height
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.AlwaysHovered
opacity: control.hovered ? 1 : 0
visible: opacity !== 0
Behavior on opacity { NumberAnimation { duration: hoverCheckBox.transitionDuration } }
}
contentItem: CheckLabel {
text: control.text
font: control.font
color: control.palette.windowText
// For some reason, the other styles set padding here (in the delegate), instead of in
// the control above. And they also adjust the indicator position by setting x and y
// explicitly (instead of using insets). So we follow the same pattern to ensure that
// setting a custom contentItem delegate from the app will end up looking the same for
// all styles. But this should probably be fixed for all styles (to make them work the
// same way as e.g Buttons).
leftPadding: {
if (nativeIndicator)
indicator.contentPadding.left
else
indicator && !mirrored ? indicator.width + spacing : 0
}
topPadding: nativeIndicator ? indicator.contentPadding.top : 0
rightPadding: {
if (nativeIndicator)
indicator.contentPadding.right
else
indicator && mirrored ? indicator.width + spacing : 0
}
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,79 @@
// 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
import QtQuick.Controls.impl
import QtQuick.NativeStyle as NativeStyle
T.CheckDelegate {
id: control
readonly property bool __nativeIndicator: indicator instanceof NativeStyle.StyleItem
readonly property bool __notCustomizable: true
readonly property Item __focusFrameTarget: indicator
readonly property Item __focusFrameStyleItem: indicator
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
spacing: 6
padding: 6
icon.width: 16
icon.height: 16
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
color: control.highlighted ? control.palette.button : control.palette.windowText
readonly property bool __ignoreNotCustomizable: true
}
indicator: NativeStyle.CheckDelegate {
x: control.text
? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding)
: control.leftPadding + (control.availableWidth - width) / 2
// The rendering gets messed up when rendering on sub-pixel positions.
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
contentWidth: control.implicitContentWidth
contentHeight: control.implicitContentHeight
control: control
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.NeverHovered
readonly property bool __ignoreNotCustomizable: true
}
NativeStyle.CheckDelegate {
id: hoverCheckDelegate
control: control
x: control.indicator.x
y: control.indicator.y
z: control.indicator.z + 1
width: control.indicator.width
height: control.indicator.height
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.AlwaysHovered
opacity: control.hovered ? 1 : 0
visible: opacity !== 0
Behavior on opacity {
NumberAnimation {
duration: hoverCheckDelegate.transitionDuration
}
}
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 20
color: Qt.darker(control.highlighted
? control.palette.highlight : control.palette.button, control.down ? 1.05 : 1)
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,110 @@
// 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
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.impl
import QtQuick.Templates as T
import QtQuick.NativeStyle as NativeStyle
import QtQuick.Controls.Windows.impl
T.ComboBox {
id: control
readonly property bool __nativeBackground: background instanceof NativeStyle.StyleItem
readonly property bool __notCustomizable: true
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding,
90 /* minimum */ )
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
leftPadding: __nativeBackground ? background.contentPadding.left : 5
rightPadding: __nativeBackground ? background.contentPadding.right : 5
topPadding: __nativeBackground ? background.contentPadding.top : 5
bottomPadding: __nativeBackground ? background.contentPadding.bottom : 5
contentItem: T.TextField {
implicitWidth: contentWidth
implicitHeight: contentHeight
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.editable ? control.palette.text : control.palette.buttonText
selectionColor: control.palette.highlight
selectedTextColor: control.palette.highlightedText
verticalAlignment: Text.AlignVCenter
readonly property bool __ignoreNotCustomizable: true
ContextMenu.menu: TextEditingContextMenu {
editor: parent
}
}
background: NativeStyle.ComboBox {
control: control
contentWidth: contentItem.implicitWidth
contentHeight: contentItem.implicitHeight
useNinePatchImage: false
readonly property bool __ignoreNotCustomizable: true
}
delegate: ItemDelegate {
required property var model
required property int index
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
}
popup: T.Popup {
readonly property var layoutMargins: control.__nativeBackground ? control.background.layoutMargins : null
x: layoutMargins ? layoutMargins.left : 0
y: control.height - (layoutMargins ? layoutMargins.bottom : 0)
width: control.width - (layoutMargins ? layoutMargins.left + layoutMargins.right : 0)
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
topMargin: 6
bottomMargin: 6
contentItem: ListView {
clip: true
implicitHeight: contentHeight
model: control.delegateModel
currentIndex: control.highlightedIndex
highlightMoveDuration: 0
Rectangle {
z: 10
width: parent.width
height: parent.height
color: "transparent"
border.color: control.palette.mid
}
T.ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle {
color: control.palette.window
}
}
}
@@ -0,0 +1,83 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import QtQuick.Controls.impl
import QtQuick.Templates as T
import QtQuick.NativeStyle as NativeStyle
T.DelayButton {
id: control
readonly property bool __nativeBackground: background instanceof NativeStyle.StyleItem
readonly property bool __notCustomizable: true
readonly property Item __focusFrameTarget: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
leftPadding: __nativeBackground ? background.contentPadding.left : 5
rightPadding: __nativeBackground ? background.contentPadding.right : 5
topPadding: __nativeBackground ? background.contentPadding.top : 5
bottomPadding: __nativeBackground ? background.contentPadding.bottom : 5
icon.width: 24
icon.height: 24
transition: Transition {
NumberAnimation {
duration: control.delay * (control.pressed ? 1.0 - control.progress : 0.3 * control.progress)
}
}
background: NativeStyle.DelayButton {
control: control
contentWidth: contentItem.implicitWidth
contentHeight: contentItem.implicitHeight
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.NeverHovered
readonly property bool __ignoreNotCustomizable: true
}
NativeStyle.DelayButton {
id: hoverButton
control: control
x: background.x
y: background.y
width: background.width
height: background.height
useNinePatchImage: false
overrideState: NativeStyle.StyleItem.AlwaysHovered
opacity: control.hovered ? 1 : 0
visible: opacity !== 0
Behavior on opacity { NumberAnimation { duration: hoverButton.transitionDuration } }
}
contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
defaultIconColor: control.palette.buttonText
text: control.text
font: control.font
color: defaultIconColor
readonly property bool __ignoreNotCustomizable: true
// Delay progress bar.
Rectangle {
x: (parent.width - parent.implicitWidth) / 2
y: parent.height + 1
width: control.progress * parent.implicitWidth
height: 1
color: control.palette.accent
scale: control.mirrored ? -1 : 1
}
}
}
@@ -0,0 +1,103 @@
// 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.NativeStyle as NativeStyle
import QtQuick.Controls.Windows.impl as WindowsImpl
T.DoubleSpinBox {
id: control
property bool nativeIndicators: up.indicator.hasOwnProperty("_qt_default")
&& down.indicator.hasOwnProperty("_qt_default")
readonly property bool __notCustomizable: true
// Note: the indicators are inside the contentItem
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
up.implicitIndicatorHeight + down.implicitIndicatorHeight)
spacing: 2
validator: DoubleValidator {
locale: control.locale.name
bottom: Math.min(control.from, control.to)
top: Math.max(control.from, control.to)
decimals: control.decimals
}
contentItem: TextField {
text: control.displayText
font: control.font
color: control.palette.text
selectionColor: control.palette.highlight
selectedTextColor: control.palette.highlightedText
horizontalAlignment: Qt.AlignLeft
verticalAlignment: Qt.AlignVCenter
implicitWidth: Math.max(90 /* minimum */, contentWidth + leftPadding + rightPadding)
topPadding: 0
bottomPadding: 0
leftPadding: 10
rightPadding: up.indicator.width + 10
readOnly: !control.editable
validator: control.validator
inputMethodHints: control.inputMethodHints
clip: width < implicitWidth
readonly property bool __ignoreNotCustomizable: true
ContextMenu.menu: WindowsImpl.TextEditingContextMenu {
editor: parent
}
// Since the indicators are embedded inside the TextField we need to avoid that
// the TextField consumes mouse events for that area.
// We achieve that by setting a containmentMask
containmentMask: Item { height: contentItem.height; width: contentItem.width - upAndDown.width }
}
NativeStyle.DoubleSpinBox {
id: upAndDown
control: control
subControl: NativeStyle.DoubleSpinBox.Up
visible: nativeIndicators
x: up.indicator.x
y: up.indicator.y
//implicitHeight: contentItem.implicitHeight-2
height: parent.height-2
useNinePatchImage: false
z:99
}
up.indicator: Item {
x: control.width - width - 2
y: 1
height: upAndDown.height >> 1
implicitWidth: upAndDown.implicitWidth
implicitHeight: (upAndDown.implicitHeight >> 1)
property bool _qt_default
readonly property bool __ignoreNotCustomizable: true
}
down.indicator: Item {
x: control.width - width - 2
y: up.indicator.y + (upAndDown.height >> 1)
height: upAndDown.height - up.indicator.height
implicitWidth: upAndDown.implicitWidth
implicitHeight: upAndDown.implicitHeight >> 1
property bool _qt_default
readonly property bool __ignoreNotCustomizable: true
}
// No background, the TextField will cover the whole control
background: Item {
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,9 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultFrame {
}
@@ -0,0 +1,9 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultGroupBox {
}
@@ -0,0 +1,11 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultItemDelegate {
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
color: control.highlighted ? control.palette.button : control.palette.windowText
}
}
@@ -0,0 +1,79 @@
// Copyright (C) 2024 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.Window
import QtQuick.Effects
T.Menu {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
// The insets are found by examining the MultiEffect.itemRect, which
// contains the drop shadow offsets. Note: the insets are hard-coded
// to avoid a binding loop to implicit size.
leftInset: -32
topInset: -32
rightInset: -32
bottomInset: -32
leftPadding: 5
topPadding: 5
rightPadding: 5
bottomPadding: 5
margins: 0
overlap: 4
delegate: MenuItem { }
contentItem: ListView {
implicitHeight: contentHeight
model: control.contentModel
interactive: Window.window
? contentHeight + control.topPadding + control.bottomPadding > control.height
: false
currentIndex: control.currentIndex
spacing: 2
ScrollIndicator.vertical: ScrollIndicator {}
}
background: Item {
implicitWidth: 200 - control.leftInset - control.rightInset
implicitHeight: 20 - control.topInset - control.bottomInset
MultiEffect {
x: -control.leftInset
y: -control.topInset
width: source.width
height: source.height
source: Rectangle {
width: control.background.width + control.leftInset + control.rightInset
height: control.background.height + control.topInset + control.bottomInset
radius: 8
color: Qt.lighter(control.palette.window, 1.15)
border.color: Qt.darker(control.palette.window, 1.12)
visible: false
}
shadowScale: 1.04
shadowOpacity: 0.1
shadowColor: 'black'
shadowEnabled: true
shadowHorizontalOffset: 0
shadowVerticalOffset: 6
}
}
T.Overlay.modal: Rectangle {
color: "transparent"
}
T.Overlay.modeless: Rectangle {
color: "transparent"
}
}
@@ -0,0 +1,36 @@
// Copyright (C) 2024 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
T.MenuBar {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
leftPadding: SafeArea.margins.left + 3
rightPadding: SafeArea.margins.right + 3
topPadding: SafeArea.margins.top + 3
bottomPadding: SafeArea.margins.bottom + 3
spacing: 10
delegate: MenuBarItem { }
contentItem: Row {
spacing: control.spacing
Repeater {
model: control.contentModel
}
}
background: Rectangle {
implicitHeight: 20
color: control.palette.button // The MenuBar shares the same color as the MenuBarItems on Windows
}
}
@@ -0,0 +1,48 @@
// Copyright (C) 2024 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
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)
topPadding: 8
bottomPadding: 8
leftPadding: 10
rightPadding: 10
spacing: 6
icon.width: 16
icon.height: 16
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.palette.text
}
background: Rectangle {
implicitWidth: 20
implicitHeight: 20
color: "black"
opacity: 0.05
radius: 4
visible: control.down || control.highlighted
}
}
@@ -0,0 +1,76 @@
// Copyright (C) 2024 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.Windows.impl
T.MenuItem {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
leftPadding: 10
rightPadding: 10
topPadding: 3
bottomPadding: 3
spacing: 6
icon.width: 16
icon.height: 16
implicitTextPadding: control.checkable && control.indicator ? control.indicator.width + control.spacing : 0
contentItem: IconLabel {
readonly property real arrowPadding: control.subMenu && control.arrow ? control.arrow.width + control.spacing : 0
leftPadding: !control.mirrored ? control.textPadding : arrowPadding
rightPadding: control.mirrored ? control.textPadding : arrowPadding
spacing: control.spacing
mirrored: control.mirrored
display: control.display
alignment: Qt.AlignLeft
icon: control.icon
text: control.text
font: control.font
color: control.palette.text
}
arrow: ColorImage {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
width: 20
visible: control.subMenu
rotation: control.mirrored ? -180 : 0
color: control.palette.text
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Windows/images/menuarrow.png"
fillMode: Image.Pad
}
indicator: CheckIndicator {
x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding
y: control.topPadding + (control.availableHeight - height) / 2
control: control
visible: control.checkable
}
background: Rectangle {
implicitWidth: 200
implicitHeight: 30
radius: 4
readonly property real alpha: control.down ? 0.0241 : control.hovered ? 0.0373 : 0
color: Qt.rgba(0, 0, 0, alpha)
visible: control.down || control.highlighted
}
}
@@ -0,0 +1,24 @@
// Copyright (C) 2024 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
T.MenuSeparator {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
horizontalPadding: 0
verticalPadding: 2
contentItem: Rectangle {
implicitWidth: 188
implicitHeight: 1
color: control.palette.midlight
}
}
@@ -0,0 +1,9 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultProgressBar {
}
@@ -0,0 +1,9 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultRadioButton {
}
@@ -0,0 +1,13 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultRadioDelegate {
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
color: control.highlighted ? control.palette.button : control.palette.windowText
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,106 @@
// 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
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Templates as T
T.RangeSlider {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
Math.max(first.implicitHandleWidth, second.implicitHandleWidth) + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
Math.max(first.implicitHandleHeight, second.implicitHandleHeight) + topPadding + bottomPadding)
readonly property bool __notCustomizable: true
readonly property Item __focusFrameTarget: control
component SliderHandle: Rectangle {
implicitWidth: control.horizontal ? 11 : 21
implicitHeight: control.horizontal ? 21 : 11
color: control.palette.highlight
required property bool pressed
}
first.handle: SliderHandle {
x: control.leftPadding + Math.round(control.horizontal
? control.first.visualPosition * (control.availableWidth - width)
: (control.availableWidth - width) / 2)
y: control.topPadding + Math.round(control.horizontal
? (control.availableHeight - height) / 2
: control.first.visualPosition * (control.availableHeight - height))
palette: control.palette
pressed: control.first.pressed
// We are the ones that get focus, but we want the control to
// be used for the visual focus frame.
readonly property Item __focusFrameControl: control
readonly property bool __ignoreNotCustomizable: true
}
second.handle: SliderHandle {
x: control.leftPadding + Math.round(control.horizontal
? control.second.visualPosition * (control.availableWidth - width)
: (control.availableWidth - width) / 2)
y: control.topPadding + Math.round(control.horizontal
? (control.availableHeight - height) / 2
: control.second.visualPosition * (control.availableHeight - height))
palette: control.palette
pressed: control.second.pressed
readonly property Item __focusFrameControl: control
readonly property bool __ignoreNotCustomizable: true
}
background: Item {
implicitWidth: control.horizontal ? 90 : 21
implicitHeight: control.horizontal ? 21 : 90
readonly property real __focusFrameRadius: 1
readonly property bool __ignoreNotCustomizable: true
readonly property int barThickness: 4
// Groove background.
Rectangle {
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 : parent.barThickness
height: control.horizontal ? parent.barThickness : control.availableHeight
color: control.palette.window
Rectangle {
width: parent.width
height: parent.height
radius: parent.radius
// No border in dark mode, instead we fill.
color: Application.styleHints.colorScheme === Qt.Light
? "transparent" : Qt.lighter(control.palette.window, 1.6)
border.color: Application.styleHints.colorScheme === Qt.Light
? Qt.darker(control.palette.window, 1.1)
: "transparent"
}
}
// Progress bar.
Rectangle {
x: control.leftPadding + (control.horizontal
? control.first.position * control.availableWidth
: (control.availableWidth - width) / 2)
y: control.topPadding + (control.horizontal
? (control.availableHeight - height) / 2
: control.second.visualPosition * control.availableHeight)
width: control.horizontal
? control.second.position * control.availableWidth - control.first.position * control.availableWidth
: parent.barThickness
height: control.horizontal
? parent.barThickness
: control.second.position * control.availableHeight - control.first.position * control.availableHeight
color: Qt.rgba(control.palette.highlight.r, control.palette.highlight.g, control.palette.highlight.b, 0.3)
}
}
}
@@ -0,0 +1,101 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultScrollBar {
id: controlRoot
readonly property bool __notCustomizable: true
topPadding: orientation === Qt.Vertical ? controlRoot.__decreaseVisual.indicator.height : 0
bottomPadding: orientation === Qt.Vertical ? controlRoot.__increaseVisual.indicator.height : 0
leftPadding: orientation === Qt.Horizontal ? controlRoot.__decreaseVisual.indicator.width : 0
rightPadding: orientation === Qt.Horizontal ? controlRoot.__increaseVisual.indicator.width : 0
contentItem: NativeStyle.ScrollBar {
control: controlRoot
subControl: NativeStyle.ScrollBar.Handle
readonly property bool __ignoreNotCustomizable: true
}
NativeStyle.ScrollBar {
// Fade a hovered-looking version of the handle
// on top of the default handle when hovering it
x: contentItem.x
y: contentItem.y
z: 1
width: contentItem.width
height: contentItem.height
control: controlRoot
subControl: NativeStyle.ScrollBar.Handle
overrideState: NativeStyle.StyleItem.AlwaysHovered
opacity: controlRoot.hovered || control.pressed ? 1 : 0
Behavior on opacity { NumberAnimation { duration: contentItem.transitionDuration } }
}
// The groove background should have window color
Rectangle {
x: background.x
y: background.y
z: -1
width: background.width
height: background.height
color: controlRoot.palette.window
}
background: NativeStyle.ScrollBar {
control: controlRoot
subControl: NativeStyle.ScrollBar.Groove
overrideState: NativeStyle.ScrollBar.NeverHovered
readonly property bool __ignoreNotCustomizable: true
}
__decreaseVisual.indicator: NativeStyle.ScrollBar {
control: controlRoot
subControl: NativeStyle.ScrollBar.SubLine
overrideState: NativeStyle.ScrollBar.AlwaysHovered
opacity: controlRoot.__decreaseVisual.hovered ? 1 : 0
Behavior on opacity { NumberAnimation { duration: contentItem.transitionDuration } }
useNinePatchImage: false
readonly property bool __ignoreNotCustomizable: true
}
NativeStyle.ScrollBar {
control: controlRoot
subControl: NativeStyle.ScrollBar.SubLine
overrideState: NativeStyle.ScrollBar.AlwaysSunken
opacity: controlRoot.__decreaseVisual.pressed ? 1 : 0
useNinePatchImage: false
z: 1
}
__increaseVisual.indicator: NativeStyle.ScrollBar {
control: controlRoot
subControl: NativeStyle.ScrollBar.AddLine
x: orientation === Qt.Horizontal ? controlRoot.width - width : 0
y: orientation === Qt.Vertical ? controlRoot.height - height : 0
overrideState: NativeStyle.ScrollBar.AlwaysHovered
opacity: controlRoot.__increaseVisual.hovered ? 1 : 0
Behavior on opacity { NumberAnimation { duration: contentItem.transitionDuration } }
useNinePatchImage: false
readonly property bool __ignoreNotCustomizable: true
}
NativeStyle.ScrollBar {
control: controlRoot
subControl: NativeStyle.ScrollBar.AddLine
x: __increaseVisual.indicator.x
y: __increaseVisual.indicator.y
z: 1
overrideState: NativeStyle.ScrollBar.AlwaysSunken
opacity: controlRoot.__increaseVisual.pressed ? 1 : 0
useNinePatchImage: false
}
}
@@ -0,0 +1,43 @@
// Copyright (C) 2024 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
T.ScrollIndicator {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
padding: 2
contentItem: Rectangle {
implicitWidth: 2
implicitHeight: 2
color: control.palette.mid
visible: control.size < 1.0
opacity: 0.0
states: State {
name: "active"
when: control.active
PropertyChanges { control.contentItem.opacity: 0.75 }
}
transitions: [
Transition {
from: "active"
SequentialAnimation {
PauseAnimation { duration: 450 }
NumberAnimation { target: control.contentItem; duration: 200; property: "opacity"; to: 0.0 }
}
}
]
}
}
@@ -0,0 +1,42 @@
// 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)
// rightPadding and bottomPadding are used to make space for the scrollBars
// but because we're setting them explicitly here, there will be no effect
// if the user assign a value to the padding property, so we accumulate it
// with the scrollbar width and height
rightPadding: effectiveScrollBarWidth + padding
bottomPadding: effectiveScrollBarHeight + padding
// Don't set __notCustomizable here, because it would require special-casing
// setFlickable's call to setContentItem.
ScrollBar.vertical: ScrollBar {
parent: control
x: control.mirrored ? 0 : control.width - width
y: 0
height: control.height - (control.ScrollBar.horizontal.visible ? control.ScrollBar.horizontal.height : 0)
active: control.ScrollBar.horizontal.active
}
ScrollBar.horizontal: ScrollBar {
parent: control
x: 0
y: control.height - height
width: control.width - (control.ScrollBar.vertical.visible ? control.ScrollBar.vertical.width : 0)
active: control.ScrollBar.vertical.active
}
}
@@ -0,0 +1,113 @@
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls.impl
import QtQuick.Templates as T
import QtQuick.NativeStyle as NativeStyle
import QtQuick.Controls.Windows.impl
NativeStyle.DefaultSearchField {
id: control
readonly property bool __nativeSearchIndicator: searchIndicator.indicator.hasOwnProperty("_qt_default")
readonly property bool __nativeClearIndicator: clearIndicator.indicator.hasOwnProperty("_qt_default")
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding,
90 /* minimum */ )
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
searchIndicator.implicitIndicatorHeight + topPadding + bottomPadding,
clearIndicator.implicitIndicatorHeight + topPadding + bottomPadding)
contentItem: T.TextField {
text: control.text
color: control.palette.text
selectionColor: control.palette.highlight
selectedTextColor: control.palette.highlightedText
verticalAlignment: Text.AlignVCenter
readonly property bool __ignoreNotCustomizable: true
ContextMenu.menu: TextEditingContextMenu {
editor: parent
}
}
NativeStyle.SearchField {
id: search
visible: control.__nativeSearchIndicator
control: control
subControl: NativeStyle.SearchField.Search
x: searchIndicator.indicator.x
y: searchIndicator.indicator.y
useNinePatchImage: false
}
searchIndicator.indicator: Item {
x: 3
y: control.topPadding + (control.availableHeight - height) / 2
implicitWidth: search.width
implicitHeight: search.height
property bool _qt_default
readonly property bool __ignoreNotCustomizable: true
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: 12
height: 12
source: Qt.resolvedUrl("images/search-magnifier")
color: control.palette.buttonText
opacity: control.searchIndicator.pressed ? 0.7 : 1
}
}
NativeStyle.SearchField {
id: clear
visible: control.__nativeClearIndicator && control.text.length > 0
control: control
subControl: NativeStyle.SearchField.Clear
x: clearIndicator.indicator.x
y: clearIndicator.indicator.y
useNinePatchImage: false
}
clearIndicator.indicator: Item {
x: control.width - width - 3
y: control.topPadding + (control.availableHeight - height) / 2
implicitWidth: clear.width
implicitHeight: clear.height
property bool _qt_default
readonly property bool __ignoreNotCustomizable: true
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: 12
height: 12
source: Qt.resolvedUrl("images/close_big")
visible: control.text.length > 0
color: control.palette.buttonText
opacity: control.clearIndicator.pressed ? 0.7 : 1
}
}
background: NativeStyle.SearchField {
control: control
subControl: NativeStyle.SearchField.Frame
contentWidth: contentItem.implicitWidth
contentHeight: contentItem.implicitHeight
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,32 @@
// 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.Shapes
T.SelectionRectangle {
id: control
readonly property bool __notCustomizable: true
topLeftHandle: Item {
width: 20
height: 20
visible: SelectionRectangle.control.active
// This item is deliberately empty. Selection handles don't feel at home
// for this style. But we provide an invisible handle that the user can
// drag on.
}
bottomRightHandle: Item {
width: 20
height: 20
visible: SelectionRectangle.control.active
// This item is deliberately empty. Selection handles don't feel at home
// for this style. But we provide an invisible handle that the user can
// drag on.
}
}
@@ -0,0 +1,9 @@
// 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.NativeStyle as NativeStyle
NativeStyle.DefaultSlider {
}
@@ -0,0 +1,102 @@
// 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.Templates as T
import QtQuick.NativeStyle as NativeStyle
import QtQuick.Controls.Windows.impl as WindowsImpl
T.SpinBox {
id: control
property bool nativeIndicators: up.indicator.hasOwnProperty("_qt_default")
&& down.indicator.hasOwnProperty("_qt_default")
readonly property bool __notCustomizable: true
// Note: the indicators are inside the contentItem
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
up.implicitIndicatorHeight + down.implicitIndicatorHeight)
spacing: 2
validator: IntValidator {
locale: control.locale.name
bottom: Math.min(control.from, control.to)
top: Math.max(control.from, control.to)
}
contentItem: TextField {
text: control.displayText
font: control.font
color: control.palette.text
selectionColor: control.palette.highlight
selectedTextColor: control.palette.highlightedText
horizontalAlignment: Qt.AlignLeft
verticalAlignment: Qt.AlignVCenter
implicitWidth: Math.max(90 /* minimum */, contentWidth + leftPadding + rightPadding)
topPadding: 0
bottomPadding: 0
leftPadding: 10
rightPadding: up.indicator.width + 10
readOnly: !control.editable
validator: control.validator
inputMethodHints: control.inputMethodHints
clip: width < implicitWidth
readonly property bool __ignoreNotCustomizable: true
ContextMenu.menu: WindowsImpl.TextEditingContextMenu {
editor: parent
}
// Since the indicators are embedded inside the TextField we need to avoid that
// the TextField consumes mouse events for that area.
// We achieve that by setting a containmentMask
containmentMask: Item { height: contentItem.height; width: contentItem.width - upAndDown.width }
}
NativeStyle.SpinBox {
id: upAndDown
control: control
subControl: NativeStyle.SpinBox.Up
visible: nativeIndicators
x: up.indicator.x
y: up.indicator.y
//implicitHeight: contentItem.implicitHeight-2
height: parent.height-2
useNinePatchImage: false
z:99
}
up.indicator: Item {
x: control.width - width - 2
y: 1
height: upAndDown.height >> 1
implicitWidth: upAndDown.implicitWidth
implicitHeight: (upAndDown.implicitHeight >> 1)
property bool _qt_default
readonly property bool __ignoreNotCustomizable: true
}
down.indicator: Item {
x: control.width - width - 2
y: up.indicator.y + (upAndDown.height >> 1)
height: upAndDown.height - up.indicator.height
implicitWidth: upAndDown.implicitWidth
implicitHeight: upAndDown.implicitHeight >> 1
property bool _qt_default
readonly property bool __ignoreNotCustomizable: true
}
// No background, the TextField will cover the whole control
background: Item {
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,38 @@
// 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.Windows.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: 6
spacing: 6
readonly property bool __notCustomizable: true
readonly property Item __focusFrameTarget: indicator
readonly property Item __focusFrameStyleItem: indicator
indicator: SwitchIndicator {}
contentItem: Text {
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
color: control.palette.windowText
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,49 @@
// 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.Windows.impl
import QtQuick.NativeStyle as NativeStyle
T.SwitchDelegate {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
padding: 6
spacing: 6
icon.width: 16
icon.height: 16
readonly property bool __notCustomizable: true
readonly property Item __focusFrameTarget: indicator
readonly property Item __focusFrameStyleItem: indicator
indicator: SwitchIndicator {
x: control.text
? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding)
: control.leftPadding + (control.availableWidth - width) / 2
}
contentItem: NativeStyle.DefaultItemDelegateIconLabel {
color: control.highlighted ? control.palette.button : control.palette.windowText
readonly property bool __ignoreNotCustomizable: true
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 20
color: Qt.darker(control.highlighted
? control.palette.highlight : control.palette.button, control.down ? 1.05 : 1)
readonly property bool __ignoreNotCustomizable: true
}
}
@@ -0,0 +1,15 @@
// 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.NativeStyle as NativeStyle
import QtQuick.Controls.Windows.impl as WindowsImpl
NativeStyle.DefaultTextArea {
id: control
ContextMenu.menu: WindowsImpl.TextEditingContextMenu {
editor: control
}
}
@@ -0,0 +1,15 @@
// 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.NativeStyle as NativeStyle
import QtQuick.Controls.Windows.impl
NativeStyle.DefaultTextField {
id: control
ContextMenu.menu: TextEditingContextMenu {
editor: control
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

@@ -0,0 +1,22 @@
// Copyright (C) 2024 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
Item {
id: indicator
implicitWidth: 14
implicitHeight: 10
property Item control
ColorImage {
y: (parent.height - height) / 2
color: control.palette.text
source: "qrc:/qt-project.org/imports/QtQuick/Controls/Windows/images/checkmark.png"
visible: indicator.control.checkState === Qt.Checked
|| (indicator.control.checked && indicator.control.checkState === undefined)
}
}
@@ -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: 16
icon.height: 16
}
@@ -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: 16
icon.height: 16
}
@@ -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: 16
icon.height: 16
}
@@ -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: 16
icon.height: 16
}
@@ -0,0 +1,8 @@
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 {}
@@ -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: 16
icon.height: 16
}
@@ -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: 16
icon.height: 16
}
@@ -0,0 +1,60 @@
// 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
Rectangle {
id: root
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
implicitWidth: 40
implicitHeight: 16
radius: 3
color: Qt.darker(control.palette.button, control.down ? 1.2 : 1.1)
border.color: Qt.darker(control.palette.window, 1.4)
readonly property bool __ignoreNotCustomizable: true
readonly property real __focusFrameRadius: 2
readonly property T.AbstractButton control: parent as T.AbstractButton
// Checked indicator.
Rectangle {
x: root.control.mirrored ? parent.children[1].x : 0
width: root.control.mirrored
? parent.width - parent.children[1].x : parent.children[1].x + parent.children[1].width
height: parent.height
radius: 3
color: Qt.darker(root.control.palette.highlight, root.control.down ? 1.1 : 1)
border.color: Qt.darker(root.control.palette.highlight, 1.35)
border.width: root.control.enabled ? 1 : 0
opacity: root.control.checked ? 1 : 0
Behavior on opacity {
enabled: !root.control.down
NumberAnimation { duration: 80 }
}
}
// Handle.
Rectangle {
x: Math.max(0, Math.min(parent.width - width,
root.control.visualPosition * parent.width - (width / 2)))
y: (parent.height - height) / 2
width: 20
height: 16
radius: 3
color: Qt.lighter(root.control.palette.button, root.control.down
? 1 : (root.control.hovered ? 1.07 : 1.045))
border.width: 1
border.color: Qt.darker(root.control.palette.window, 1.4)
Behavior on x {
enabled: !root.control.down
SmoothedAnimation { velocity: 200 }
}
}
}
@@ -0,0 +1,41 @@
// 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.Windows
import QtQuick.Controls.Windows.impl as WindowsImpl
Menu {
id: menu
popupType: Popup.Window
required property var editor
WindowsImpl.UndoAction {
editor: menu.editor
}
WindowsImpl.RedoAction {
editor: menu.editor
}
MenuSeparator {}
WindowsImpl.CutAction {
editor: menu.editor
}
WindowsImpl.CopyAction {
editor: menu.editor
}
WindowsImpl.PasteAction {
editor: menu.editor
}
WindowsImpl.DeleteAction {
editor: menu.editor
}
MenuSeparator {}
WindowsImpl.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: 16
icon.height: 16
}
@@ -0,0 +1,20 @@
module QtQuick.Controls.Windows.impl
linktarget Qt6::qtquickcontrols2windowsstyleimplplugin
optional plugin qtquickcontrols2windowsstyleimplplugin
classname QtQuickControls2WindowsStyleImplPlugin
typeinfo QuickControls2WindowsStyleImpl.qmltypes
depends QtQuick auto
prefer :/qt-project.org/imports/QtQuick/Controls/Windows/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
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,8 @@
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 {}
@@ -0,0 +1,68 @@
module QtQuick.Controls.Windows
linktarget Qt6::qtquickcontrols2windowsstyleplugin
plugin qtquickcontrols2windowsstyleplugin
classname QtQuickControls2WindowsStylePlugin
typeinfo plugins.qmltypes
import QtQuick.Controls.Fusion auto
prefer :/qt-project.org/imports/QtQuick/Controls/Windows/
ApplicationWindow 6.0 ApplicationWindow.qml
ApplicationWindow 2.0 ApplicationWindow.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 6.0 DelayButton.qml
DelayButton 2.0 DelayButton.qml
DoubleSpinBox 6.0 DoubleSpinBox.qml
DoubleSpinBox 2.0 DoubleSpinBox.qml
Frame 6.0 Frame.qml
Frame 2.0 Frame.qml
GroupBox 6.0 GroupBox.qml
GroupBox 2.0 GroupBox.qml
ItemDelegate 6.0 ItemDelegate.qml
ItemDelegate 2.0 ItemDelegate.qml
Menu 6.0 Menu.qml
Menu 2.0 Menu.qml
MenuBar 6.0 MenuBar.qml
MenuBar 2.0 MenuBar.qml
MenuBarItem 6.0 MenuBarItem.qml
MenuBarItem 2.0 MenuBarItem.qml
MenuItem 6.0 MenuItem.qml
MenuItem 2.0 MenuItem.qml
MenuSeparator 6.0 MenuSeparator.qml
MenuSeparator 2.0 MenuSeparator.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
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
Switch 6.0 Switch.qml
Switch 2.0 Switch.qml
SwitchDelegate 6.0 SwitchDelegate.qml
SwitchDelegate 2.0 SwitchDelegate.qml
TextArea 6.0 TextArea.qml
TextArea 2.0 TextArea.qml
TextField 6.0 TextField.qml
TextField 2.0 TextField.qml
ScrollBar 6.0 ScrollBar.qml
ScrollBar 2.0 ScrollBar.qml
ScrollView 6.0 ScrollView.qml
ScrollView 2.0 ScrollView.qml
depends QtQuick