aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/default
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/default')
-rw-r--r--src/imports/controls/default/.prev_CMakeLists.txt308
-rw-r--r--src/imports/controls/default/AbstractButton.qml47
-rw-r--r--src/imports/controls/default/Action.qml40
-rw-r--r--src/imports/controls/default/ActionGroup.qml40
-rw-r--r--src/imports/controls/default/ApplicationWindow.qml47
-rw-r--r--src/imports/controls/default/BusyIndicator.qml63
-rw-r--r--src/imports/controls/default/Button.qml80
-rw-r--r--src/imports/controls/default/ButtonGroup.qml40
-rw-r--r--src/imports/controls/default/CMakeLists.txt308
-rw-r--r--src/imports/controls/default/CheckBox.qml93
-rw-r--r--src/imports/controls/default/CheckDelegate.qml110
-rw-r--r--src/imports/controls/default/ComboBox.qml142
-rw-r--r--src/imports/controls/default/Container.qml47
-rw-r--r--src/imports/controls/default/Control.qml47
-rw-r--r--src/imports/controls/default/DelayButton.qml105
-rw-r--r--src/imports/controls/default/Dial.qml80
-rw-r--r--src/imports/controls/default/Dialog.qml86
-rw-r--r--src/imports/controls/default/DialogButtonBox.qml72
-rw-r--r--src/imports/controls/default/Drawer.qml79
-rw-r--r--src/imports/controls/default/Frame.qml56
-rw-r--r--src/imports/controls/default/GroupBox.qml74
-rw-r--r--src/imports/controls/default/HorizontalHeaderView.qml68
-rw-r--r--src/imports/controls/default/ItemDelegate.qml77
-rw-r--r--src/imports/controls/default/Label.qml47
-rw-r--r--src/imports/controls/default/Menu.qml82
-rw-r--r--src/imports/controls/default/MenuBar.qml63
-rw-r--r--src/imports/controls/default/MenuBarItem.qml77
-rw-r--r--src/imports/controls/default/MenuItem.qml105
-rw-r--r--src/imports/controls/default/MenuSeparator.qml58
-rw-r--r--src/imports/controls/default/Page.qml57
-rw-r--r--src/imports/controls/default/PageIndicator.qml72
-rw-r--r--src/imports/controls/default/Pane.qml55
-rw-r--r--src/imports/controls/default/Popup.qml64
-rw-r--r--src/imports/controls/default/ProgressBar.qml67
-rw-r--r--src/imports/controls/default/RadioButton.qml86
-rw-r--r--src/imports/controls/default/RadioDelegate.qml103
-rw-r--r--src/imports/controls/default/RangeSlider.qml96
-rw-r--r--src/imports/controls/default/RoundButton.qml81
-rw-r--r--src/imports/controls/default/ScrollBar.qml76
-rw-r--r--src/imports/controls/default/ScrollIndicator.qml76
-rw-r--r--src/imports/controls/default/ScrollView.qml65
-rw-r--r--src/imports/controls/default/Slider.qml83
-rw-r--r--src/imports/controls/default/SpinBox.qml135
-rw-r--r--src/imports/controls/default/SplitView.qml55
-rw-r--r--src/imports/controls/default/StackView.qml67
-rw-r--r--src/imports/controls/default/SwipeDelegate.qml78
-rw-r--r--src/imports/controls/default/SwipeView.qml66
-rw-r--r--src/imports/controls/default/Switch.qml92
-rw-r--r--src/imports/controls/default/SwitchDelegate.qml109
-rw-r--r--src/imports/controls/default/TabBar.qml69
-rw-r--r--src/imports/controls/default/TabButton.qml73
-rw-r--r--src/imports/controls/default/TextArea.qml75
-rw-r--r--src/imports/controls/default/TextField.qml83
-rw-r--r--src/imports/controls/default/ToolBar.qml54
-rw-r--r--src/imports/controls/default/ToolButton.qml75
-rw-r--r--src/imports/controls/default/ToolSeparator.qml58
-rw-r--r--src/imports/controls/default/ToolTip.qml69
-rw-r--r--src/imports/controls/default/Tumbler.qml75
-rw-r--r--src/imports/controls/default/VerticalHeaderView.qml68
-rw-r--r--src/imports/controls/default/default.pri66
-rw-r--r--src/imports/controls/default/default.pro27
-rw-r--r--src/imports/controls/default/dependencies.json17
-rw-r--r--src/imports/controls/default/images/arrow-indicator.pngbin0 -> 169 bytes
-rw-r--r--src/imports/controls/default/images/arrow-indicator@2x.pngbin0 -> 225 bytes
-rw-r--r--src/imports/controls/default/images/arrow-indicator@3x.pngbin0 -> 285 bytes
-rw-r--r--src/imports/controls/default/images/arrow-indicator@4x.pngbin0 -> 352 bytes
-rw-r--r--src/imports/controls/default/images/check.pngbin0 -> 424 bytes
-rw-r--r--src/imports/controls/default/images/check@2x.pngbin0 -> 713 bytes
-rw-r--r--src/imports/controls/default/images/check@3x.pngbin0 -> 999 bytes
-rw-r--r--src/imports/controls/default/images/check@4x.pngbin0 -> 1188 bytes
-rw-r--r--src/imports/controls/default/images/dial-indicator.pngbin0 -> 185 bytes
-rw-r--r--src/imports/controls/default/images/dial-indicator@2x.pngbin0 -> 243 bytes
-rw-r--r--src/imports/controls/default/images/dial-indicator@3x.pngbin0 -> 284 bytes
-rw-r--r--src/imports/controls/default/images/dial-indicator@4x.pngbin0 -> 307 bytes
-rw-r--r--src/imports/controls/default/images/double-arrow.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/default/images/double-arrow@2x.pngbin0 -> 484 bytes
-rw-r--r--src/imports/controls/default/images/double-arrow@3x.pngbin0 -> 673 bytes
-rw-r--r--src/imports/controls/default/images/double-arrow@4x.pngbin0 -> 827 bytes
-rw-r--r--src/imports/controls/default/images/drop-indicator.pngbin0 -> 157 bytes
-rw-r--r--src/imports/controls/default/images/drop-indicator@2x.pngbin0 -> 226 bytes
-rw-r--r--src/imports/controls/default/images/drop-indicator@3x.pngbin0 -> 297 bytes
-rw-r--r--src/imports/controls/default/images/drop-indicator@4x.pngbin0 -> 376 bytes
-rw-r--r--src/imports/controls/default/impl/CMakeLists.txt44
-rw-r--r--src/imports/controls/default/impl/default-impl.pro30
-rw-r--r--src/imports/controls/default/impl/qmldir5
-rw-r--r--src/imports/controls/default/impl/qquickdefaultbusyindicator.cpp223
-rw-r--r--src/imports/controls/default/impl/qquickdefaultbusyindicator_p.h93
-rw-r--r--src/imports/controls/default/impl/qquickdefaultdial.cpp122
-rw-r--r--src/imports/controls/default/impl/qquickdefaultdial_p.h82
-rw-r--r--src/imports/controls/default/impl/qquickdefaultprogressbar.cpp280
-rw-r--r--src/imports/controls/default/impl/qquickdefaultprogressbar_p.h91
-rw-r--r--src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp57
-rw-r--r--src/imports/controls/default/qmldir132
-rw-r--r--src/imports/controls/default/qquickdefaultstyle.cpp246
-rw-r--r--src/imports/controls/default/qquickdefaultstyle_p.h151
-rw-r--r--src/imports/controls/default/qquickdefaulttheme.cpp89
-rw-r--r--src/imports/controls/default/qquickdefaulttheme_p.h65
-rw-r--r--src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp78
-rw-r--r--src/imports/controls/default/qtquickcontrols2defaultstyleplugin.qrc24
99 files changed, 6745 insertions, 0 deletions
diff --git a/src/imports/controls/default/.prev_CMakeLists.txt b/src/imports/controls/default/.prev_CMakeLists.txt
new file mode 100644
index 00000000..608f81b6
--- /dev/null
+++ b/src/imports/controls/default/.prev_CMakeLists.txt
@@ -0,0 +1,308 @@
+# Generated from default.pro.
+
+#####################################################################
+## qtquickcontrols2defaultstyleplugin Plugin:
+#####################################################################
+
+qt_add_qml_module(qtquickcontrols2defaultstyleplugin
+ URI "QtQuick.Controls.Default"
+ VERSION "${CMAKE_PROJECT_VERSION}"
+ CLASSNAME QtQuickControls2DefaultStylePlugin
+ DEPENDENCIES
+ QtQuick.Controls/2.5
+ GENERATE_QMLTYPES
+ SOURCES
+ qquickdefaultstyle.cpp qquickdefaultstyle_p.h
+ qquickdefaulttheme.cpp qquickdefaulttheme_p.h
+ qtquickcontrols2defaultstyleplugin.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::QmlPrivate
+ Qt::QuickControls2Private
+ Qt::QuickPrivate
+ Qt::QuickTemplates2Private
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+# Resources:
+set(qtquickcontrols2defaultstyleplugin_resource_files
+ "images/arrow-indicator.png"
+ "images/arrow-indicator@2x.png"
+ "images/arrow-indicator@3x.png"
+ "images/arrow-indicator@4x.png"
+ "images/check.png"
+ "images/check@2x.png"
+ "images/check@3x.png"
+ "images/check@4x.png"
+ "images/dial-indicator.png"
+ "images/dial-indicator@2x.png"
+ "images/dial-indicator@3x.png"
+ "images/dial-indicator@4x.png"
+ "images/double-arrow.png"
+ "images/double-arrow@2x.png"
+ "images/double-arrow@3x.png"
+ "images/double-arrow@4x.png"
+ "images/drop-indicator.png"
+ "images/drop-indicator@2x.png"
+ "images/drop-indicator@3x.png"
+ "images/drop-indicator@4x.png"
+)
+
+qt_add_resource(qtquickcontrols2defaultstyleplugin "qtquickcontrols2defaultstyleplugin"
+ PREFIX
+ "/qt-project.org/imports/QtQuick/Controls/Default"
+ FILES
+ ${qtquickcontrols2defaultstyleplugin_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:default.pro:<TRUE>:
+# OTHER_FILES = "qmldir" "$$QML_FILES"
+# QML_IMPORT_NAME = "QtQuick.Controls.Default"
+# QML_IMPORT_VERSION = "$$QT_VERSION"
+# TARGETPATH = "QtQuick/Controls/Default"
+# _REQUIREMENTS = "qtConfig(quickcontrols2-default)"
+
+set(qml_files
+ "AbstractButton.qml"
+ "Action.qml"
+ "ActionGroup.qml"
+ "ApplicationWindow.qml"
+ "BusyIndicator.qml"
+ "Button.qml"
+ "ButtonGroup.qml"
+ "CheckBox.qml"
+ "CheckDelegate.qml"
+ "ComboBox.qml"
+ "Container.qml"
+ "Control.qml"
+ "DelayButton.qml"
+ "Dial.qml"
+ "Dialog.qml"
+ "DialogButtonBox.qml"
+ "Drawer.qml"
+ "Frame.qml"
+ "GroupBox.qml"
+ "HorizontalHeaderView.qml"
+ "ItemDelegate.qml"
+ "Label.qml"
+ "Menu.qml"
+ "MenuBar.qml"
+ "MenuBarItem.qml"
+ "MenuItem.qml"
+ "MenuSeparator.qml"
+ "Page.qml"
+ "PageIndicator.qml"
+ "Pane.qml"
+ "Popup.qml"
+ "ProgressBar.qml"
+ "RadioButton.qml"
+ "RadioDelegate.qml"
+ "RangeSlider.qml"
+ "RoundButton.qml"
+ "ScrollBar.qml"
+ "ScrollIndicator.qml"
+ "ScrollView.qml"
+ "Slider.qml"
+ "SpinBox.qml"
+ "SplitView.qml"
+ "StackView.qml"
+ "SwipeDelegate.qml"
+ "Switch.qml"
+ "SwitchDelegate.qml"
+ "SwipeView.qml"
+ "TabBar.qml"
+ "TabButton.qml"
+ "TextArea.qml"
+ "TextField.qml"
+ "ToolBar.qml"
+ "ToolButton.qml"
+ "ToolSeparator.qml"
+ "ToolTip.qml"
+ "Tumbler.qml"
+ "VerticalHeaderView.qml"
+)
+set_source_files_properties(AbstractButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Action.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(ActionGroup.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(ApplicationWindow.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(BusyIndicator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Button.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ButtonGroup.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(CheckBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(CheckDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ComboBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Container.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Control.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(DelayButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.2;6.0"
+)
+set_source_files_properties(Dial.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Dialog.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(DialogButtonBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(Drawer.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Frame.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(GroupBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(HorizontalHeaderView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.15;6.0"
+)
+set_source_files_properties(ItemDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Label.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Menu.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(MenuBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(MenuBarItem.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(MenuItem.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(MenuSeparator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(Page.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(PageIndicator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Pane.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Popup.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ProgressBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RadioButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RadioDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RangeSlider.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RoundButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(ScrollBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ScrollIndicator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ScrollView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.2;6.0"
+)
+set_source_files_properties(Slider.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SpinBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SplitView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.13;6.0"
+)
+set_source_files_properties(StackView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SwipeDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Switch.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SwitchDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SwipeView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TabBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TabButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TextArea.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TextField.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ToolBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ToolButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ToolSeparator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(ToolTip.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Tumbler.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(VerticalHeaderView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.15;6.0"
+)
+
+qt6_target_qml_files(qtquickcontrols2defaultstyleplugin
+ FILES
+ ${qml_files}
+)
diff --git a/src/imports/controls/default/AbstractButton.qml b/src/imports/controls/default/AbstractButton.qml
new file mode 100644
index 00000000..a4855c21
--- /dev/null
+++ b/src/imports/controls/default/AbstractButton.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+T.AbstractButton {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+}
diff --git a/src/imports/controls/default/Action.qml b/src/imports/controls/default/Action.qml
new file mode 100644
index 00000000..bb66fc8f
--- /dev/null
+++ b/src/imports/controls/default/Action.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+T.Action { }
diff --git a/src/imports/controls/default/ActionGroup.qml b/src/imports/controls/default/ActionGroup.qml
new file mode 100644
index 00000000..70170f0e
--- /dev/null
+++ b/src/imports/controls/default/ActionGroup.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+T.ActionGroup { }
diff --git a/src/imports/controls/default/ApplicationWindow.qml b/src/imports/controls/default/ApplicationWindow.qml
new file mode 100644
index 00000000..b383139b
--- /dev/null
+++ b/src/imports/controls/default/ApplicationWindow.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ApplicationWindow {
+ id: window
+
+ color: window.palette.window
+}
diff --git a/src/imports/controls/default/BusyIndicator.qml b/src/imports/controls/default/BusyIndicator.qml
new file mode 100644
index 00000000..5db2a083
--- /dev/null
+++ b/src/imports/controls/default/BusyIndicator.qml
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.Default.impl
+import QtQuick.Templates as T
+
+T.BusyIndicator {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 6
+
+ contentItem: BusyIndicatorImpl {
+ implicitWidth: 48
+ implicitHeight: 48
+
+ pen: control.palette.dark
+ fill: control.palette.dark
+
+ running: control.running
+ opacity: control.running ? 1 : 0
+ Behavior on opacity { OpacityAnimator { duration: 250 } }
+ }
+}
diff --git a/src/imports/controls/default/Button.qml b/src/imports/controls/default/Button.qml
new file mode 100644
index 00000000..06d4e93f
--- /dev/null
+++ b/src/imports/controls/default/Button.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Button {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 6
+ horizontalPadding: padding + 2
+ spacing: 6
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: !control.flat || control.down || control.checked || control.highlighted
+ color: Color.blend(control.checked || control.highlighted ? control.palette.dark : control.palette.button,
+ control.palette.mid, control.down ? 0.5 : 0.0)
+ border.color: control.palette.highlight
+ border.width: control.visualFocus ? 2 : 0
+ }
+}
diff --git a/src/imports/controls/default/ButtonGroup.qml b/src/imports/controls/default/ButtonGroup.qml
new file mode 100644
index 00000000..fadc538a
--- /dev/null
+++ b/src/imports/controls/default/ButtonGroup.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+T.ButtonGroup { }
diff --git a/src/imports/controls/default/CMakeLists.txt b/src/imports/controls/default/CMakeLists.txt
new file mode 100644
index 00000000..336d04c9
--- /dev/null
+++ b/src/imports/controls/default/CMakeLists.txt
@@ -0,0 +1,308 @@
+# Generated from default.pro.
+
+#####################################################################
+## qtquickcontrols2defaultstyleplugin Plugin:
+#####################################################################
+
+qt_add_qml_module(qtquickcontrols2defaultstyleplugin
+ URI "QtQuick.Controls.Default"
+ VERSION "6.0" # special case
+ CLASSNAME QtQuickControls2DefaultStylePlugin
+ DEPENDENCIES
+ QtQuick.Controls/2.5
+ GENERATE_QMLTYPES
+ SOURCES
+ qquickdefaultstyle.cpp qquickdefaultstyle_p.h
+ qquickdefaulttheme.cpp qquickdefaulttheme_p.h
+ qtquickcontrols2defaultstyleplugin.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::QmlPrivate
+ Qt::QuickControls2Private
+ Qt::QuickPrivate
+ Qt::QuickTemplates2Private
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+# Resources:
+set(qtquickcontrols2defaultstyleplugin_resource_files
+ "images/arrow-indicator.png"
+ "images/arrow-indicator@2x.png"
+ "images/arrow-indicator@3x.png"
+ "images/arrow-indicator@4x.png"
+ "images/check.png"
+ "images/check@2x.png"
+ "images/check@3x.png"
+ "images/check@4x.png"
+ "images/dial-indicator.png"
+ "images/dial-indicator@2x.png"
+ "images/dial-indicator@3x.png"
+ "images/dial-indicator@4x.png"
+ "images/double-arrow.png"
+ "images/double-arrow@2x.png"
+ "images/double-arrow@3x.png"
+ "images/double-arrow@4x.png"
+ "images/drop-indicator.png"
+ "images/drop-indicator@2x.png"
+ "images/drop-indicator@3x.png"
+ "images/drop-indicator@4x.png"
+)
+
+qt_add_resource(qtquickcontrols2defaultstyleplugin "qtquickcontrols2defaultstyleplugin"
+ PREFIX
+ "/qt-project.org/imports/QtQuick/Controls/Default"
+ FILES
+ ${qtquickcontrols2defaultstyleplugin_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:default.pro:<TRUE>:
+# OTHER_FILES = "qmldir" "$$QML_FILES"
+# QML_IMPORT_NAME = "QtQuick.Controls.Default"
+# QML_IMPORT_VERSION = "$$QT_VERSION"
+# TARGETPATH = "QtQuick/Controls/Default"
+# _REQUIREMENTS = "qtConfig(quickcontrols2-default)"
+
+set(qml_files
+ "AbstractButton.qml"
+ "Action.qml"
+ "ActionGroup.qml"
+ "ApplicationWindow.qml"
+ "BusyIndicator.qml"
+ "Button.qml"
+ "ButtonGroup.qml"
+ "CheckBox.qml"
+ "CheckDelegate.qml"
+ "ComboBox.qml"
+ "Container.qml"
+ "Control.qml"
+ "DelayButton.qml"
+ "Dial.qml"
+ "Dialog.qml"
+ "DialogButtonBox.qml"
+ "Drawer.qml"
+ "Frame.qml"
+ "GroupBox.qml"
+ "HorizontalHeaderView.qml"
+ "ItemDelegate.qml"
+ "Label.qml"
+ "Menu.qml"
+ "MenuBar.qml"
+ "MenuBarItem.qml"
+ "MenuItem.qml"
+ "MenuSeparator.qml"
+ "Page.qml"
+ "PageIndicator.qml"
+ "Pane.qml"
+ "Popup.qml"
+ "ProgressBar.qml"
+ "RadioButton.qml"
+ "RadioDelegate.qml"
+ "RangeSlider.qml"
+ "RoundButton.qml"
+ "ScrollBar.qml"
+ "ScrollIndicator.qml"
+ "ScrollView.qml"
+ "Slider.qml"
+ "SpinBox.qml"
+ "SplitView.qml"
+ "StackView.qml"
+ "SwipeDelegate.qml"
+ "Switch.qml"
+ "SwitchDelegate.qml"
+ "SwipeView.qml"
+ "TabBar.qml"
+ "TabButton.qml"
+ "TextArea.qml"
+ "TextField.qml"
+ "ToolBar.qml"
+ "ToolButton.qml"
+ "ToolSeparator.qml"
+ "ToolTip.qml"
+ "Tumbler.qml"
+ "VerticalHeaderView.qml"
+)
+set_source_files_properties(AbstractButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Action.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(ActionGroup.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(ApplicationWindow.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(BusyIndicator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Button.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ButtonGroup.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(CheckBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(CheckDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ComboBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Container.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Control.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(DelayButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.2;6.0"
+)
+set_source_files_properties(Dial.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Dialog.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(DialogButtonBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(Drawer.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Frame.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(GroupBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(HorizontalHeaderView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.15;6.0"
+)
+set_source_files_properties(ItemDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Label.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Menu.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(MenuBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(MenuBarItem.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.3;6.0"
+)
+set_source_files_properties(MenuItem.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(MenuSeparator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(Page.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(PageIndicator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Pane.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Popup.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ProgressBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RadioButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RadioDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RangeSlider.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(RoundButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(ScrollBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ScrollIndicator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ScrollView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.2;6.0"
+)
+set_source_files_properties(Slider.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SpinBox.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SplitView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.13;6.0"
+)
+set_source_files_properties(StackView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SwipeDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Switch.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SwitchDelegate.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(SwipeView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TabBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TabButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TextArea.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(TextField.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ToolBar.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ToolButton.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(ToolSeparator.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.1;6.0"
+)
+set_source_files_properties(ToolTip.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(Tumbler.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.0;6.0"
+)
+set_source_files_properties(VerticalHeaderView.qml PROPERTIES
+ QT_QML_SOURCE_VERSION "2.15;6.0"
+)
+
+qt6_target_qml_files(qtquickcontrols2defaultstyleplugin
+ FILES
+ ${qml_files}
+)
diff --git a/src/imports/controls/default/CheckBox.qml b/src/imports/controls/default/CheckBox.qml
new file mode 100644
index 00000000..d9c92a56
--- /dev/null
+++ b/src/imports/controls/default/CheckBox.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.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: 6
+
+ // keep in sync with CheckDelegate.qml (shared CheckIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
+ 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
+
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ ColorImage {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ defaultColor: "#353637"
+ color: control.palette.text
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Default/images/check.png"
+ visible: control.checkState === Qt.Checked
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 16
+ height: 3
+ color: control.palette.text
+ visible: control.checkState === Qt.PartiallyChecked
+ }
+ }
+
+ contentItem: CheckLabel {
+ 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
+ }
+}
diff --git a/src/imports/controls/default/CheckDelegate.qml b/src/imports/controls/default/CheckDelegate.qml
new file mode 100644
index 00000000..3153bb3e
--- /dev/null
+++ b/src/imports/controls/default/CheckDelegate.qml
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.impl
+
+T.CheckDelegate {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding,
+ implicitIndicatorHeight + topPadding + bottomPadding)
+
+ padding: 12
+ spacing: 12
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ 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
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ // keep in sync with CheckBox.qml (shared CheckIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ ColorImage {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ defaultColor: "#353637"
+ color: control.palette.text
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Default/images/check.png"
+ visible: control.checkState === Qt.Checked
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 16
+ height: 3
+ color: control.palette.text
+ visible: control.checkState === Qt.PartiallyChecked
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? control.palette.midlight : control.palette.light
+ }
+}
diff --git a/src/imports/controls/default/ComboBox.qml b/src/imports/controls/default/ComboBox.qml
new file mode 100644
index 00000000..e1e60164
--- /dev/null
+++ b/src/imports/controls/default/ComboBox.qml
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+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)
+
+ delegate: ItemDelegate {
+ width: ListView.view.width
+ text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
+ 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
+ }
+
+ indicator: ColorImage {
+ x: control.mirrored ? control.padding : control.width - width - control.padding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ color: control.palette.dark
+ defaultColor: "#353637"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Default/images/double-arrow.png"
+ opacity: enabled ? 1 : 0.3
+ }
+
+ contentItem: T.TextField {
+ leftPadding: !control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1
+ rightPadding: control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1
+ topPadding: 6 - control.padding
+ bottomPadding: 6 - control.padding
+
+ 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
+
+ font: control.font
+ color: control.editable ? control.palette.text : control.palette.buttonText
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ verticalAlignment: Text.AlignVCenter
+
+ background: Rectangle {
+ visible: control.enabled && control.editable && !control.flat
+ border.width: parent && parent.activeFocus ? 2 : 1
+ border.color: parent && parent.activeFocus ? control.palette.highlight : control.palette.button
+ color: control.palette.base
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 140
+ implicitHeight: 40
+
+ color: control.down ? control.palette.mid : control.palette.button
+ border.color: control.palette.highlight
+ border.width: !control.editable && control.visualFocus ? 2 : 0
+ visible: !control.flat || control.down
+ }
+
+ popup: T.Popup {
+ y: control.height
+ width: control.width
+ 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
+ }
+ }
+}
diff --git a/src/imports/controls/default/Container.qml b/src/imports/controls/default/Container.qml
new file mode 100644
index 00000000..93919075
--- /dev/null
+++ b/src/imports/controls/default/Container.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+T.Container {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+}
diff --git a/src/imports/controls/default/Control.qml b/src/imports/controls/default/Control.qml
new file mode 100644
index 00000000..7a68a431
--- /dev/null
+++ b/src/imports/controls/default/Control.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+T.Control {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+}
diff --git a/src/imports/controls/default/DelayButton.qml b/src/imports/controls/default/DelayButton.qml
new file mode 100644
index 00000000..3dbed315
--- /dev/null
+++ b/src/imports/controls/default/DelayButton.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.DelayButton {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 6
+ horizontalPadding: padding + 2
+
+ transition: Transition {
+ NumberAnimation {
+ duration: control.delay * (control.pressed ? 1.0 - control.progress : 0.3 * control.progress)
+ }
+ }
+
+ contentItem: ItemGroup {
+ ClippedText {
+ clip: control.progress > 0
+ clipX: -control.leftPadding + control.progress * control.width
+ clipWidth: (1.0 - control.progress) * control.width
+ visible: control.progress < 1
+
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1 : 0.3
+ color: control.palette.buttonText
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+
+ ClippedText {
+ clip: control.progress > 0
+ clipX: -control.leftPadding
+ clipWidth: control.progress * control.width
+ visible: control.progress > 0
+
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1 : 0.3
+ color: control.palette.brightText
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ color: Color.blend(control.palette.button, control.palette.mid, control.down ? 0.5 : 0.0)
+ border.color: control.palette.highlight
+ border.width: control.visualFocus ? 2 : 0
+
+ PaddedRectangle {
+ padding: control.visualFocus ? 2 : 0
+ width: control.progress * parent.width
+ height: parent.height
+ color: Color.blend(control.palette.dark, control.palette.mid, control.down ? 0.5 : 0.0)
+ }
+ }
+}
diff --git a/src/imports/controls/default/Dial.qml b/src/imports/controls/default/Dial.qml
new file mode 100644
index 00000000..80f2bfb0
--- /dev/null
+++ b/src/imports/controls/default/Dial.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Controls.Default.impl
+import QtQuick.Templates as T
+
+T.Dial {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ background: DialImpl {
+ implicitWidth: 184
+ implicitHeight: 184
+ color: control.visualFocus ? control.palette.highlight : control.palette.dark
+ progress: control.position
+ opacity: control.enabled ? 1 : 0.3
+ }
+
+ handle: ColorImage {
+ x: control.background.x + control.background.width / 2 - width / 2
+ y: control.background.y + control.background.height / 2 - height / 2
+ width: 14
+ height: 10
+ defaultColor: "#353637"
+ color: control.visualFocus ? control.palette.highlight : control.palette.dark
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Default/images/dial-indicator.png"
+ antialiasing: true
+ opacity: control.enabled ? 1 : 0.3
+ transform: [
+ Translate {
+ y: -Math.min(control.background.width, control.background.height) * 0.4 + control.handle.height / 2
+ },
+ Rotation {
+ angle: control.angle
+ origin.x: control.handle.width / 2
+ origin.y: control.handle.height / 2
+ }
+ ]
+ }
+}
diff --git a/src/imports/controls/default/Dialog.qml b/src/imports/controls/default/Dialog.qml
new file mode 100644
index 00000000..254a6dcb
--- /dev/null
+++ b/src/imports/controls/default/Dialog.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.impl
+
+T.Dialog {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding,
+ implicitHeaderWidth,
+ implicitFooterWidth)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding
+ + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0)
+ + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0))
+
+ padding: 12
+
+ background: Rectangle {
+ color: control.palette.window
+ border.color: control.palette.dark
+ }
+
+ header: Label {
+ text: control.title
+ visible: control.title
+ elide: Label.ElideRight
+ font.bold: true
+ padding: 12
+ background: Rectangle {
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 1
+ color: control.palette.window
+ }
+ }
+
+ footer: DialogButtonBox {
+ visible: count > 0
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
+ }
+}
diff --git a/src/imports/controls/default/DialogButtonBox.qml b/src/imports/controls/default/DialogButtonBox.qml
new file mode 100644
index 00000000..e4cdbd14
--- /dev/null
+++ b/src/imports/controls/default/DialogButtonBox.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+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.contentWidth
+
+ spacing: 1
+ padding: 12
+ alignment: count === 1 ? Qt.AlignRight : undefined
+
+ delegate: Button {
+ width: control.count === 1 ? control.availableWidth / 2 : undefined
+ }
+
+ contentItem: ListView {
+ model: control.contentModel
+ spacing: control.spacing
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ snapMode: ListView.SnapToItem
+ }
+
+ background: Rectangle {
+ implicitHeight: 40
+ x: 1; y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ color: control.palette.window
+ }
+}
diff --git a/src/imports/controls/default/Drawer.qml b/src/imports/controls/default/Drawer.qml
new file mode 100644
index 00000000..719e5e1c
--- /dev/null
+++ b/src/imports/controls/default/Drawer.qml
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Drawer {
+ id: control
+
+ parent: T.Overlay.overlay
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ topPadding: control.edge === Qt.BottomEdge
+ leftPadding: control.edge === Qt.RightEdge
+ rightPadding: control.edge === Qt.LeftEdge
+ bottomPadding: control.edge === Qt.TopEdge
+
+ enter: Transition { SmoothedAnimation { velocity: 5 } }
+ exit: Transition { SmoothedAnimation { velocity: 5 } }
+
+ background: Rectangle {
+ color: control.palette.window
+ 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.palette.dark
+ x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0
+ y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
+ }
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
+ }
+}
diff --git a/src/imports/controls/default/Frame.qml b/src/imports/controls/default/Frame.qml
new file mode 100644
index 00000000..9696b5c9
--- /dev/null
+++ b/src/imports/controls/default/Frame.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Frame {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ padding: 12
+
+ background: Rectangle {
+ color: "transparent"
+ border.color: control.palette.mid
+ }
+}
diff --git a/src/imports/controls/default/GroupBox.qml b/src/imports/controls/default/GroupBox.qml
new file mode 100644
index 00000000..d6244113
--- /dev/null
+++ b/src/imports/controls/default/GroupBox.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.GroupBox {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding,
+ implicitLabelWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ spacing: 6
+ padding: 12
+ topPadding: padding + (implicitLabelWidth > 0 ? implicitLabelHeight + spacing : 0)
+
+ label: Text {
+ x: control.leftPadding
+ width: control.availableWidth
+
+ text: control.title
+ font: control.font
+ color: control.palette.windowText
+ elide: Text.ElideRight
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ y: control.topPadding - control.bottomPadding
+ width: parent.width
+ height: parent.height - control.topPadding + control.bottomPadding
+
+ color: "transparent"
+ border.color: control.palette.mid
+ }
+}
diff --git a/src/imports/controls/default/HorizontalHeaderView.qml b/src/imports/controls/default/HorizontalHeaderView.qml
new file mode 100644
index 00000000..093c868b
--- /dev/null
+++ b/src/imports/controls/default/HorizontalHeaderView.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Templates as T
+
+T.HorizontalHeaderView {
+ id: control
+
+ implicitWidth: syncView ? syncView.width : 0
+ implicitHeight: contentHeight
+
+ delegate: Rectangle {
+ // Qt6: add cellPadding (and font etc) as public API in headerview
+ readonly property real cellPadding: 8
+
+ implicitWidth: text.implicitWidth + (cellPadding * 2)
+ implicitHeight: Math.max(control.height, text.implicitHeight + (cellPadding * 2))
+ color: "#f6f6f6"
+ border.color: "#e4e4e4"
+
+ Text {
+ id: text
+ text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole]
+ : model[control.textRole])
+ : modelData
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/default/ItemDelegate.qml b/src/imports/controls/default/ItemDelegate.qml
new file mode 100644
index 00000000..1183eb2b
--- /dev/null
+++ b/src/imports/controls/default/ItemDelegate.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ItemDelegate {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding,
+ implicitIndicatorHeight + topPadding + bottomPadding)
+
+ padding: 12
+ spacing: 8
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ 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
+ text: control.text
+ font: control.font
+ color: control.highlighted ? control.palette.highlightedText : control.palette.text
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted || control.visualFocus
+ color: Color.blend(control.down ? control.palette.midlight : control.palette.light,
+ control.palette.highlight, control.visualFocus ? 0.15 : 0.0)
+ }
+}
diff --git a/src/imports/controls/default/Label.qml b/src/imports/controls/default/Label.qml
new file mode 100644
index 00000000..6d0aca41
--- /dev/null
+++ b/src/imports/controls/default/Label.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Label {
+ id: control
+
+ color: control.palette.windowText
+ linkColor: control.palette.link
+}
diff --git a/src/imports/controls/default/Menu.qml b/src/imports/controls/default/Menu.qml
new file mode 100644
index 00000000..91384e4f
--- /dev/null
+++ b/src/imports/controls/default/Menu.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+import QtQuick.Window
+
+T.Menu {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ margins: 0
+ overlap: 1
+
+ delegate: MenuItem { }
+
+ contentItem: ListView {
+ implicitHeight: contentHeight
+ model: control.contentModel
+ interactive: Window.window
+ ? contentHeight + control.topPadding + control.bottomPadding > Window.window.height
+ : false
+ clip: true
+ currentIndex: control.currentIndex
+
+ ScrollIndicator.vertical: ScrollIndicator {}
+ }
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 40
+ color: control.palette.window
+ border.color: control.palette.dark
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
+ }
+}
diff --git a/src/imports/controls/default/MenuBar.qml b/src/imports/controls/default/MenuBar.qml
new file mode 100644
index 00000000..9745a52d
--- /dev/null
+++ b/src/imports/controls/default/MenuBar.qml
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.impl
+
+T.MenuBar {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ delegate: MenuBarItem { }
+
+ contentItem: Row {
+ spacing: control.spacing
+ Repeater {
+ model: control.contentModel
+ }
+ }
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: control.palette.button
+ }
+}
diff --git a/src/imports/controls/default/MenuBarItem.qml b/src/imports/controls/default/MenuBarItem.qml
new file mode 100644
index 00000000..b2771a3c
--- /dev/null
+++ b/src/imports/controls/default/MenuBarItem.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+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)
+
+ spacing: 6
+ padding: 6
+ leftPadding: 12
+ rightPadding: 16
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.buttonText
+
+ 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.buttonText
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+ color: control.down || control.highlighted ? control.palette.mid : "transparent"
+ }
+}
diff --git a/src/imports/controls/default/MenuItem.qml b/src/imports/controls/default/MenuItem.qml
new file mode 100644
index 00000000..fc2d434f
--- /dev/null
+++ b/src/imports/controls/default/MenuItem.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+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: 6
+ spacing: 6
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.windowText
+
+ 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
+ text: control.text
+ font: control.font
+ color: control.palette.windowText
+ }
+
+ indicator: ColorImage {
+ x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ visible: control.checked
+ source: control.checkable ? "qrc:/qt-project.org/imports/QtQuick/Controls/Default/images/check.png" : ""
+ color: control.palette.windowText
+ defaultColor: "#353637"
+ }
+
+ 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
+ source: control.subMenu ? "qrc:/qt-project.org/imports/QtQuick/Controls/Default/images/arrow-indicator.png" : ""
+ color: control.palette.windowText
+ defaultColor: "#353637"
+ }
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 40
+ x: 1
+ y: 1
+ width: control.width - 2
+ height: control.height - 2
+ color: control.down ? control.palette.midlight : control.highlighted ? control.palette.light : "transparent"
+ }
+}
diff --git a/src/imports/controls/default/MenuSeparator.qml b/src/imports/controls/default/MenuSeparator.qml
new file mode 100644
index 00000000..d503aecd
--- /dev/null
+++ b/src/imports/controls/default/MenuSeparator.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+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)
+
+ padding: 2
+ verticalPadding: padding + 4
+
+ contentItem: Rectangle {
+ implicitWidth: 188
+ implicitHeight: 1
+ color: control.palette.mid
+ }
+}
diff --git a/src/imports/controls/default/Page.qml b/src/imports/controls/default/Page.qml
new file mode 100644
index 00000000..2fec37f0
--- /dev/null
+++ b/src/imports/controls/default/Page.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Page {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding,
+ implicitHeaderWidth,
+ implicitFooterWidth)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding
+ + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0)
+ + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0))
+
+ background: Rectangle {
+ color: control.palette.window
+ }
+}
diff --git a/src/imports/controls/default/PageIndicator.qml b/src/imports/controls/default/PageIndicator.qml
new file mode 100644
index 00000000..3942f54f
--- /dev/null
+++ b/src/imports/controls/default/PageIndicator.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.PageIndicator {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 6
+ spacing: 6
+
+ delegate: Rectangle {
+ implicitWidth: 8
+ implicitHeight: 8
+
+ radius: width / 2
+ color: control.palette.dark
+
+ opacity: index === currentIndex ? 0.95 : pressed ? 0.7 : 0.45
+ Behavior on opacity { OpacityAnimator { duration: 100 } }
+ }
+
+ contentItem: Row {
+ spacing: control.spacing
+
+ Repeater {
+ model: control.count
+ delegate: control.delegate
+ }
+ }
+}
diff --git a/src/imports/controls/default/Pane.qml b/src/imports/controls/default/Pane.qml
new file mode 100644
index 00000000..221819d4
--- /dev/null
+++ b/src/imports/controls/default/Pane.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Pane {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ padding: 12
+
+ background: Rectangle {
+ color: control.palette.window
+ }
+}
diff --git a/src/imports/controls/default/Popup.qml b/src/imports/controls/default/Popup.qml
new file mode 100644
index 00000000..71372107
--- /dev/null
+++ b/src/imports/controls/default/Popup.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Popup {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ padding: 12
+
+ background: Rectangle {
+ color: control.palette.window
+ border.color: control.palette.dark
+ }
+
+ T.Overlay.modal: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.5)
+ }
+
+ T.Overlay.modeless: Rectangle {
+ color: Color.transparent(control.palette.shadow, 0.12)
+ }
+}
diff --git a/src/imports/controls/default/ProgressBar.qml b/src/imports/controls/default/ProgressBar.qml
new file mode 100644
index 00000000..56739f4f
--- /dev/null
+++ b/src/imports/controls/default/ProgressBar.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.Default.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: 6
+ implicitWidth: 116
+ scale: control.mirrored ? -1 : 1
+ progress: control.position
+ indeterminate: control.visible && control.indeterminate
+ color: control.palette.dark
+ }
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 6
+ y: (control.height - height) / 2
+ height: 6
+
+ color: control.palette.midlight
+ }
+}
diff --git a/src/imports/controls/default/RadioButton.qml b/src/imports/controls/default/RadioButton.qml
new file mode 100644
index 00000000..02b2f627
--- /dev/null
+++ b/src/imports/controls/default/RadioButton.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+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: 6
+
+ // keep in sync with RadioDelegate.qml (shared RadioIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
+ 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
+
+ radius: width / 2
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 20
+ height: 20
+ radius: width / 2
+ color: control.palette.text
+ visible: control.checked
+ }
+ }
+
+ contentItem: CheckLabel {
+ 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
+ }
+}
diff --git a/src/imports/controls/default/RadioDelegate.qml b/src/imports/controls/default/RadioDelegate.qml
new file mode 100644
index 00000000..dc998363
--- /dev/null
+++ b/src/imports/controls/default/RadioDelegate.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.RadioDelegate {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding,
+ implicitIndicatorHeight + topPadding + bottomPadding)
+
+ padding: 12
+ spacing: 12
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ 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
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ // keep in sync with RadioButton.qml (shared RadioIndicator.qml was removed for performance reasons)
+ indicator: Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ radius: width / 2
+ color: control.down ? control.palette.light : control.palette.base
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.palette.mid
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 20
+ height: 20
+ radius: width / 2
+ color: control.palette.text
+ visible: control.checked
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? control.palette.midlight : control.palette.light
+ }
+}
diff --git a/src/imports/controls/default/RangeSlider.qml b/src/imports/controls/default/RangeSlider.qml
new file mode 100644
index 00000000..1132a78b
--- /dev/null
+++ b/src/imports/controls/default/RangeSlider.qml
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+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 {
+ 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))
+ implicitWidth: 28
+ implicitHeight: 28
+ radius: width / 2
+ border.width: activeFocus ? 2 : 1
+ border.color: activeFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+ color: control.first.pressed ? control.palette.light : control.palette.window
+ }
+
+ second.handle: Rectangle {
+ 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))
+ implicitWidth: 28
+ implicitHeight: 28
+ radius: width / 2
+ border.width: activeFocus ? 2 : 1
+ border.color: activeFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+ color: control.second.pressed ? control.palette.light : control.palette.window
+ }
+
+ background: Rectangle {
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ implicitWidth: control.horizontal ? 200 : 6
+ implicitHeight: control.horizontal ? 6 : 200
+ width: control.horizontal ? control.availableWidth : implicitWidth
+ height: control.horizontal ? implicitHeight : control.availableHeight
+ radius: 3
+ color: control.palette.midlight
+ scale: control.horizontal && control.mirrored ? -1 : 1
+
+ Rectangle {
+ x: control.horizontal ? control.first.position * parent.width + 3 : 0
+ y: control.horizontal ? 0 : control.second.visualPosition * parent.height + 3
+ width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 6 : 6
+ height: control.horizontal ? 6 : control.second.position * parent.height - control.first.position * parent.height - 6
+
+ color: control.palette.dark
+ }
+ }
+}
diff --git a/src/imports/controls/default/RoundButton.qml b/src/imports/controls/default/RoundButton.qml
new file mode 100644
index 00000000..9445ecdf
--- /dev/null
+++ b/src/imports/controls/default/RoundButton.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.RoundButton {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.checked || control.highlighted ? control.palette.brightText :
+ control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+ radius: control.radius
+ opacity: enabled ? 1 : 0.3
+ visible: !control.flat || control.down || control.checked || control.highlighted
+ color: Color.blend(control.checked || control.highlighted ? control.palette.dark : control.palette.button,
+ control.palette.mid, control.down ? 0.5 : 0.0)
+ border.color: control.palette.highlight
+ border.width: control.visualFocus ? 2 : 0
+ }
+}
diff --git a/src/imports/controls/default/ScrollBar.qml b/src/imports/controls/default/ScrollBar.qml
new file mode 100644
index 00000000..1652ea81
--- /dev/null
+++ b/src/imports/controls/default/ScrollBar.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ScrollBar {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 2
+ visible: control.policy !== T.ScrollBar.AlwaysOff
+ minimumSize: orientation == Qt.Horizontal ? height / width : width / height
+
+ contentItem: Rectangle {
+ implicitWidth: control.interactive ? 6 : 2
+ implicitHeight: control.interactive ? 6 : 2
+
+ radius: width / 2
+ color: control.pressed ? control.palette.dark : control.palette.mid
+ opacity: 0.0
+
+ states: State {
+ name: "active"
+ when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0)
+ PropertyChanges { target: control.contentItem; opacity: 0.75 }
+ }
+
+ transitions: Transition {
+ from: "active"
+ SequentialAnimation {
+ PauseAnimation { duration: 450 }
+ NumberAnimation { target: control.contentItem; duration: 200; property: "opacity"; to: 0.0 }
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/default/ScrollIndicator.qml b/src/imports/controls/default/ScrollIndicator.qml
new file mode 100644
index 00000000..4f3ece0c
--- /dev/null
+++ b/src/imports/controls/default/ScrollIndicator.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+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 { target: control.contentItem; opacity: 0.75 }
+ }
+
+ transitions: [
+ Transition {
+ from: "active"
+ SequentialAnimation {
+ PauseAnimation { duration: 450 }
+ NumberAnimation { target: control.contentItem; duration: 200; property: "opacity"; to: 0.0 }
+ }
+ }
+ ]
+ }
+}
diff --git a/src/imports/controls/default/ScrollView.qml b/src/imports/controls/default/ScrollView.qml
new file mode 100644
index 00000000..76094c6c
--- /dev/null
+++ b/src/imports/controls/default/ScrollView.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ScrollView {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + 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
+ }
+}
diff --git a/src/imports/controls/default/Slider.qml b/src/imports/controls/default/Slider.qml
new file mode 100644
index 00000000..cdd72b76
--- /dev/null
+++ b/src/imports/controls/default/Slider.qml
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Slider {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitHandleWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitHandleHeight + topPadding + bottomPadding)
+
+ padding: 6
+
+ handle: Rectangle {
+ 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))
+ implicitWidth: 28
+ implicitHeight: 28
+ radius: width / 2
+ color: control.pressed ? control.palette.light : control.palette.window
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+ }
+
+ background: Rectangle {
+ x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2)
+ y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0)
+ implicitWidth: control.horizontal ? 200 : 6
+ implicitHeight: control.horizontal ? 6 : 200
+ width: control.horizontal ? control.availableWidth : implicitWidth
+ height: control.horizontal ? implicitHeight : control.availableHeight
+ radius: 3
+ color: control.palette.midlight
+ scale: control.horizontal && control.mirrored ? -1 : 1
+
+ Rectangle {
+ y: control.horizontal ? 0 : control.visualPosition * parent.height
+ width: control.horizontal ? control.position * parent.width : 6
+ height: control.horizontal ? 6 : control.position * parent.height
+
+ radius: 3
+ color: control.palette.dark
+ }
+ }
+}
diff --git a/src/imports/controls/default/SpinBox.qml b/src/imports/controls/default/SpinBox.qml
new file mode 100644
index 00000000..46eca36e
--- /dev/null
+++ b/src/imports/controls/default/SpinBox.qml
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.SpinBox {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentItem.implicitWidth + 2 * padding +
+ up.implicitIndicatorWidth +
+ down.implicitIndicatorWidth)
+ implicitHeight: Math.max(implicitContentHeight + topPadding + bottomPadding,
+ implicitBackgroundHeight,
+ up.implicitIndicatorHeight,
+ down.implicitIndicatorHeight)
+
+ padding: 6
+ 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))
+
+ validator: IntValidator {
+ locale: control.locale.name
+ bottom: Math.min(control.from, control.to)
+ top: Math.max(control.from, control.to)
+ }
+
+ contentItem: TextInput {
+ z: 2
+ text: control.displayText
+
+ font: control.font
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
+
+ readOnly: !control.editable
+ validator: control.validator
+ inputMethodHints: control.inputMethodHints
+
+ Rectangle {
+ x: -6 - (control.down.indicator ? 1 : 0)
+ y: -6
+ width: control.width - (control.up.indicator ? control.up.indicator.width - 1 : 0) - (control.down.indicator ? control.down.indicator.width - 1 : 0)
+ height: control.height
+ visible: control.activeFocus
+ color: "transparent"
+ border.color: control.palette.highlight
+ border.width: 2
+ }
+ }
+
+ up.indicator: Rectangle {
+ x: control.mirrored ? 0 : parent.width - width
+ height: parent.height
+ implicitWidth: 40
+ implicitHeight: 40
+ color: control.up.pressed ? control.palette.mid : control.palette.button
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: parent.width / 3
+ height: 2
+ color: enabled ? control.palette.buttonText : control.palette.mid
+ }
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 2
+ height: parent.width / 3
+ color: enabled ? control.palette.buttonText : control.palette.mid
+ }
+ }
+
+ down.indicator: Rectangle {
+ x: control.mirrored ? parent.width - width : 0
+ height: parent.height
+ implicitWidth: 40
+ implicitHeight: 40
+ color: control.down.pressed ? control.palette.mid : control.palette.button
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: parent.width / 3
+ height: 2
+ color: enabled ? control.palette.buttonText : control.palette.mid
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 140
+ color: enabled ? control.palette.base : control.palette.button
+ border.color: control.palette.button
+ }
+}
diff --git a/src/imports/controls/default/SplitView.qml b/src/imports/controls/default/SplitView.qml
new file mode 100644
index 00000000..020d07ea
--- /dev/null
+++ b/src/imports/controls/default/SplitView.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.impl
+
+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.palette.mid
+ : (T.SplitHandle.hovered ? control.palette.midlight : control.palette.button)
+ }
+}
diff --git a/src/imports/controls/default/StackView.qml b/src/imports/controls/default/StackView.qml
new file mode 100644
index 00000000..3b388e46
--- /dev/null
+++ b/src/imports/controls/default/StackView.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Templates as T
+
+T.StackView {
+ id: control
+
+ popEnter: Transition {
+ XAnimator { from: (control.mirrored ? -1 : 1) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ popExit: Transition {
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * control.width; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ pushEnter: Transition {
+ XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ pushExit: Transition {
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ replaceEnter: Transition {
+ XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ }
+
+ replaceExit: Transition {
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
+ }
+}
diff --git a/src/imports/controls/default/SwipeDelegate.qml b/src/imports/controls/default/SwipeDelegate.qml
new file mode 100644
index 00000000..ff56f6f0
--- /dev/null
+++ b/src/imports/controls/default/SwipeDelegate.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.SwipeDelegate {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding,
+ implicitIndicatorHeight + topPadding + bottomPadding)
+
+ padding: 12
+ spacing: 12
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ 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
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ color: Color.blend(control.down ? control.palette.midlight : control.palette.light,
+ control.palette.highlight, control.visualFocus ? 0.15 : 0.0)
+ }
+}
diff --git a/src/imports/controls/default/SwipeView.qml b/src/imports/controls/default/SwipeView.qml
new file mode 100644
index 00000000..7fb8d449
--- /dev/null
+++ b/src/imports/controls/default/SwipeView.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Templates as T
+
+T.SwipeView {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ contentItem: ListView {
+ model: control.contentModel
+ interactive: control.interactive
+ currentIndex: control.currentIndex
+ focus: control.focus
+
+ spacing: control.spacing
+ orientation: control.orientation
+ snapMode: ListView.SnapOneItem
+ boundsBehavior: Flickable.StopAtBounds
+
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ preferredHighlightBegin: 0
+ preferredHighlightEnd: 0
+ highlightMoveDuration: 250
+ maximumFlickVelocity: 4 * (control.orientation === Qt.Horizontal ? width : height)
+ }
+}
diff --git a/src/imports/controls/default/Switch.qml b/src/imports/controls/default/Switch.qml
new file mode 100644
index 00000000..12420bed
--- /dev/null
+++ b/src/imports/controls/default/Switch.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.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
+
+ indicator: PaddedRectangle {
+ implicitWidth: 56
+ implicitHeight: 28
+
+ 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
+
+ radius: 8
+ leftPadding: 0
+ rightPadding: 0
+ padding: (height - 16) / 2
+ color: control.checked ? control.palette.dark : control.palette.midlight
+
+ Rectangle {
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 28
+ height: 28
+ radius: 16
+ color: control.down ? control.palette.light : control.palette.window
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+ }
+
+ contentItem: CheckLabel {
+ 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
+ }
+}
diff --git a/src/imports/controls/default/SwitchDelegate.qml b/src/imports/controls/default/SwitchDelegate.qml
new file mode 100644
index 00000000..e2a9f7b5
--- /dev/null
+++ b/src/imports/controls/default/SwitchDelegate.qml
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+import QtQuick.Controls.impl
+
+T.SwitchDelegate {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding,
+ implicitIndicatorHeight + topPadding + bottomPadding)
+
+ padding: 12
+ spacing: 12
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
+ indicator: PaddedRectangle {
+ implicitWidth: 56
+ implicitHeight: 28
+
+ 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
+
+ radius: 8
+ leftPadding: 0
+ rightPadding: 0
+ padding: (height - 16) / 2
+ color: control.checked ? control.palette.dark : control.palette.midlight
+
+ Rectangle {
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 28
+ height: 28
+ radius: 16
+ color: control.down ? control.palette.light : control.palette.window
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+ }
+
+ contentItem: IconLabel {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ 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
+ text: control.text
+ font: control.font
+ color: control.palette.text
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? control.palette.midlight : control.palette.light
+ }
+}
diff --git a/src/imports/controls/default/TabBar.qml b/src/imports/controls/default/TabBar.qml
new file mode 100644
index 00000000..f1b11ac2
--- /dev/null
+++ b/src/imports/controls/default/TabBar.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Templates as T
+
+T.TabBar {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ spacing: 1
+
+ contentItem: ListView {
+ model: control.contentModel
+ currentIndex: control.currentIndex
+
+ spacing: control.spacing
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ flickableDirection: Flickable.AutoFlickIfNeeded
+ snapMode: ListView.SnapToItem
+
+ highlightMoveDuration: 0
+ highlightRangeMode: ListView.ApplyRange
+ preferredHighlightBegin: 40
+ preferredHighlightEnd: width - 40
+ }
+
+ background: Rectangle {
+ color: control.palette.window
+ }
+}
diff --git a/src/imports/controls/default/TabButton.qml b/src/imports/controls/default/TabButton.qml
new file mode 100644
index 00000000..0935d463
--- /dev/null
+++ b/src/imports/controls/default/TabButton.qml
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.TabButton {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: checked ? control.palette.windowText : control.palette.brightText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.checked ? control.palette.windowText : control.palette.brightText
+ }
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: Color.blend(control.checked ? control.palette.window : control.palette.dark,
+ control.palette.mid, control.down ? 0.5 : 0.0)
+ }
+}
diff --git a/src/imports/controls/default/TextArea.qml b/src/imports/controls/default/TextArea.qml
new file mode 100644
index 00000000..e6a1509e
--- /dev/null
+++ b/src/imports/controls/default/TextArea.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+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)
+
+ padding: 6
+ leftPadding: padding + 4
+
+ color: control.palette.text
+ placeholderTextColor: Color.transparent(control.color, 0.5)
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+
+ 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
+ verticalAlignment: control.verticalAlignment
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ elide: Text.ElideRight
+ renderType: control.renderType
+ }
+}
diff --git a/src/imports/controls/default/TextField.qml b/src/imports/controls/default/TextField.qml
new file mode 100644
index 00000000..2c69d351
--- /dev/null
+++ b/src/imports/controls/default/TextField.qml
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+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)
+
+ padding: 6
+ leftPadding: padding + 4
+
+ color: control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
+ placeholderTextColor: Color.transparent(control.color, 0.5)
+ verticalAlignment: TextInput.AlignVCenter
+
+ 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
+ verticalAlignment: control.verticalAlignment
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ elide: Text.ElideRight
+ renderType: control.renderType
+ }
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 40
+ border.width: control.activeFocus ? 2 : 1
+ color: control.palette.base
+ border.color: control.activeFocus ? control.palette.highlight : control.palette.mid
+ }
+}
diff --git a/src/imports/controls/default/ToolBar.qml b/src/imports/controls/default/ToolBar.qml
new file mode 100644
index 00000000..6f5e54e6
--- /dev/null
+++ b/src/imports/controls/default/ToolBar.qml
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ToolBar {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: control.palette.button
+ }
+}
diff --git a/src/imports/controls/default/ToolButton.qml b/src/imports/controls/default/ToolButton.qml
new file mode 100644
index 00000000..63b40233
--- /dev/null
+++ b/src/imports/controls/default/ToolButton.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ToolButton {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: 6
+ spacing: 6
+
+ icon.width: 24
+ icon.height: 24
+ icon.color: visualFocus ? control.palette.highlight : control.palette.buttonText
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.visualFocus ? control.palette.highlight : control.palette.buttonText
+ }
+
+ background: Rectangle {
+ implicitWidth: 40
+ implicitHeight: 40
+
+ opacity: control.down ? 1.0 : 0.5
+ color: control.down || control.checked || control.highlighted ? control.palette.mid : control.palette.button
+ }
+}
diff --git a/src/imports/controls/default/ToolSeparator.qml b/src/imports/controls/default/ToolSeparator.qml
new file mode 100644
index 00000000..e6d6a7f7
--- /dev/null
+++ b/src/imports/controls/default/ToolSeparator.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ToolSeparator {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ padding: vertical ? 6 : 2
+ verticalPadding: vertical ? 2 : 6
+
+ contentItem: Rectangle {
+ implicitWidth: vertical ? 1 : 30
+ implicitHeight: vertical ? 30 : 1
+ color: control.palette.mid
+ }
+}
diff --git a/src/imports/controls/default/ToolTip.qml b/src/imports/controls/default/ToolTip.qml
new file mode 100644
index 00000000..933b7400
--- /dev/null
+++ b/src/imports/controls/default/ToolTip.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.ToolTip {
+ id: control
+
+ x: parent ? (parent.width - implicitWidth) / 2 : 0
+ y: -implicitHeight - 3
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ margins: 6
+ padding: 6
+
+ closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ wrapMode: Text.Wrap
+ color: control.palette.toolTipText
+ }
+
+ background: Rectangle {
+ border.color: control.palette.dark
+ color: control.palette.toolTipBase
+ }
+}
diff --git a/src/imports/controls/default/Tumbler.qml b/src/imports/controls/default/Tumbler.qml
new file mode 100644
index 00000000..89f7f056
--- /dev/null
+++ b/src/imports/controls/default/Tumbler.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Controls.impl
+import QtQuick.Templates as T
+
+T.Tumbler {
+ id: control
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ delegate: Text {
+ text: modelData
+ color: control.visualFocus ? control.palette.highlight : control.palette.text
+ font: control.font
+ opacity: 1.0 - Math.abs(Tumbler.displacement) / (control.visibleItemCount / 2)
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ contentItem: TumblerView {
+ implicitWidth: 60
+ implicitHeight: 200
+ model: control.model
+ delegate: control.delegate
+ path: Path {
+ startX: control.contentItem.width / 2
+ startY: -control.contentItem.delegateHeight / 2
+ PathLine {
+ x: control.contentItem.width / 2
+ y: (control.visibleItemCount + 1) * control.contentItem.delegateHeight - control.contentItem.delegateHeight / 2
+ }
+ }
+
+ property real delegateHeight: control.availableHeight / control.visibleItemCount
+ }
+}
diff --git a/src/imports/controls/default/VerticalHeaderView.qml b/src/imports/controls/default/VerticalHeaderView.qml
new file mode 100644
index 00000000..21e39c39
--- /dev/null
+++ b/src/imports/controls/default/VerticalHeaderView.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Templates as T
+
+T.VerticalHeaderView {
+ id: control
+
+ implicitWidth: contentWidth
+ implicitHeight: syncView ? syncView.height : 0
+
+ delegate: Rectangle {
+ // Qt6: add cellPadding (and font etc) as public API in headerview
+ readonly property real cellPadding: 8
+
+ implicitWidth: Math.max(control.width, text.implicitWidth + (cellPadding * 2))
+ implicitHeight: text.implicitHeight + (cellPadding * 2)
+ color: "#f6f6f6"
+ border.color: "#e4e4e4"
+
+ Text {
+ id: text
+ text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole]
+ : model[control.textRole])
+ : modelData
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/default/default.pri b/src/imports/controls/default/default.pri
new file mode 100644
index 00000000..e7147af4
--- /dev/null
+++ b/src/imports/controls/default/default.pri
@@ -0,0 +1,66 @@
+HEADERS += \
+ $$PWD/qquickdefaultstyle_p.h \
+ $$PWD/qquickdefaulttheme_p.h
+
+SOURCES += \
+ $$PWD/qquickdefaultstyle.cpp \
+ $$PWD/qquickdefaulttheme.cpp
+
+QML_FILES += \
+ $$PWD/AbstractButton.qml \
+ $$PWD/Action.qml \
+ $$PWD/ActionGroup.qml \
+ $$PWD/ApplicationWindow.qml \
+ $$PWD/BusyIndicator.qml \
+ $$PWD/Button.qml \
+ $$PWD/ButtonGroup.qml \
+ $$PWD/CheckBox.qml \
+ $$PWD/CheckDelegate.qml \
+ $$PWD/ComboBox.qml \
+ $$PWD/Container.qml \
+ $$PWD/Control.qml \
+ $$PWD/DelayButton.qml \
+ $$PWD/Dial.qml \
+ $$PWD/Dialog.qml \
+ $$PWD/DialogButtonBox.qml \
+ $$PWD/Drawer.qml \
+ $$PWD/Frame.qml \
+ $$PWD/GroupBox.qml \
+ $$PWD/HorizontalHeaderView.qml \
+ $$PWD/ItemDelegate.qml \
+ $$PWD/Label.qml \
+ $$PWD/Menu.qml \
+ $$PWD/MenuBar.qml \
+ $$PWD/MenuBarItem.qml \
+ $$PWD/MenuItem.qml \
+ $$PWD/MenuSeparator.qml \
+ $$PWD/Page.qml \
+ $$PWD/PageIndicator.qml \
+ $$PWD/Pane.qml \
+ $$PWD/Popup.qml \
+ $$PWD/ProgressBar.qml \
+ $$PWD/RadioButton.qml \
+ $$PWD/RadioDelegate.qml \
+ $$PWD/RangeSlider.qml \
+ $$PWD/RoundButton.qml \
+ $$PWD/ScrollBar.qml \
+ $$PWD/ScrollIndicator.qml \
+ $$PWD/ScrollView.qml \
+ $$PWD/Slider.qml \
+ $$PWD/SpinBox.qml \
+ $$PWD/SplitView.qml \
+ $$PWD/StackView.qml \
+ $$PWD/SwipeDelegate.qml \
+ $$PWD/Switch.qml \
+ $$PWD/SwitchDelegate.qml \
+ $$PWD/SwipeView.qml \
+ $$PWD/TabBar.qml \
+ $$PWD/TabButton.qml \
+ $$PWD/TextArea.qml \
+ $$PWD/TextField.qml \
+ $$PWD/ToolBar.qml \
+ $$PWD/ToolButton.qml \
+ $$PWD/ToolSeparator.qml \
+ $$PWD/ToolTip.qml \
+ $$PWD/Tumbler.qml \
+ $$PWD/VerticalHeaderView.qml
diff --git a/src/imports/controls/default/default.pro b/src/imports/controls/default/default.pro
new file mode 100644
index 00000000..5ecaafce
--- /dev/null
+++ b/src/imports/controls/default/default.pro
@@ -0,0 +1,27 @@
+TARGET = qtquickcontrols2defaultstyleplugin
+TARGETPATH = QtQuick/Controls/Default
+
+QML_IMPORT_NAME = QtQuick.Controls.Default
+QML_IMPORT_VERSION = $$QT_VERSION
+
+QT += qml quick
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+include(default.pri)
+
+OTHER_FILES += \
+ qmldir \
+ $$QML_FILES
+
+SOURCES += \
+ $$PWD/qtquickcontrols2defaultstyleplugin.cpp
+
+RESOURCES += \
+ $$PWD/qtquickcontrols2defaultstyleplugin.qrc
+
+CONFIG += qmltypes no_cxx_module install_qml_files builtin_resources qtquickcompiler
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-default))
diff --git a/src/imports/controls/default/dependencies.json b/src/imports/controls/default/dependencies.json
new file mode 100644
index 00000000..78029004
--- /dev/null
+++ b/src/imports/controls/default/dependencies.json
@@ -0,0 +1,17 @@
+[
+ {
+ "name": "QtQuick",
+ "type": "module",
+ "version": "2.11"
+ },
+ {
+ "name": "QtQuick.Window",
+ "type": "module",
+ "version": "2.2"
+ },
+ {
+ "name": "QtQuick.Templates",
+ "type": "module",
+ "version": "2.5"
+ }
+]
diff --git a/src/imports/controls/default/images/arrow-indicator.png b/src/imports/controls/default/images/arrow-indicator.png
new file mode 100644
index 00000000..d833d52c
--- /dev/null
+++ b/src/imports/controls/default/images/arrow-indicator.png
Binary files differ
diff --git a/src/imports/controls/default/images/arrow-indicator@2x.png b/src/imports/controls/default/images/arrow-indicator@2x.png
new file mode 100644
index 00000000..55c7940a
--- /dev/null
+++ b/src/imports/controls/default/images/arrow-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/default/images/arrow-indicator@3x.png b/src/imports/controls/default/images/arrow-indicator@3x.png
new file mode 100644
index 00000000..c7067c5c
--- /dev/null
+++ b/src/imports/controls/default/images/arrow-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/default/images/arrow-indicator@4x.png b/src/imports/controls/default/images/arrow-indicator@4x.png
new file mode 100644
index 00000000..4c5cf351
--- /dev/null
+++ b/src/imports/controls/default/images/arrow-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/default/images/check.png b/src/imports/controls/default/images/check.png
new file mode 100644
index 00000000..479a8442
--- /dev/null
+++ b/src/imports/controls/default/images/check.png
Binary files differ
diff --git a/src/imports/controls/default/images/check@2x.png b/src/imports/controls/default/images/check@2x.png
new file mode 100644
index 00000000..79663c0b
--- /dev/null
+++ b/src/imports/controls/default/images/check@2x.png
Binary files differ
diff --git a/src/imports/controls/default/images/check@3x.png b/src/imports/controls/default/images/check@3x.png
new file mode 100644
index 00000000..fd0135ab
--- /dev/null
+++ b/src/imports/controls/default/images/check@3x.png
Binary files differ
diff --git a/src/imports/controls/default/images/check@4x.png b/src/imports/controls/default/images/check@4x.png
new file mode 100644
index 00000000..e7e0b640
--- /dev/null
+++ b/src/imports/controls/default/images/check@4x.png
Binary files differ
diff --git a/src/imports/controls/default/images/dial-indicator.png b/src/imports/controls/default/images/dial-indicator.png
new file mode 100644
index 00000000..92357c51
--- /dev/null
+++ b/src/imports/controls/default/images/dial-indicator.png
Binary files differ
diff --git a/src/imports/controls/default/images/dial-indicator@2x.png b/src/imports/controls/default/images/dial-indicator@2x.png
new file mode 100644
index 00000000..f436443b
--- /dev/null
+++ b/src/imports/controls/default/images/dial-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/default/images/dial-indicator@3x.png b/src/imports/controls/default/images/dial-indicator@3x.png
new file mode 100644
index 00000000..d883045b
--- /dev/null
+++ b/src/imports/controls/default/images/dial-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/default/images/dial-indicator@4x.png b/src/imports/controls/default/images/dial-indicator@4x.png
new file mode 100644
index 00000000..79477712
--- /dev/null
+++ b/src/imports/controls/default/images/dial-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/default/images/double-arrow.png b/src/imports/controls/default/images/double-arrow.png
new file mode 100644
index 00000000..3ecd7f89
--- /dev/null
+++ b/src/imports/controls/default/images/double-arrow.png
Binary files differ
diff --git a/src/imports/controls/default/images/double-arrow@2x.png b/src/imports/controls/default/images/double-arrow@2x.png
new file mode 100644
index 00000000..eeb03e28
--- /dev/null
+++ b/src/imports/controls/default/images/double-arrow@2x.png
Binary files differ
diff --git a/src/imports/controls/default/images/double-arrow@3x.png b/src/imports/controls/default/images/double-arrow@3x.png
new file mode 100644
index 00000000..f0662d20
--- /dev/null
+++ b/src/imports/controls/default/images/double-arrow@3x.png
Binary files differ
diff --git a/src/imports/controls/default/images/double-arrow@4x.png b/src/imports/controls/default/images/double-arrow@4x.png
new file mode 100644
index 00000000..10891e91
--- /dev/null
+++ b/src/imports/controls/default/images/double-arrow@4x.png
Binary files differ
diff --git a/src/imports/controls/default/images/drop-indicator.png b/src/imports/controls/default/images/drop-indicator.png
new file mode 100644
index 00000000..80c1d958
--- /dev/null
+++ b/src/imports/controls/default/images/drop-indicator.png
Binary files differ
diff --git a/src/imports/controls/default/images/drop-indicator@2x.png b/src/imports/controls/default/images/drop-indicator@2x.png
new file mode 100644
index 00000000..6e0f228c
--- /dev/null
+++ b/src/imports/controls/default/images/drop-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/default/images/drop-indicator@3x.png b/src/imports/controls/default/images/drop-indicator@3x.png
new file mode 100644
index 00000000..199752fb
--- /dev/null
+++ b/src/imports/controls/default/images/drop-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/default/images/drop-indicator@4x.png b/src/imports/controls/default/images/drop-indicator@4x.png
new file mode 100644
index 00000000..58311fbe
--- /dev/null
+++ b/src/imports/controls/default/images/drop-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/default/impl/CMakeLists.txt b/src/imports/controls/default/impl/CMakeLists.txt
new file mode 100644
index 00000000..d90ef86b
--- /dev/null
+++ b/src/imports/controls/default/impl/CMakeLists.txt
@@ -0,0 +1,44 @@
+# Generated from default-impl.pro.
+
+#####################################################################
+## qtquickcontrols2defaultstyleimplplugin Plugin:
+#####################################################################
+
+qt_add_qml_module(qtquickcontrols2defaultstyleimplplugin
+ URI "QtQuick.Controls.Default.impl"
+ VERSION "${CMAKE_PROJECT_VERSION}"
+ CLASSNAME QtQuickControls2DefaultStyleImplPlugin
+ DEPENDENCIES
+ QtQuick.Templates/6.0
+ QtQuick.Controls/6.0
+ SKIP_TYPE_REGISTRATION
+ GENERATE_QMLTYPES
+ SOURCES
+ qquickdefaultbusyindicator.cpp qquickdefaultbusyindicator_p.h
+ qquickdefaultdial.cpp qquickdefaultdial_p.h
+ qquickdefaultprogressbar.cpp qquickdefaultprogressbar_p.h
+ qtquickcontrols2defaultstyleimplplugin.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::QmlPrivate
+ Qt::QuickControls2ImplPrivate
+ Qt::QuickPrivate
+ Qt::QuickTemplates2Private
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+#### Keys ignored in scope 1:.:.:default-impl.pro:<TRUE>:
+# OTHER_FILES = "qmldir"
+# QML_IMPORT_NAME = "QtQuick.Controls.Default.impl"
+# QML_IMPORT_VERSION = "$$QT_VERSION"
+# QT_FOR_CONFIG = "quickcontrols2-private"
+# TARGETPATH = "QtQuick/Controls/Default/impl"
+# _REQUIREMENTS = "qtConfig(quickcontrols2-default)"
diff --git a/src/imports/controls/default/impl/default-impl.pro b/src/imports/controls/default/impl/default-impl.pro
new file mode 100644
index 00000000..e26ae9ff
--- /dev/null
+++ b/src/imports/controls/default/impl/default-impl.pro
@@ -0,0 +1,30 @@
+TARGET = qtquickcontrols2defaultstyleimplplugin
+TARGETPATH = QtQuick/Controls/Default/impl
+
+QML_IMPORT_NAME = QtQuick.Controls.Default.impl
+QML_IMPORT_VERSION = $$QT_VERSION
+
+QT += qml quick
+QT_PRIVATE += core-private gui qml-private quick-private quicktemplates2-private quickcontrols2impl-private
+QT_FOR_CONFIG = quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+OTHER_FILES += \
+ qmldir
+
+HEADERS += \
+ $$PWD/qquickdefaultbusyindicator_p.h \
+ $$PWD/qquickdefaultdial_p.h \
+ $$PWD/qquickdefaultprogressbar_p.h
+
+SOURCES += \
+ $$PWD/qquickdefaultbusyindicator.cpp \
+ $$PWD/qquickdefaultdial.cpp \
+ $$PWD/qquickdefaultprogressbar.cpp \
+ $$PWD/qtquickcontrols2defaultstyleimplplugin.cpp
+
+CONFIG += qmltypes install_qmltypes no_cxx_module
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-default))
diff --git a/src/imports/controls/default/impl/qmldir b/src/imports/controls/default/impl/qmldir
new file mode 100644
index 00000000..95deed07
--- /dev/null
+++ b/src/imports/controls/default/impl/qmldir
@@ -0,0 +1,5 @@
+module QtQuick.Controls.Default.impl
+plugin qtquickcontrols2defaultstyleimplplugin
+classname QtQuickControls2DefaultStyleImplPlugin
+depends QtQuick.Templates 6.0
+depends QtQuick.Controls 6.0
diff --git a/src/imports/controls/default/impl/qquickdefaultbusyindicator.cpp b/src/imports/controls/default/impl/qquickdefaultbusyindicator.cpp
new file mode 100644
index 00000000..880d869b
--- /dev/null
+++ b/src/imports/controls/default/impl/qquickdefaultbusyindicator.cpp
@@ -0,0 +1,223 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickdefaultbusyindicator_p.h"
+
+#include <QtQuick/private/qquickitem_p.h>
+#include <QtQuick/private/qsgadaptationlayer_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
+
+QT_BEGIN_NAMESPACE
+
+static const int CircleCount = 10;
+static const int TotalDuration = 100 * CircleCount * 2;
+static const QRgb TransparentColor = 0x00000000;
+
+static QPointF moveCircle(const QPointF &pos, qreal rotation, qreal distance)
+{
+ return pos - QTransform().rotate(rotation).map(QPointF(0, distance));
+}
+
+class QQuickDefaultBusyIndicatorNode : public QQuickAnimatedNode
+{
+public:
+ QQuickDefaultBusyIndicatorNode(QQuickDefaultBusyIndicator *item);
+
+ void updateCurrentTime(int time) override;
+ void sync(QQuickItem *item) override;
+
+private:
+ QColor m_pen;
+ QColor m_fill;
+};
+
+QQuickDefaultBusyIndicatorNode::QQuickDefaultBusyIndicatorNode(QQuickDefaultBusyIndicator *item)
+ : QQuickAnimatedNode(item)
+{
+ setLoopCount(Infinite);
+ setDuration(TotalDuration);
+ setCurrentTime(item->elapsed());
+
+ for (int i = 0; i < CircleCount; ++i) {
+ QSGTransformNode *transformNode = new QSGTransformNode;
+ appendChildNode(transformNode);
+
+ QQuickItemPrivate *d = QQuickItemPrivate::get(item);
+ QSGInternalRectangleNode *rectNode = d->sceneGraphContext()->createInternalRectangleNode();
+ rectNode->setAntialiasing(true);
+ transformNode->appendChildNode(rectNode);
+ }
+}
+
+void QQuickDefaultBusyIndicatorNode::updateCurrentTime(int time)
+{
+ const qreal percentageComplete = time / qreal(TotalDuration);
+ const qreal firstPhaseProgress = percentageComplete <= 0.5 ? percentageComplete * 2 : 0;
+ const qreal secondPhaseProgress = percentageComplete > 0.5 ? (percentageComplete - 0.5) * 2 : 0;
+
+ QSGTransformNode *transformNode = static_cast<QSGTransformNode*>(firstChild());
+ Q_ASSERT(transformNode->type() == QSGNode::TransformNodeType);
+ for (int i = 0; i < CircleCount; ++i) {
+ QSGInternalRectangleNode *rectNode = static_cast<QSGInternalRectangleNode*>(transformNode->firstChild());
+ Q_ASSERT(rectNode->type() == QSGNode::GeometryNodeType);
+
+ const bool fill = (firstPhaseProgress > qreal(i) / CircleCount) || (secondPhaseProgress > 0 && secondPhaseProgress < qreal(i) / CircleCount);
+ rectNode->setColor(fill ? m_fill : QColor::fromRgba(TransparentColor));
+ rectNode->setPenColor(m_pen);
+ rectNode->setPenWidth(1);
+ rectNode->update();
+
+ transformNode = static_cast<QSGTransformNode*>(transformNode->nextSibling());
+ }
+}
+
+void QQuickDefaultBusyIndicatorNode::sync(QQuickItem *item)
+{
+ const qreal w = item->width();
+ const qreal h = item->height();
+ const qreal sz = qMin(w, h);
+ const qreal dx = (w - sz) / 2;
+ const qreal dy = (h - sz) / 2;
+ const int circleRadius = sz / 12;
+
+ m_pen = static_cast<QQuickDefaultBusyIndicator *>(item)->pen();
+ m_fill = static_cast<QQuickDefaultBusyIndicator *>(item)->fill();
+
+ QSGTransformNode *transformNode = static_cast<QSGTransformNode *>(firstChild());
+ for (int i = 0; i < CircleCount; ++i) {
+ Q_ASSERT(transformNode->type() == QSGNode::TransformNodeType);
+
+ QSGInternalRectangleNode *rectNode = static_cast<QSGInternalRectangleNode *>(transformNode->firstChild());
+ Q_ASSERT(rectNode->type() == QSGNode::GeometryNodeType);
+
+ QPointF pos = QPointF(sz / 2 - circleRadius, sz / 2 - circleRadius);
+ pos = moveCircle(pos, 360.0 / CircleCount * i, sz / 2 - circleRadius);
+
+ QMatrix4x4 m;
+ m.translate(dx + pos.x(), dy + pos.y());
+ transformNode->setMatrix(m);
+
+ rectNode->setRect(QRectF(QPointF(), QSizeF(circleRadius * 2, circleRadius * 2)));
+ rectNode->setRadius(circleRadius);
+
+ transformNode = static_cast<QSGTransformNode *>(transformNode->nextSibling());
+ }
+}
+
+QQuickDefaultBusyIndicator::QQuickDefaultBusyIndicator(QQuickItem *parent) :
+ QQuickItem(parent)
+{
+ setFlag(ItemHasContents);
+}
+
+QColor QQuickDefaultBusyIndicator::pen() const
+{
+ return m_pen;
+}
+
+void QQuickDefaultBusyIndicator::setPen(const QColor &pen)
+{
+ if (pen == m_pen)
+ return;
+
+ m_pen = pen;
+ update();
+}
+
+QColor QQuickDefaultBusyIndicator::fill() const
+{
+ return m_fill;
+}
+
+void QQuickDefaultBusyIndicator::setFill(const QColor &fill)
+{
+ if (fill == m_fill)
+ return;
+
+ m_fill = fill;
+ update();
+}
+
+bool QQuickDefaultBusyIndicator::isRunning() const
+{
+ return isVisible();
+}
+
+void QQuickDefaultBusyIndicator::setRunning(bool running)
+{
+ if (running)
+ setVisible(true);
+}
+
+int QQuickDefaultBusyIndicator::elapsed() const
+{
+ return m_elapsed;
+}
+
+void QQuickDefaultBusyIndicator::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data)
+{
+ QQuickItem::itemChange(change, data);
+ switch (change) {
+ case ItemOpacityHasChanged:
+ if (qFuzzyIsNull(data.realValue))
+ setVisible(false);
+ break;
+ case ItemVisibleHasChanged:
+ update();
+ break;
+ default:
+ break;
+ }
+}
+
+QSGNode *QQuickDefaultBusyIndicator::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *)
+{
+ QQuickDefaultBusyIndicatorNode *node = static_cast<QQuickDefaultBusyIndicatorNode *>(oldNode);
+ if (isRunning() && width() > 0 && height() > 0) {
+ if (!node) {
+ node = new QQuickDefaultBusyIndicatorNode(this);
+ node->start();
+ }
+ node->sync(this);
+ } else {
+ m_elapsed = node ? node->currentTime() : 0;
+ delete node;
+ node = nullptr;
+ }
+ return node;
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/default/impl/qquickdefaultbusyindicator_p.h b/src/imports/controls/default/impl/qquickdefaultbusyindicator_p.h
new file mode 100644
index 00000000..5cd60ff5
--- /dev/null
+++ b/src/imports/controls/default/impl/qquickdefaultbusyindicator_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKDEFAULTBUSYINDICATOR_P_H
+#define QQUICKDEFAULTBUSYINDICATOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/qquickitem.h>
+#include <QtGui/qcolor.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickDefaultBusyIndicator : public QQuickItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor pen READ pen WRITE setPen FINAL)
+ Q_PROPERTY(QColor fill READ fill WRITE setFill FINAL)
+ Q_PROPERTY(bool running READ isRunning WRITE setRunning)
+ QML_NAMED_ELEMENT(BusyIndicatorImpl)
+ QML_ADDED_IN_VERSION(2, 0)
+
+public:
+ explicit QQuickDefaultBusyIndicator(QQuickItem *parent = nullptr);
+
+ QColor pen() const;
+ void setPen(const QColor &pen);
+
+ QColor fill() const;
+ void setFill(const QColor &fill);
+
+ bool isRunning() const;
+ void setRunning(bool running);
+
+ int elapsed() const;
+
+protected:
+ void itemChange(ItemChange change, const ItemChangeData &data) override;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
+
+private:
+ int m_elapsed = 0;
+ QColor m_pen;
+ QColor m_fill;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickDefaultBusyIndicator)
+
+#endif // QQUICKDEFAULTBUSYINDICATOR_P_H
diff --git a/src/imports/controls/default/impl/qquickdefaultdial.cpp b/src/imports/controls/default/impl/qquickdefaultdial.cpp
new file mode 100644
index 00000000..1653def7
--- /dev/null
+++ b/src/imports/controls/default/impl/qquickdefaultdial.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickdefaultdial_p.h"
+
+#include <QtCore/qmath.h>
+#include <QtGui/qpainter.h>
+#include <QtQuick/private/qquickitem_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickDefaultDial::QQuickDefaultDial(QQuickItem *parent) :
+ QQuickPaintedItem(parent)
+{
+}
+
+qreal QQuickDefaultDial::progress() const
+{
+ return m_progress;
+}
+
+void QQuickDefaultDial::setProgress(qreal progress)
+{
+ if (progress == m_progress)
+ return;
+
+ m_progress = progress;
+ update();
+}
+
+QColor QQuickDefaultDial::color() const
+{
+ return m_color;
+}
+
+void QQuickDefaultDial::setColor(const QColor &color)
+{
+ if (color == m_color)
+ return;
+
+ m_color = color;
+ update();
+}
+
+void QQuickDefaultDial::paint(QPainter *painter)
+{
+ if (width() <= 0 || height() <= 0)
+ return;
+
+ QPen pen(m_color);
+ pen.setWidth(8);
+ pen.setCapStyle(Qt::FlatCap);
+ painter->setPen(pen);
+
+ const QRectF bounds = boundingRect();
+ const qreal smallest = qMin(bounds.width(), bounds.height());
+ QRectF rect = QRectF(pen.widthF() / 2.0 + 1, pen.widthF() / 2.0 + 1, smallest - pen.widthF() - 2, smallest - pen.widthF() - 2);
+ rect.moveCenter(bounds.center());
+
+ // Make sure the arc is aligned to whole pixels.
+ if (rect.x() - int(rect.x()) > 0)
+ rect.setX(qCeil(rect.x()));
+ if (rect.y() - int(rect.y()) > 0)
+ rect.setY(qCeil(rect.y()));
+ if (rect.width() - int(rect.width()) > 0)
+ rect.setWidth(qFloor(rect.width()));
+ if (rect.height() - int(rect.height()) > 0)
+ rect.setHeight(qFloor(rect.height()));
+
+ painter->setRenderHint(QPainter::Antialiasing);
+
+ const qreal startAngle = (140 + 90);
+ const qreal spanAngle = (m_progress * 280) * -1;
+ QPainterPath path;
+ path.arcMoveTo(rect, startAngle);
+ path.arcTo(rect, startAngle, spanAngle);
+ painter->drawPath(path);
+
+ rect.adjust(-pen.widthF() / 2.0, -pen.widthF() / 2.0, pen.widthF() / 2.0, pen.widthF() / 2.0);
+ pen.setWidth(1);
+ painter->setPen(pen);
+
+ path = QPainterPath();
+ path.arcMoveTo(rect, 0);
+ path.arcTo(rect, 0, 360);
+ painter->drawPath(path);
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/default/impl/qquickdefaultdial_p.h b/src/imports/controls/default/impl/qquickdefaultdial_p.h
new file mode 100644
index 00000000..7cdc5e9a
--- /dev/null
+++ b/src/imports/controls/default/impl/qquickdefaultdial_p.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKDEFAULTDIAL_P_H
+#define QQUICKDEFAULTDIAL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qcolor.h>
+#include <QtQuick/qquickpainteditem.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickDefaultDial : public QQuickPaintedItem
+{
+ Q_OBJECT
+ Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ QML_NAMED_ELEMENT(DialImpl)
+ QML_ADDED_IN_VERSION(2, 0)
+
+public:
+ explicit QQuickDefaultDial(QQuickItem *parent = nullptr);
+
+ qreal progress() const;
+ void setProgress(qreal progress);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ void paint(QPainter *painter) override;
+
+private:
+ qreal m_progress = 0;
+ QColor m_color = Qt::black;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKDEFAULTDIAL_P_H
diff --git a/src/imports/controls/default/impl/qquickdefaultprogressbar.cpp b/src/imports/controls/default/impl/qquickdefaultprogressbar.cpp
new file mode 100644
index 00000000..fcaada94
--- /dev/null
+++ b/src/imports/controls/default/impl/qquickdefaultprogressbar.cpp
@@ -0,0 +1,280 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickdefaultprogressbar_p.h"
+
+#include <QtCore/qeasingcurve.h>
+#include <QtQuick/private/qquickitem_p.h>
+#include <QtQuick/private/qsgadaptationlayer_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
+
+QT_BEGIN_NAMESPACE
+
+static const int Blocks = 4;
+static const int BlockWidth = 16;
+static const int BlockRestingSpacing = 4;
+static const int BlockMovingSpacing = 48;
+static const int BlockSpan = Blocks * (BlockWidth + BlockRestingSpacing) - BlockRestingSpacing;
+static const int TotalDuration = 4000;
+static const int SecondPhaseStart = TotalDuration * 0.4;
+static const int ThirdPhaseStart = TotalDuration * 0.6;
+
+static inline qreal blockStartX(int blockIndex)
+{
+ return ((blockIndex + 1) * -BlockWidth) - (blockIndex * BlockMovingSpacing);
+}
+
+static inline qreal blockRestX(int blockIndex, qreal availableWidth)
+{
+ const qreal spanRightEdgePos = availableWidth / 2 + BlockSpan / 2.0;
+ return spanRightEdgePos - (blockIndex + 1) * BlockWidth - (blockIndex * BlockRestingSpacing);
+}
+
+static inline qreal blockEndX(int blockIndex, qreal availableWidth)
+{
+ return availableWidth - blockStartX(Blocks - 1 - blockIndex) - BlockWidth;
+}
+
+class QQuickDefaultProgressBarNode : public QQuickAnimatedNode
+{
+public:
+ QQuickDefaultProgressBarNode(QQuickDefaultProgressBar *item);
+
+ void updateCurrentTime(int time) override;
+ void sync(QQuickItem *item) override;
+
+private:
+ bool m_indeterminate = false;
+ qreal m_pixelsPerSecond = 0;
+};
+
+QQuickDefaultProgressBarNode::QQuickDefaultProgressBarNode(QQuickDefaultProgressBar *item)
+ : QQuickAnimatedNode(item),
+ m_pixelsPerSecond(item->width())
+{
+ setLoopCount(Infinite);
+ setDuration(TotalDuration);
+}
+
+void QQuickDefaultProgressBarNode::updateCurrentTime(int time)
+{
+ QSGTransformNode *transformNode = static_cast<QSGTransformNode*>(firstChild());
+ for (int i = 0; i < Blocks; ++i) {
+ Q_ASSERT(transformNode->type() == QSGNode::TransformNodeType);
+
+ QMatrix4x4 m;
+ const qreal restX = blockRestX(i, m_pixelsPerSecond);
+ const qreal timeInSeconds = time / 1000.0;
+
+ if (time < SecondPhaseStart) {
+ // Move into the resting position for the first phase.
+ QEasingCurve easingCurve(QEasingCurve::InQuad);
+ const qreal easedCompletion = easingCurve.valueForProgress(time / qreal(SecondPhaseStart));
+ const qreal distance = m_pixelsPerSecond * (easedCompletion * (SecondPhaseStart / 1000.0));
+ const qreal position = blockStartX(i) + distance;
+ const qreal destination = restX;
+ m.translate(qMin(position, destination), 0);
+ } else if (time < ThirdPhaseStart) {
+ // Stay in the same position for the second phase.
+ m.translate(restX, 0);
+ } else {
+ // Move out of view for the third phase.
+ const int thirdPhaseSubKickoff = (BlockMovingSpacing / m_pixelsPerSecond) * 1000;
+ const int subphase = (time - ThirdPhaseStart) / thirdPhaseSubKickoff;
+ // If we're not at this subphase yet, don't try to animate movement,
+ // because it will be incorrect.
+ if (subphase < i)
+ return;
+
+ const qreal timeSinceSecondPhase = timeInSeconds - (ThirdPhaseStart / 1000.0);
+ // We only want to start keeping track of time once our subphase has started,
+ // otherwise we move too much because we account for time that has already elapsed.
+ // For example, if we were 60 milliseconds into the third subphase:
+ //
+ // 0 ..... 1 ..... 2 ...
+ // 100 100 60
+ //
+ // i == 0, timeSinceOurKickoff == 260
+ // i == 1, timeSinceOurKickoff == 160
+ // i == 2, timeSinceOurKickoff == 60
+ const qreal timeSinceOurKickoff = timeSinceSecondPhase - (thirdPhaseSubKickoff / 1000.0 * i);
+ const qreal position = restX + (m_pixelsPerSecond * (timeSinceOurKickoff));
+ const qreal destination = blockEndX(i, m_pixelsPerSecond);
+ m.translate(qMin(position, destination), 0);
+ }
+
+ transformNode->setMatrix(m);
+
+ transformNode = static_cast<QSGTransformNode*>(transformNode->nextSibling());
+ }
+}
+
+void QQuickDefaultProgressBarNode::sync(QQuickItem *item)
+{
+ QQuickDefaultProgressBar *bar = static_cast<QQuickDefaultProgressBar *>(item);
+ if (m_indeterminate != bar->isIndeterminate()) {
+ m_indeterminate = bar->isIndeterminate();
+ if (m_indeterminate)
+ start();
+ else
+ stop();
+ }
+ m_pixelsPerSecond = item->width();
+
+ QQuickItemPrivate *d = QQuickItemPrivate::get(item);
+
+ QMatrix4x4 m;
+ m.translate(0, (item->height() - item->implicitHeight()) / 2);
+ setMatrix(m);
+
+ if (m_indeterminate) {
+ if (childCount() != Blocks) {
+ // This was previously a regular progress bar; remove the old nodes.
+ removeAllChildNodes();
+ }
+
+ QSGTransformNode *transformNode = static_cast<QSGTransformNode*>(firstChild());
+ for (int i = 0; i < Blocks; ++i) {
+ if (!transformNode) {
+ transformNode = new QSGTransformNode;
+ appendChildNode(transformNode);
+ }
+
+ QSGInternalRectangleNode *rectNode = static_cast<QSGInternalRectangleNode*>(transformNode->firstChild());
+ if (!rectNode) {
+ rectNode = d->sceneGraphContext()->createInternalRectangleNode();
+ rectNode->setColor(bar->color());
+ transformNode->appendChildNode(rectNode);
+ }
+
+ QMatrix4x4 m;
+ m.translate(blockStartX(i), 0);
+ transformNode->setMatrix(m);
+
+ rectNode->setRect(QRectF(QPointF(0, 0), QSizeF(BlockWidth, item->implicitHeight())));
+ rectNode->update();
+
+ transformNode = static_cast<QSGTransformNode *>(transformNode->nextSibling());
+ }
+ } else {
+ if (childCount() > 1) {
+ // This was previously an indeterminate progress bar; remove the old nodes.
+ removeAllChildNodes();
+ }
+
+ QSGInternalRectangleNode *rectNode = static_cast<QSGInternalRectangleNode *>(firstChild());
+ if (!rectNode) {
+ rectNode = d->sceneGraphContext()->createInternalRectangleNode();
+ rectNode->setColor(bar->color());
+ appendChildNode(rectNode);
+ }
+
+ rectNode->setRect(QRectF(QPointF(0, 0), QSizeF(bar->progress() * item->width(), item->implicitHeight())));
+ rectNode->update();
+ }
+}
+
+QQuickDefaultProgressBar::QQuickDefaultProgressBar(QQuickItem *parent) :
+ QQuickItem(parent)
+{
+ setFlag(ItemHasContents);
+}
+
+qreal QQuickDefaultProgressBar::progress() const
+{
+ return m_progress;
+}
+
+void QQuickDefaultProgressBar::setProgress(qreal progress)
+{
+ if (progress == m_progress)
+ return;
+
+ m_progress = progress;
+ update();
+}
+
+bool QQuickDefaultProgressBar::isIndeterminate() const
+{
+ return m_indeterminate;
+}
+
+void QQuickDefaultProgressBar::setIndeterminate(bool indeterminate)
+{
+ if (indeterminate == m_indeterminate)
+ return;
+
+ m_indeterminate = indeterminate;
+ setClip(m_indeterminate);
+ update();
+}
+
+QColor QQuickDefaultProgressBar::color() const
+{
+ return m_color;
+}
+
+void QQuickDefaultProgressBar::setColor(const QColor &color)
+{
+ if (color == m_color)
+ return;
+
+ m_color = color;
+ update();
+}
+
+void QQuickDefaultProgressBar::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data)
+{
+ QQuickItem::itemChange(change, data);
+ if (change == ItemVisibleHasChanged)
+ update();
+}
+
+QSGNode *QQuickDefaultProgressBar::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *)
+{
+ QQuickDefaultProgressBarNode *node = static_cast<QQuickDefaultProgressBarNode *>(oldNode);
+ if (isVisible() && width() > 0 && height() > 0) {
+ if (!node)
+ node = new QQuickDefaultProgressBarNode(this);
+ node->sync(this);
+ } else {
+ delete node;
+ node = nullptr;
+ }
+ return node;
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/default/impl/qquickdefaultprogressbar_p.h b/src/imports/controls/default/impl/qquickdefaultprogressbar_p.h
new file mode 100644
index 00000000..3e4955c4
--- /dev/null
+++ b/src/imports/controls/default/impl/qquickdefaultprogressbar_p.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKDEFAULTPROGRESSBAR_P_H
+#define QQUICKDEFAULTPROGRESSBAR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQuick/qquickitem.h>
+#include <QtGui/qcolor.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickDefaultProgressBar : public QQuickItem
+{
+ Q_OBJECT
+ Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL)
+ Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ QML_NAMED_ELEMENT(ProgressBarImpl)
+ QML_ADDED_IN_VERSION(2, 0)
+
+public:
+ explicit QQuickDefaultProgressBar(QQuickItem *parent = nullptr);
+
+ bool isIndeterminate() const;
+ void setIndeterminate(bool indeterminate);
+
+ qreal progress() const;
+ void setProgress(qreal progress);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+protected:
+ void itemChange(ItemChange change, const ItemChangeData &data) override;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
+
+private:
+ qreal m_progress = 0;
+ bool m_indeterminate = false;
+ QColor m_color;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickDefaultProgressBar)
+
+#endif // QQUICKDEFAULTPROGRESSBAR_P_H
diff --git a/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp b/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp
new file mode 100644
index 00000000..734d32de
--- /dev/null
+++ b/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2DefaultStyleImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2DefaultStyleImplPlugin(QObject *parent = nullptr);
+};
+
+QtQuickControls2DefaultStyleImplPlugin::QtQuickControls2DefaultStyleImplPlugin(QObject *parent)
+ : QQmlEngineExtensionPlugin(parent)
+{
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2defaultstyleimplplugin.moc"
diff --git a/src/imports/controls/default/qmldir b/src/imports/controls/default/qmldir
new file mode 100644
index 00000000..3f2501b7
--- /dev/null
+++ b/src/imports/controls/default/qmldir
@@ -0,0 +1,132 @@
+module QtQuick.Controls.Default
+plugin qtquickcontrols2defaultstyleplugin
+classname QtQuickControls2DefaultStylePlugin
+depends QtQuick.Controls 2.5
+
+# QtQuick.Controls 2.0 (originally introduced in Qt 5.7)
+AbstractButton 2.0 AbstractButton.qml
+ApplicationWindow 2.0 ApplicationWindow.qml
+BusyIndicator 2.0 BusyIndicator.qml
+Button 2.0 Button.qml
+ButtonGroup 2.0 ButtonGroup.qml
+CheckBox 2.0 CheckBox.qml
+CheckDelegate 2.0 CheckDelegate.qml
+ComboBox 2.0 ComboBox.qml
+Container 2.0 Container.qml
+Control 2.0 Control.qml
+Dial 2.0 Dial.qml
+Drawer 2.0 Drawer.qml
+Frame 2.0 Frame.qml
+GroupBox 2.0 GroupBox.qml
+ItemDelegate 2.0 ItemDelegate.qml
+Label 2.0 Label.qml
+Menu 2.0 Menu.qml
+MenuItem 2.0 MenuItem.qml
+Page 2.0 Page.qml
+PageIndicator 2.0 PageIndicator.qml
+Pane 2.0 Pane.qml
+Popup 2.0 Popup.qml
+ProgressBar 2.0 ProgressBar.qml
+RadioButton 2.0 RadioButton.qml
+RadioDelegate 2.0 RadioDelegate.qml
+RangeSlider 2.0 RangeSlider.qml
+ScrollBar 2.0 ScrollBar.qml
+ScrollIndicator 2.0 ScrollIndicator.qml
+Slider 2.0 Slider.qml
+SpinBox 2.0 SpinBox.qml
+StackView 2.0 StackView.qml
+SwipeDelegate 2.0 SwipeDelegate.qml
+SwipeView 2.0 SwipeView.qml
+Switch 2.0 Switch.qml
+SwitchDelegate 2.0 SwitchDelegate.qml
+TabBar 2.0 TabBar.qml
+TabButton 2.0 TabButton.qml
+TextArea 2.0 TextArea.qml
+TextField 2.0 TextField.qml
+ToolBar 2.0 ToolBar.qml
+ToolButton 2.0 ToolButton.qml
+ToolTip 2.0 ToolTip.qml
+Tumbler 2.0 Tumbler.qml
+
+# QtQuick.Controls 2.1 (new types in Qt 5.8)
+Dialog 2.1 Dialog.qml
+DialogButtonBox 2.1 DialogButtonBox.qml
+MenuSeparator 2.1 MenuSeparator.qml
+RoundButton 2.1 RoundButton.qml
+ToolSeparator 2.1 ToolSeparator.qml
+
+# QtQuick.Controls 2.2 (new types in Qt 5.9)
+DelayButton 2.2 DelayButton.qml
+ScrollView 2.2 ScrollView.qml
+
+# QtQuick.Controls 2.3 (new types in Qt 5.10)
+Action 2.3 Action.qml
+ActionGroup 2.3 ActionGroup.qml
+MenuBar 2.3 MenuBar.qml
+MenuBarItem 2.3 MenuBarItem.qml
+
+# QtQuick.Controls 2.13 (new types in Qt 5.13)
+SplitView 2.13 SplitView.qml
+
+# QtQuick.Controls 2.15 (new types in Qt 5.15)
+HorizontalHeaderView 2.15 HorizontalHeaderView.qml
+VerticalHeaderView 2.15 VerticalHeaderView.qml
+
+# Make sure we have types registered for Qt 6: QTBUG-85774, QTBUG-85685
+AbstractButton 6.0 AbstractButton.qml
+Action 6.0 Action.qml
+ActionGroup 6.0 ActionGroup.qml
+ApplicationWindow 6.0 ApplicationWindow.qml
+BusyIndicator 6.0 BusyIndicator.qml
+Button 6.0 Button.qml
+ButtonGroup 6.0 ButtonGroup.qml
+CheckBox 6.0 CheckBox.qml
+CheckDelegate 6.0 CheckDelegate.qml
+ComboBox 6.0 ComboBox.qml
+Container 6.0 Container.qml
+Control 6.0 Control.qml
+DelayButton 6.0 DelayButton.qml
+Dial 6.0 Dial.qml
+Dialog 6.0 Dialog.qml
+DialogButtonBox 6.0 DialogButtonBox.qml
+Drawer 6.0 Drawer.qml
+Frame 6.0 Frame.qml
+GroupBox 6.0 GroupBox.qml
+HorizontalHeaderView 6.0 HorizontalHeaderView.qml
+ItemDelegate 6.0 ItemDelegate.qml
+Label 6.0 Label.qml
+Menu 6.0 Menu.qml
+MenuBar 6.0 MenuBar.qml
+MenuBarItem 6.0 MenuBarItem.qml
+MenuItem 6.0 MenuItem.qml
+MenuSeparator 6.0 MenuSeparator.qml
+Page 6.0 Page.qml
+PageIndicator 6.0 PageIndicator.qml
+Pane 6.0 Pane.qml
+Popup 6.0 Popup.qml
+ProgressBar 6.0 ProgressBar.qml
+RadioButton 6.0 RadioButton.qml
+RadioDelegate 6.0 RadioDelegate.qml
+RangeSlider 6.0 RangeSlider.qml
+RoundButton 6.0 RoundButton.qml
+ScrollBar 6.0 ScrollBar.qml
+ScrollIndicator 6.0 ScrollIndicator.qml
+ScrollView 6.0 ScrollView.qml
+Slider 6.0 Slider.qml
+SpinBox 6.0 SpinBox.qml
+SplitView 6.0 SplitView.qml
+StackView 6.0 StackView.qml
+SwipeDelegate 6.0 SwipeDelegate.qml
+SwipeView 6.0 SwipeView.qml
+Switch 6.0 Switch.qml
+SwitchDelegate 6.0 SwitchDelegate.qml
+TabBar 6.0 TabBar.qml
+TabButton 6.0 TabButton.qml
+TextArea 6.0 TextArea.qml
+TextField 6.0 TextField.qml
+ToolBar 6.0 ToolBar.qml
+ToolButton 6.0 ToolButton.qml
+ToolSeparator 6.0 ToolSeparator.qml
+ToolTip 6.0 ToolTip.qml
+Tumbler 6.0 Tumbler.qml
+VerticalHeaderView 6.0 VerticalHeaderView.qml
diff --git a/src/imports/controls/default/qquickdefaultstyle.cpp b/src/imports/controls/default/qquickdefaultstyle.cpp
new file mode 100644
index 00000000..15c59798
--- /dev/null
+++ b/src/imports/controls/default/qquickdefaultstyle.cpp
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickdefaultstyle_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QQuickDefaultStyle::QQuickDefaultStyle(QObject *parent) :
+ QObject(parent)
+{
+}
+
+QColor QQuickDefaultStyle::backgroundColor() const
+{
+ return QColor::fromRgba(0xFFFFFFFF);
+}
+
+QColor QQuickDefaultStyle::overlayModalColor() const
+{
+ return QColor::fromRgba(0x7F28282A);
+}
+
+QColor QQuickDefaultStyle::overlayDimColor() const
+{
+ return QColor::fromRgba(0x1F28282A);
+}
+
+QColor QQuickDefaultStyle::textColor() const
+{
+ return QColor::fromRgba(0xFF353637);
+}
+
+QColor QQuickDefaultStyle::textDarkColor() const
+{
+ return QColor::fromRgba(0xFF26282A);
+}
+
+QColor QQuickDefaultStyle::textLightColor() const
+{
+ return QColor::fromRgba(0xFFFFFFFF);
+}
+
+QColor QQuickDefaultStyle::textLinkColor() const
+{
+ return QColor::fromRgba(0xFF45A7D7);
+}
+
+QColor QQuickDefaultStyle::textSelectionColor() const
+{
+ return QColor::fromRgba(0xFFFDDD5C);
+}
+
+QColor QQuickDefaultStyle::textDisabledColor() const
+{
+ return QColor::fromRgba(0xFFBDBEBF);
+}
+
+QColor QQuickDefaultStyle::textDisabledLightColor() const
+{
+ return QColor::fromRgba(0xFFC2C2C2);
+}
+
+QColor QQuickDefaultStyle::textPlaceholderColor() const
+{
+ return QColor::fromRgba(0xFF777777);
+}
+
+QColor QQuickDefaultStyle::focusColor() const
+{
+ return QColor::fromRgba(0xFF0066FF);
+}
+
+QColor QQuickDefaultStyle::focusLightColor() const
+{
+ return QColor::fromRgba(0xFFF0F6FF);
+}
+
+QColor QQuickDefaultStyle::focusPressedColor() const
+{
+ return QColor::fromRgba(0xFFCCE0FF);
+}
+
+QColor QQuickDefaultStyle::buttonColor() const
+{
+ return QColor::fromRgba(0xFFE0E0E0);
+}
+
+QColor QQuickDefaultStyle::buttonPressedColor() const
+{
+ return QColor::fromRgba(0xFFD0D0D0);
+}
+
+QColor QQuickDefaultStyle::buttonCheckedColor() const
+{
+ return QColor::fromRgba(0xFF353637);
+}
+
+QColor QQuickDefaultStyle::buttonCheckedPressedColor() const
+{
+ return QColor::fromRgba(0xFF585A5C);
+}
+
+QColor QQuickDefaultStyle::buttonCheckedFocusColor() const
+{
+ return QColor::fromRgba(0xFF599BFF);
+}
+
+QColor QQuickDefaultStyle::toolButtonColor() const
+{
+ return QColor::fromRgba(0x33333333);
+}
+
+QColor QQuickDefaultStyle::tabButtonColor() const
+{
+ return QColor::fromRgba(0xFF353637);
+}
+
+QColor QQuickDefaultStyle::tabButtonPressedColor() const
+{
+ return QColor::fromRgba(0xFF585A5C);
+}
+
+QColor QQuickDefaultStyle::tabButtonCheckedPressedColor() const
+{
+ return QColor::fromRgba(0xFFE4E4E4);
+}
+
+QColor QQuickDefaultStyle::delegateColor() const
+{
+ return QColor::fromRgba(0xFFEEEEEE);
+}
+
+QColor QQuickDefaultStyle::delegatePressedColor() const
+{
+ return QColor::fromRgba(0xFFBDBEBF);
+}
+
+QColor QQuickDefaultStyle::delegateFocusColor() const
+{
+ return QColor::fromRgba(0xFFE5EFFF);
+}
+
+QColor QQuickDefaultStyle::indicatorPressedColor() const
+{
+ return QColor::fromRgba(0xFFF6F6F6);
+}
+
+QColor QQuickDefaultStyle::indicatorDisabledColor() const
+{
+ return QColor::fromRgba(0xFFFDFDFD);
+}
+
+QColor QQuickDefaultStyle::indicatorFrameColor() const
+{
+ return QColor::fromRgba(0xFF909090);
+}
+
+QColor QQuickDefaultStyle::indicatorFramePressedColor() const
+{
+ return QColor::fromRgba(0xFF808080);
+}
+
+QColor QQuickDefaultStyle::indicatorFrameDisabledColor() const
+{
+ return QColor::fromRgba(0xFFD6D6D6);
+}
+
+QColor QQuickDefaultStyle::frameDarkColor() const
+{
+ return QColor::fromRgba(0xFF353637);
+}
+
+QColor QQuickDefaultStyle::frameLightColor() const
+{
+ return QColor::fromRgba(0xFFBDBEBF);
+}
+
+QColor QQuickDefaultStyle::scrollBarColor() const
+{
+ return QColor::fromRgba(0xFFBDBEBF);
+}
+
+QColor QQuickDefaultStyle::scrollBarPressedColor() const
+{
+ return QColor::fromRgba(0xFF28282A);
+}
+
+QColor QQuickDefaultStyle::progressBarColor() const
+{
+ return QColor::fromRgba(0xFFE4E4E4);
+}
+
+QColor QQuickDefaultStyle::pageIndicatorColor() const
+{
+ return QColor::fromRgba(0xFF28282A);
+}
+
+QColor QQuickDefaultStyle::separatorColor() const
+{
+ return QColor::fromRgba(0xFFCCCCCC);
+}
+
+QColor QQuickDefaultStyle::disabledDarkColor() const
+{
+ return QColor::fromRgba(0xFF353637);
+}
+
+QColor QQuickDefaultStyle::disabledLightColor() const
+{
+ return QColor::fromRgba(0xFFBDBEBF);
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/default/qquickdefaultstyle_p.h b/src/imports/controls/default/qquickdefaultstyle_p.h
new file mode 100644
index 00000000..fa4e77a8
--- /dev/null
+++ b/src/imports/controls/default/qquickdefaultstyle_p.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKDEFAULTSTYLE_P_H
+#define QQUICKDEFAULTSTYLE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+#include <QtGui/qcolor.h>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickDefaultStyle : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor backgroundColor READ backgroundColor CONSTANT FINAL)
+ Q_PROPERTY(QColor overlayModalColor READ overlayModalColor CONSTANT FINAL)
+ Q_PROPERTY(QColor overlayDimColor READ overlayDimColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textColor READ textColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textDarkColor READ textDarkColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textLightColor READ textLightColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textLinkColor READ textLinkColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textSelectionColor READ textSelectionColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textDisabledColor READ textDisabledColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textDisabledLightColor READ textDisabledLightColor CONSTANT FINAL)
+ Q_PROPERTY(QColor textPlaceholderColor READ textPlaceholderColor CONSTANT FINAL)
+ Q_PROPERTY(QColor focusColor READ focusColor CONSTANT FINAL)
+ Q_PROPERTY(QColor focusLightColor READ focusLightColor CONSTANT FINAL)
+ Q_PROPERTY(QColor focusPressedColor READ focusPressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor buttonColor READ buttonColor CONSTANT FINAL)
+ Q_PROPERTY(QColor buttonPressedColor READ buttonPressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor buttonCheckedColor READ buttonCheckedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor buttonCheckedPressedColor READ buttonCheckedPressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor buttonCheckedFocusColor READ buttonCheckedFocusColor CONSTANT FINAL)
+ Q_PROPERTY(QColor toolButtonColor READ toolButtonColor CONSTANT FINAL)
+ Q_PROPERTY(QColor tabButtonColor READ tabButtonColor CONSTANT FINAL)
+ Q_PROPERTY(QColor tabButtonPressedColor READ tabButtonPressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor tabButtonCheckedPressedColor READ tabButtonCheckedPressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor delegateColor READ delegateColor CONSTANT FINAL)
+ Q_PROPERTY(QColor delegatePressedColor READ delegatePressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor delegateFocusColor READ delegateFocusColor CONSTANT FINAL)
+ Q_PROPERTY(QColor indicatorPressedColor READ indicatorPressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor indicatorDisabledColor READ indicatorDisabledColor CONSTANT FINAL)
+ Q_PROPERTY(QColor indicatorFrameColor READ indicatorFrameColor CONSTANT FINAL)
+ Q_PROPERTY(QColor indicatorFramePressedColor READ indicatorFramePressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor indicatorFrameDisabledColor READ indicatorFrameDisabledColor CONSTANT FINAL)
+ Q_PROPERTY(QColor frameDarkColor READ frameDarkColor CONSTANT FINAL)
+ Q_PROPERTY(QColor frameLightColor READ frameLightColor CONSTANT FINAL)
+ Q_PROPERTY(QColor scrollBarColor READ scrollBarColor CONSTANT FINAL)
+ Q_PROPERTY(QColor scrollBarPressedColor READ scrollBarPressedColor CONSTANT FINAL)
+ Q_PROPERTY(QColor progressBarColor READ progressBarColor CONSTANT FINAL)
+ Q_PROPERTY(QColor pageIndicatorColor READ pageIndicatorColor CONSTANT FINAL)
+ Q_PROPERTY(QColor separatorColor READ separatorColor CONSTANT FINAL)
+ Q_PROPERTY(QColor disabledDarkColor READ disabledDarkColor CONSTANT FINAL)
+ Q_PROPERTY(QColor disabledLightColor READ disabledLightColor CONSTANT FINAL)
+ QML_NAMED_ELEMENT(Default)
+ QML_SINGLETON
+ QML_ADDED_IN_VERSION(2, 1)
+
+public:
+ explicit QQuickDefaultStyle(QObject *parent = nullptr);
+
+ QColor backgroundColor() const;
+ QColor overlayModalColor() const;
+ QColor overlayDimColor() const;
+ QColor textColor() const;
+ QColor textDarkColor() const;
+ QColor textLightColor() const;
+ QColor textLinkColor() const;
+ QColor textSelectionColor() const;
+ QColor textDisabledColor() const;
+ QColor textDisabledLightColor() const;
+ QColor textPlaceholderColor() const;
+ QColor focusColor() const;
+ QColor focusLightColor() const;
+ QColor focusPressedColor() const;
+ QColor buttonColor() const;
+ QColor buttonPressedColor() const;
+ QColor buttonCheckedColor() const;
+ QColor buttonCheckedPressedColor() const;
+ QColor buttonCheckedFocusColor() const;
+ QColor toolButtonColor() const;
+ QColor tabButtonColor() const;
+ QColor tabButtonPressedColor() const;
+ QColor tabButtonCheckedPressedColor() const;
+ QColor delegateColor() const;
+ QColor delegatePressedColor() const;
+ QColor delegateFocusColor() const;
+ QColor indicatorPressedColor() const;
+ QColor indicatorDisabledColor() const;
+ QColor indicatorFrameColor() const;
+ QColor indicatorFramePressedColor() const;
+ QColor indicatorFrameDisabledColor() const;
+ QColor frameDarkColor() const;
+ QColor frameLightColor() const;
+ QColor scrollBarColor() const;
+ QColor scrollBarPressedColor() const;
+ QColor progressBarColor() const;
+ QColor pageIndicatorColor() const;
+ QColor separatorColor() const;
+ QColor disabledDarkColor() const;
+ QColor disabledLightColor() const;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKDEFAULTSTYLE_P_H
diff --git a/src/imports/controls/default/qquickdefaulttheme.cpp b/src/imports/controls/default/qquickdefaulttheme.cpp
new file mode 100644
index 00000000..26fb2a2f
--- /dev/null
+++ b/src/imports/controls/default/qquickdefaulttheme.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickdefaulttheme_p.h"
+
+#include <QtQuickTemplates2/private/qquicktheme_p.h>
+
+QT_BEGIN_NAMESPACE
+
+void QQuickDefaultTheme::initialize(QQuickTheme *theme)
+{
+ QPalette systemPalette;
+
+ systemPalette.setColor(QPalette::Base, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::Disabled, QPalette::Base, QColor::fromRgba(0xFFD6D6D6));
+
+ systemPalette.setColor(QPalette::Button, QColor::fromRgba(0xFFE0E0E0));
+
+ systemPalette.setColor(QPalette::ButtonText, QColor::fromRgba(0xFF26282A));
+ systemPalette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor::fromRgba(0x4D26282A));
+
+ systemPalette.setColor(QPalette::BrightText, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::Disabled, QPalette::BrightText, QColor::fromRgba(0x4DFFFFFF));
+
+ systemPalette.setColor(QPalette::Dark, QColor::fromRgba(0xFF353637));
+
+ systemPalette.setColor(QPalette::Highlight, QColor::fromRgba(0xFF0066FF));
+ systemPalette.setColor(QPalette::Disabled, QPalette::Highlight, QColor::fromRgba(0xFFF0F6FF));
+
+ systemPalette.setColor(QPalette::HighlightedText, QColor::fromRgba(0xFF090909));
+
+ systemPalette.setColor(QPalette::Light, QColor::fromRgba(0xFFF6F6F6));
+
+ systemPalette.setColor(QPalette::Link, QColor::fromRgba(0xFF45A7D7));
+
+ systemPalette.setColor(QPalette::Mid, QColor::fromRgba(0xFFBDBDBD));
+
+ systemPalette.setColor(QPalette::Midlight, QColor::fromRgba(0xFFE4E4E4));
+
+ systemPalette.setColor(QPalette::Text, QColor::fromRgba(0xFF353637));
+ systemPalette.setColor(QPalette::Disabled, QPalette::Text, QColor::fromRgba(0x7F353637));
+
+ systemPalette.setColor(QPalette::Shadow, QColor::fromRgba(0xFF28282A));
+
+ systemPalette.setColor(QPalette::ToolTipBase, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::ToolTipText, QColor::fromRgba(0xFF000000));
+
+ systemPalette.setColor(QPalette::Window, QColor::fromRgba(0xFFFFFFFF));
+
+ systemPalette.setColor(QPalette::WindowText, QColor::fromRgba(0xFF26282A));
+ systemPalette.setColor(QPalette::Disabled, QPalette::WindowText, QColor::fromRgba(0xFFBDBEBF));
+
+ theme->setPalette(QQuickTheme::System, systemPalette);
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/default/qquickdefaulttheme_p.h b/src/imports/controls/default/qquickdefaulttheme_p.h
new file mode 100644
index 00000000..3a7311c7
--- /dev/null
+++ b/src/imports/controls/default/qquickdefaulttheme_p.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKDEFAULTTHEME_P_H
+#define QQUICKDEFAULTTHEME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickTheme;
+
+class QQuickDefaultTheme
+{
+public:
+ static void initialize(QQuickTheme *theme);
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKDEFAULTTHEME_P_H
diff --git a/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp b/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp
new file mode 100644
index 00000000..a486658e
--- /dev/null
+++ b/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickdefaultstyle_p.h"
+#include "qquickdefaulttheme_p.h"
+
+#include <QtQuickControls2/private/qquickstyleplugin_p.h>
+#include <QtQuickTemplates2/private/qquicktheme_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2DefaultStylePlugin: public QQuickStylePlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2DefaultStylePlugin(QObject *parent = nullptr);
+
+ QString name() const override;
+
+ void registerTypes(const char *uri) override;
+
+ QQuickDefaultTheme theme;
+};
+
+QtQuickControls2DefaultStylePlugin::QtQuickControls2DefaultStylePlugin(QObject *parent) : QQuickStylePlugin(parent)
+{
+}
+
+QString QtQuickControls2DefaultStylePlugin::name() const
+{
+ return QStringLiteral("Default");
+}
+
+void QtQuickControls2DefaultStylePlugin::registerTypes(const char *uri)
+{
+ QQuickStylePlugin::registerTypes(uri);
+
+ theme.initialize(QQuickTheme::instance());
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2defaultstyleplugin.moc"
diff --git a/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.qrc b/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.qrc
new file mode 100644
index 00000000..a6058dd1
--- /dev/null
+++ b/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.qrc
@@ -0,0 +1,24 @@
+<RCC>
+ <qresource prefix="/qt-project.org/imports/QtQuick/Controls/Default">
+ <file>images/arrow-indicator.png</file>
+ <file>images/arrow-indicator@2x.png</file>
+ <file>images/arrow-indicator@3x.png</file>
+ <file>images/arrow-indicator@4x.png</file>
+ <file>images/check.png</file>
+ <file>images/check@2x.png</file>
+ <file>images/check@3x.png</file>
+ <file>images/check@4x.png</file>
+ <file>images/dial-indicator.png</file>
+ <file>images/dial-indicator@2x.png</file>
+ <file>images/dial-indicator@3x.png</file>
+ <file>images/dial-indicator@4x.png</file>
+ <file>images/drop-indicator.png</file>
+ <file>images/drop-indicator@2x.png</file>
+ <file>images/drop-indicator@3x.png</file>
+ <file>images/drop-indicator@4x.png</file>
+ <file>images/double-arrow.png</file>
+ <file>images/double-arrow@2x.png</file>
+ <file>images/double-arrow@3x.png</file>
+ <file>images/double-arrow@4x.png</file>
+ </qresource>
+</RCC>