diff options
author | Mitch Curtis <[email protected]> | 2021-08-12 14:39:51 +0200 |
---|---|---|
committer | Mitch Curtis <[email protected]> | 2021-08-16 12:52:59 +0200 |
commit | 809339d1484cf556512534367b8170bc26baf072 (patch) | |
tree | 12871313b658f36d058b5ef25af1e247e9c46ce9 /src/quickcontrols2/macos | |
parent | b01b4f00eae8022c6a97d90f54dac395144ae095 (diff) |
Now that qtquickcontrols2 has been merged into qtdeclarative,
we should make it obvious that this repo should no longer be
used, by preventing it from being built.
Task-number: QTBUG-95173
Pick-to: 6.2
Change-Id: I95bd6a214f3d75a865ab163ee0a1f9ffbeb7a051
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/quickcontrols2/macos')
-rw-r--r-- | src/quickcontrols2/macos/Button.qml | 43 | ||||
-rw-r--r-- | src/quickcontrols2/macos/CMakeLists.txt | 49 | ||||
-rw-r--r-- | src/quickcontrols2/macos/CheckBox.qml | 43 | ||||
-rw-r--r-- | src/quickcontrols2/macos/ComboBox.qml | 65 | ||||
-rw-r--r-- | src/quickcontrols2/macos/Dial.qml | 41 | ||||
-rw-r--r-- | src/quickcontrols2/macos/Frame.qml | 41 | ||||
-rw-r--r-- | src/quickcontrols2/macos/GroupBox.qml | 60 | ||||
-rw-r--r-- | src/quickcontrols2/macos/ProgressBar.qml | 41 | ||||
-rw-r--r-- | src/quickcontrols2/macos/RadioButton.qml | 43 | ||||
-rw-r--r-- | src/quickcontrols2/macos/ScrollBar.qml | 64 | ||||
-rw-r--r-- | src/quickcontrols2/macos/ScrollView.qml | 75 | ||||
-rw-r--r-- | src/quickcontrols2/macos/Slider.qml | 68 | ||||
-rw-r--r-- | src/quickcontrols2/macos/SpinBox.qml | 126 | ||||
-rw-r--r-- | src/quickcontrols2/macos/TextArea.qml | 41 | ||||
-rw-r--r-- | src/quickcontrols2/macos/TextField.qml | 43 | ||||
-rw-r--r-- | src/quickcontrols2/macos/macos.pri | 15 | ||||
-rw-r--r-- | src/quickcontrols2/macos/qtquickcontrols2macosstyleplugin.cpp | 75 |
17 files changed, 0 insertions, 933 deletions
diff --git a/src/quickcontrols2/macos/Button.qml b/src/quickcontrols2/macos/Button.qml deleted file mode 100644 index 58658c52..00000000 --- a/src/quickcontrols2/macos/Button.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultButton { - id: control - readonly property Item __focusFrameTarget: control -} diff --git a/src/quickcontrols2/macos/CMakeLists.txt b/src/quickcontrols2/macos/CMakeLists.txt deleted file mode 100644 index d2578070..00000000 --- a/src/quickcontrols2/macos/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -##################################################################### -## qtquickcontrols2macosstyleplugin Plugin: -##################################################################### - -set(qml_files - "Button.qml" - "Slider.qml" - "GroupBox.qml" - "CheckBox.qml" - "RadioButton.qml" - "SpinBox.qml" - "TextField.qml" - "Frame.qml" - "TextArea.qml" - "ComboBox.qml" - "ScrollView.qml" - "ScrollBar.qml" - "ProgressBar.qml" - "Dial.qml" -) -set_source_files_properties(${qml_files} PROPERTIES - QT_QML_SOURCE_VERSION "2.0;6.0" -) - -qt_internal_add_qml_module(qtquickcontrols2macosstyleplugin - URI "QtQuick.Controls.macOS" - VERSION "${PROJECT_VERSION}" - CLASS_NAME QtQuickControls2MacOSStylePlugin - IMPORTS - QtQuick.Controls.Fusion/auto - PAST_MAJOR_VERSIONS 2 - PLUGIN_TARGET qtquickcontrols2macosstyleplugin - NO_PLUGIN_OPTIONAL - NO_GENERATE_PLUGIN_SOURCE - SOURCES - qtquickcontrols2macosstyleplugin.cpp - QML_FILES - ${qml_files} - DEFINES - QT_NO_CAST_FROM_ASCII - QT_NO_CAST_TO_ASCII - LIBRARIES - Qt::CorePrivate - Qt::GuiPrivate - Qt::QmlPrivate - Qt::QuickControls2Private - Qt::QuickPrivate - Qt::QuickTemplates2Private -) diff --git a/src/quickcontrols2/macos/CheckBox.qml b/src/quickcontrols2/macos/CheckBox.qml deleted file mode 100644 index 23ad4426..00000000 --- a/src/quickcontrols2/macos/CheckBox.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultCheckBox { - readonly property Item __focusFrameTarget: indicator - readonly property Item __focusFrameStyleItem: indicator -} diff --git a/src/quickcontrols2/macos/ComboBox.qml b/src/quickcontrols2/macos/ComboBox.qml deleted file mode 100644 index 53baabf8..00000000 --- a/src/quickcontrols2/macos/ComboBox.qml +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** 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.Templates as T -import QtQuick.NativeStyle as NativeStyle - -NativeStyle.DefaultComboBox { - id: control - readonly property Item __focusFrameTarget: control - - contentItem: T.TextField { - implicitWidth: contentWidth - implicitHeight: contentHeight - text: control.editable ? control.editText : control.displayText - - enabled: control.editable - autoScroll: control.editable - readOnly: control.down - inputMethodHints: control.inputMethodHints - validator: control.validator - selectByMouse: control.selectTextByMouse - - font: control.font - color: control.editable ? control.palette.text : control.palette.buttonText - selectionColor: control.palette.highlight - selectedTextColor: control.palette.highlightedText - verticalAlignment: Text.AlignVCenter - - readonly property Item __focusFrameControl: control - } -} diff --git a/src/quickcontrols2/macos/Dial.qml b/src/quickcontrols2/macos/Dial.qml deleted file mode 100644 index 2076a54a..00000000 --- a/src/quickcontrols2/macos/Dial.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultDial { -} diff --git a/src/quickcontrols2/macos/Frame.qml b/src/quickcontrols2/macos/Frame.qml deleted file mode 100644 index f16a0835..00000000 --- a/src/quickcontrols2/macos/Frame.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultFrame { -} diff --git a/src/quickcontrols2/macos/GroupBox.qml b/src/quickcontrols2/macos/GroupBox.qml deleted file mode 100644 index 142ddd15..00000000 --- a/src/quickcontrols2/macos/GroupBox.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultGroupBox { - id: control - label: Item { - readonly property point labelPos : control.__nativeBackground - ? background.labelPos - : Qt.point(0,0) - x: labelPos.x + background.x - y: labelPos.y + background.y - groupBoxPadding.top - width: children[0].implicitWidth - height: children[0].implicitHeight - Text { - width: parent.width - height: parent.height - text: control.title - font: control.font - color: control.palette.windowText - elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter - } - } -} diff --git a/src/quickcontrols2/macos/ProgressBar.qml b/src/quickcontrols2/macos/ProgressBar.qml deleted file mode 100644 index 59a1689d..00000000 --- a/src/quickcontrols2/macos/ProgressBar.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultProgressBar { -} diff --git a/src/quickcontrols2/macos/RadioButton.qml b/src/quickcontrols2/macos/RadioButton.qml deleted file mode 100644 index c9cdf985..00000000 --- a/src/quickcontrols2/macos/RadioButton.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultRadioButton { - readonly property Item __focusFrameTarget: indicator - readonly property Item __focusFrameStyleItem: indicator -} diff --git a/src/quickcontrols2/macos/ScrollBar.qml b/src/quickcontrols2/macos/ScrollBar.qml deleted file mode 100644 index 4a9f764b..00000000 --- a/src/quickcontrols2/macos/ScrollBar.qml +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultScrollBar { - id: controlRoot - - contentItem: NativeStyle.ScrollBar { - control: controlRoot - subControl: NativeStyle.ScrollBar.Handle - overrideState: NativeStyle.ScrollBar.NeverHovered - } - - NativeStyle.ScrollBar { - // Fade a hovered-looking version of the handle - // on top of the default handle when hovering it - x: contentItem.x - y: contentItem.y - width: contentItem.width - height: contentItem.height - control: controlRoot - subControl: NativeStyle.ScrollBar.Handle - overrideState: NativeStyle.StyleItem.AlwaysHovered - opacity: controlRoot.hovered || control.pressed ? 1 : 0 - visible: contentItem instanceof NativeStyle.StyleItem - Behavior on opacity { NumberAnimation { duration: contentItem.transitionDuration } } - } - -} diff --git a/src/quickcontrols2/macos/ScrollView.qml b/src/quickcontrols2/macos/ScrollView.qml deleted file mode 100644 index 954c5d8a..00000000 --- a/src/quickcontrols2/macos/ScrollView.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** 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.impl -import QtQuick.Templates as T -import QtQuick.NativeStyle as NativeStyle - -T.ScrollView { - id: control - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - contentHeight + topPadding + bottomPadding) - - rightPadding: ScrollBar.vertical.visible ? ScrollBar.vertical.width : 0 - bottomPadding: ScrollBar.horizontal.visible ? ScrollBar.horizontal.height : 0 - - ScrollBar.vertical: ScrollBar { - parent: control - x: control.mirrored ? 0 : control.width - width - y: 0 - height: control.height - (control.ScrollBar.horizontal.visible ? control.ScrollBar.horizontal.height : 0) - active: control.ScrollBar.horizontal.active - - NativeStyle.ScrollViewCorner { - y: parent.height - control: control - visible: control.ScrollBar.horizontal.visible - useNinePatchImage: false - } - } - - ScrollBar.horizontal: ScrollBar { - parent: control - x: 0 - y: control.height - height - width: control.width - (control.ScrollBar.vertical.visible ? control.ScrollBar.vertical.width : 0) - active: control.ScrollBar.vertical.active - } -} diff --git a/src/quickcontrols2/macos/Slider.qml b/src/quickcontrols2/macos/Slider.qml deleted file mode 100644 index 77543577..00000000 --- a/src/quickcontrols2/macos/Slider.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultSlider { - id: control - readonly property Item __focusFrameTarget: handle - readonly property Item __focusFrameStyleItem: handle - - background: NativeStyle.Slider { - control: control - subControl: NativeStyle.Slider.Groove | NativeStyle.Slider.Handle - // We normally cannot use a nine patch image for the - // groove if we draw tickmarks (since then the scaling - // would scale the tickmarks too). The groove might - // also use a different background color before, and - // after, the handle. - useNinePatchImage: false - } - - handle: NativeStyle.Slider { - // The handle is hidden, since it will be drawn as a part - // of the background. But will still needs it to be here so - // that we can place the focus rect correctly. - visible: false - - control: control - subControl: NativeStyle.Slider.Handle - 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)) - useNinePatchImage: false - } -} diff --git a/src/quickcontrols2/macos/SpinBox.qml b/src/quickcontrols2/macos/SpinBox.qml deleted file mode 100644 index 5928d37e..00000000 --- a/src/quickcontrols2/macos/SpinBox.qml +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -** -** 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.Templates as T -import QtQuick.NativeStyle as NativeStyle - -T.SpinBox { - id: control - - property bool __nativeBackground: background instanceof NativeStyle.StyleItem - property bool nativeIndicators: up.indicator.hasOwnProperty("_qt_default") - && down.indicator.hasOwnProperty("_qt_default") - - font.pixelSize: __nativeBackground ? background.styleFont(control).pixelSize : undefined - - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - 90 /* minimum */ ) - implicitHeight: Math.max(implicitBackgroundHeight, up.implicitIndicatorHeight + down.implicitIndicatorHeight) - + topInset + bottomInset - - spacing: 2 - - // Push the background right to make room for the indicators - rightInset: nativeIndicators ? up.implicitIndicatorWidth + spacing : 0 - - leftPadding: __nativeBackground ? background.contentPadding.left: 0 - topPadding: __nativeBackground ? background.contentPadding.top: 0 - rightPadding: (__nativeBackground ? background.contentPadding.right : 0) + rightInset - bottomPadding: __nativeBackground ? background.contentPadding.bottom: 0 - - readonly property Item __focusFrameTarget: contentItem - - validator: IntValidator { - locale: control.locale.name - bottom: Math.min(control.from, control.to) - top: Math.max(control.from, control.to) - } - - contentItem: TextInput { - text: control.displayText - font: control.font - color: control.palette.text - selectionColor: control.palette.highlight - selectedTextColor: control.palette.highlightedText - horizontalAlignment: Qt.AlignLeft - verticalAlignment: Qt.AlignVCenter - - topPadding: 2 - bottomPadding: 2 - leftPadding: 10 - rightPadding: 10 - - readOnly: !control.editable - validator: control.validator - inputMethodHints: control.inputMethodHints - - readonly property Item __focusFrameControl: control - } - - NativeStyle.SpinBox { - id: upAndDown - control: control - subControl: NativeStyle.SpinBox.Up - visible: nativeIndicators - x: up.indicator.x - y: up.indicator.y - useNinePatchImage: false - } - - up.indicator: Item { - x: parent.width - width - y: (parent.height / 2) - height - implicitWidth: upAndDown.width - implicitHeight: upAndDown.height / 2 - property bool _qt_default - } - - down.indicator: Item { - x: parent.width - width - y: up.indicator.y + upAndDown.height / 2 - implicitWidth: upAndDown.width - implicitHeight: upAndDown.height / 2 - property bool _qt_default - } - - background: NativeStyle.SpinBox { - control: control - subControl: NativeStyle.SpinBox.Frame - contentWidth: contentItem.implicitWidth - contentHeight: contentItem.implicitHeight - } -} diff --git a/src/quickcontrols2/macos/TextArea.qml b/src/quickcontrols2/macos/TextArea.qml deleted file mode 100644 index f6b88303..00000000 --- a/src/quickcontrols2/macos/TextArea.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultTextArea { -} diff --git a/src/quickcontrols2/macos/TextField.qml b/src/quickcontrols2/macos/TextField.qml deleted file mode 100644 index f3a748f6..00000000 --- a/src/quickcontrols2/macos/TextField.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** 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.NativeStyle as NativeStyle - -NativeStyle.DefaultTextField { - id: control - readonly property Item __focusFrameTarget: control -} diff --git a/src/quickcontrols2/macos/macos.pri b/src/quickcontrols2/macos/macos.pri deleted file mode 100644 index d059151e..00000000 --- a/src/quickcontrols2/macos/macos.pri +++ /dev/null @@ -1,15 +0,0 @@ -QML_FILES += \ - $$PWD/Button.qml \ - $$PWD/Slider.qml \ - $$PWD/GroupBox.qml \ - $$PWD/CheckBox.qml \ - $$PWD/RadioButton.qml \ - $$PWD/SpinBox.qml \ - $$PWD/TextField.qml \ - $$PWD/Frame.qml \ - $$PWD/TextArea.qml \ - $$PWD/ComboBox.qml \ - $$PWD/ScrollView.qml \ - $$PWD/ScrollBar.qml \ - $$PWD/ProgressBar.qml \ - $$PWD/Dial.qml \ diff --git a/src/quickcontrols2/macos/qtquickcontrols2macosstyleplugin.cpp b/src/quickcontrols2/macos/qtquickcontrols2macosstyleplugin.cpp deleted file mode 100644 index 9a4fd0ce..00000000 --- a/src/quickcontrols2/macos/qtquickcontrols2macosstyleplugin.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** 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/qqml.h> -#include <QtQuickControls2/private/qquickstyleplugin_p.h> -#include <QtQuickControls2/qquickstyle.h> - -extern void qml_register_types_QtQuick_Controls_macOS(); - -QT_BEGIN_NAMESPACE - -class QtQuickControls2MacOSStylePlugin : public QQuickStylePlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) - -public: - QtQuickControls2MacOSStylePlugin(QObject *parent = nullptr); - QString name() const override; - void initializeTheme(QQuickTheme *theme) override; -}; - - -QtQuickControls2MacOSStylePlugin::QtQuickControls2MacOSStylePlugin(QObject *parent): - QQuickStylePlugin(parent) -{ - volatile auto registration = &qml_register_types_QtQuick_Controls_macOS; - Q_UNUSED(registration); -} - -QString QtQuickControls2MacOSStylePlugin::name() const -{ - return QStringLiteral("macOS"); -} - -void QtQuickControls2MacOSStylePlugin::initializeTheme(QQuickTheme */*theme*/) -{ -} - -QT_END_NAMESPACE - -#include "qtquickcontrols2macosstyleplugin.moc" |