diff options
Diffstat (limited to 'src/imports/controls/fusion')
-rw-r--r-- | src/imports/controls/fusion/SplitView.qml | 56 | ||||
-rw-r--r-- | src/imports/controls/fusion/dependencies.json | 7 | ||||
-rw-r--r-- | src/imports/controls/fusion/fusion.pri | 1 | ||||
-rw-r--r-- | src/imports/controls/fusion/fusion.pro | 4 | ||||
-rw-r--r-- | src/imports/controls/fusion/plugins.qmltypes | 72 | ||||
-rw-r--r-- | src/imports/controls/fusion/qquickfusionstyle.cpp | 2 |
6 files changed, 138 insertions, 4 deletions
diff --git a/src/imports/controls/fusion/SplitView.qml b/src/imports/controls/fusion/SplitView.qml new file mode 100644 index 00000000..6a04b4da --- /dev/null +++ b/src/imports/controls/fusion/SplitView.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** 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 2.13 +import QtQuick.Templates 2.13 as T +import QtQuick.Controls 2.13 +import QtQuick.Controls.impl 2.13 +import QtQuick.Controls.Fusion 2.13 + +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 ? 2 : control.width + implicitHeight: control.orientation === Qt.Horizontal ? control.height : 2 + color: T.SplitHandle.pressed ? palette.dark + : (T.SplitHandle.hovered ? control.palette.midlight : control.palette.mid) + } +} diff --git a/src/imports/controls/fusion/dependencies.json b/src/imports/controls/fusion/dependencies.json new file mode 100644 index 00000000..21ded052 --- /dev/null +++ b/src/imports/controls/fusion/dependencies.json @@ -0,0 +1,7 @@ +[ + { + "name": "QtQuick.Controls", + "type": "module", + "version": "2.0" + } +] diff --git a/src/imports/controls/fusion/fusion.pri b/src/imports/controls/fusion/fusion.pri index c4493c09..72978db5 100644 --- a/src/imports/controls/fusion/fusion.pri +++ b/src/imports/controls/fusion/fusion.pri @@ -51,6 +51,7 @@ QML_FILES += \ $$PWD/SliderGroove.qml \ $$PWD/SliderHandle.qml \ $$PWD/SpinBox.qml \ + $$PWD/SplitView.qml \ $$PWD/SwipeDelegate.qml \ $$PWD/SwitchDelegate.qml \ $$PWD/SwitchIndicator.qml \ diff --git a/src/imports/controls/fusion/fusion.pro b/src/imports/controls/fusion/fusion.pro index 4bc9fcc1..663636da 100644 --- a/src/imports/controls/fusion/fusion.pro +++ b/src/imports/controls/fusion/fusion.pro @@ -1,6 +1,8 @@ TARGET = qtquickcontrols2fusionstyleplugin TARGETPATH = QtQuick/Controls.2/Fusion -IMPORT_VERSION = 2.5 + +IMPORT_NAME = QtQuick.Controls.Fusion +IMPORT_VERSION = 2.$$QT_MINOR_VERSION QT += qml quick QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private diff --git a/src/imports/controls/fusion/plugins.qmltypes b/src/imports/controls/fusion/plugins.qmltypes index e6c350d6..a70b4901 100644 --- a/src/imports/controls/fusion/plugins.qmltypes +++ b/src/imports/controls/fusion/plugins.qmltypes @@ -4,10 +4,10 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQuick.Controls.Fusion 2.3' +// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Fusion 2.13' Module { - dependencies: [ ] + dependencies: ["QtQuick.Controls 2.0"] Component { name: "QQuickFusionBusyIndicator" defaultProperty: "data" @@ -143,4 +143,72 @@ Module { Parameter { name: "palette"; type: "QPalette" } } } + Component { + prototype: "QQuickRectangle" + name: "QtQuick.Controls.Fusion.impl/ButtonPanel 2.3" + exports: ["QtQuick.Controls.Fusion.impl/ButtonPanel 2.3"] + exportMetaObjectRevisions: [3] + isComposite: true + defaultProperty: "data" + Property { name: "control"; type: "QQuickItem"; isPointer: true } + Property { name: "highlighted"; type: "bool" } + } + Component { + prototype: "QQuickRectangle" + name: "QtQuick.Controls.Fusion.impl/CheckIndicator 2.3" + exports: ["QtQuick.Controls.Fusion.impl/CheckIndicator 2.3"] + exportMetaObjectRevisions: [3] + isComposite: true + defaultProperty: "data" + Property { name: "control"; type: "QQuickItem"; isPointer: true } + Property { name: "pressedColor"; type: "QColor"; isReadonly: true } + Property { name: "checkMarkColor"; type: "QColor"; isReadonly: true } + } + Component { + prototype: "QQuickRectangle" + name: "QtQuick.Controls.Fusion.impl/RadioIndicator 2.3" + exports: ["QtQuick.Controls.Fusion.impl/RadioIndicator 2.3"] + exportMetaObjectRevisions: [3] + isComposite: true + defaultProperty: "data" + Property { name: "control"; type: "QQuickItem"; isPointer: true } + Property { name: "pressedColor"; type: "QColor"; isReadonly: true } + Property { name: "checkMarkColor"; type: "QColor"; isReadonly: true } + } + Component { + prototype: "QQuickRectangle" + name: "QtQuick.Controls.Fusion.impl/SliderGroove 2.3" + exports: ["QtQuick.Controls.Fusion.impl/SliderGroove 2.3"] + exportMetaObjectRevisions: [3] + isComposite: true + defaultProperty: "data" + Property { name: "control"; type: "QQuickItem"; isPointer: true } + Property { name: "offset"; type: "double" } + Property { name: "progress"; type: "double" } + Property { name: "visualProgress"; type: "double" } + } + Component { + prototype: "QQuickRectangle" + name: "QtQuick.Controls.Fusion.impl/SliderHandle 2.3" + exports: ["QtQuick.Controls.Fusion.impl/SliderHandle 2.3"] + exportMetaObjectRevisions: [3] + isComposite: true + defaultProperty: "data" + Property { name: "palette"; type: "QVariant" } + Property { name: "pressed"; type: "bool" } + Property { name: "hovered"; type: "bool" } + Property { name: "vertical"; type: "bool" } + Property { name: "visualFocus"; type: "bool" } + } + Component { + prototype: "QQuickRectangle" + name: "QtQuick.Controls.Fusion.impl/SwitchIndicator 2.3" + exports: ["QtQuick.Controls.Fusion.impl/SwitchIndicator 2.3"] + exportMetaObjectRevisions: [3] + isComposite: true + defaultProperty: "data" + Property { name: "control"; type: "QQuickItem"; isPointer: true } + Property { name: "pressedColor"; type: "QColor"; isReadonly: true } + Property { name: "checkMarkColor"; type: "QColor"; isReadonly: true } + } } diff --git a/src/imports/controls/fusion/qquickfusionstyle.cpp b/src/imports/controls/fusion/qquickfusionstyle.cpp index 98c1894f..7797463a 100644 --- a/src/imports/controls/fusion/qquickfusionstyle.cpp +++ b/src/imports/controls/fusion/qquickfusionstyle.cpp @@ -82,7 +82,7 @@ QColor QQuickFusionStyle::outline(const QPalette &palette) { if (palette.window().style() == Qt::TexturePattern) return QColor(0, 0, 0, 160); - return palette.background().color().darker(140); + return palette.window().color().darker(140); } QColor QQuickFusionStyle::highlightedOutline(const QPalette &palette) |