mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:35:23 +00:00
Deploy: Add changed Quick Controls 2 components.
This commit is contained in:
parent
a90529ea05
commit
e7dea99bae
81
deploy/qt/imports/QtQuick/Controls.2/Button.qml
Normal file
81
deploy/qt/imports/QtQuick/Controls.2/Button.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.Button {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
contentItem.implicitHeight + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 6
|
||||||
|
leftPadding: padding + 2
|
||||||
|
rightPadding: padding + 2
|
||||||
|
spacing: 6
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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
|
||||||
|
}
|
||||||
|
}
|
111
deploy/qt/imports/QtQuick/Controls.2/CheckDelegate.qml
Normal file
111
deploy/qt/imports/QtQuick/Controls.2/CheckDelegate.qml
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** 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 2.10
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
|
||||||
|
T.CheckDelegate {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
Math.max(contentItem.implicitHeight,
|
||||||
|
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 12
|
||||||
|
spacing: 12
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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: 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.2/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
|
||||||
|
}
|
||||||
|
}
|
78
deploy/qt/imports/QtQuick/Controls.2/ItemDelegate.qml
Normal file
78
deploy/qt/imports/QtQuick/Controls.2/ItemDelegate.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.ItemDelegate {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
Math.max(contentItem.implicitHeight,
|
||||||
|
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 12
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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.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)
|
||||||
|
}
|
||||||
|
}
|
78
deploy/qt/imports/QtQuick/Controls.2/MenuBarItem.qml
Normal file
78
deploy/qt/imports/QtQuick/Controls.2/MenuBarItem.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
|
||||||
|
T.MenuBarItem {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
Math.max(contentItem.implicitHeight,
|
||||||
|
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
spacing: 6
|
||||||
|
padding: 6
|
||||||
|
leftPadding: 12
|
||||||
|
rightPadding: 16
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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"
|
||||||
|
}
|
||||||
|
}
|
106
deploy/qt/imports/QtQuick/Controls.2/MenuItem.qml
Normal file
106
deploy/qt/imports/QtQuick/Controls.2/MenuItem.qml
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** 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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.MenuItem {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
Math.max(contentItem.implicitHeight,
|
||||||
|
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 6
|
||||||
|
spacing: 6
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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.2/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.2/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"
|
||||||
|
}
|
||||||
|
}
|
104
deploy/qt/imports/QtQuick/Controls.2/RadioDelegate.qml
Normal file
104
deploy/qt/imports/QtQuick/Controls.2/RadioDelegate.qml
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** 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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.RadioDelegate {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
Math.max(contentItem.implicitHeight,
|
||||||
|
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 12
|
||||||
|
spacing: 12
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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
|
||||||
|
}
|
||||||
|
}
|
81
deploy/qt/imports/QtQuick/Controls.2/RoundButton.qml
Normal file
81
deploy/qt/imports/QtQuick/Controls.2/RoundButton.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.RoundButton {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
contentItem.implicitHeight + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 6
|
||||||
|
spacing: 6
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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
|
||||||
|
}
|
||||||
|
}
|
79
deploy/qt/imports/QtQuick/Controls.2/SwipeDelegate.qml
Normal file
79
deploy/qt/imports/QtQuick/Controls.2/SwipeDelegate.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.SwipeDelegate {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
Math.max(contentItem.implicitHeight,
|
||||||
|
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 12
|
||||||
|
spacing: 12
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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)
|
||||||
|
}
|
||||||
|
}
|
110
deploy/qt/imports/QtQuick/Controls.2/SwitchDelegate.qml
Normal file
110
deploy/qt/imports/QtQuick/Controls.2/SwitchDelegate.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
|
||||||
|
T.SwitchDelegate {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
Math.max(contentItem.implicitHeight,
|
||||||
|
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 12
|
||||||
|
spacing: 12
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : control.palette.text
|
||||||
|
|
||||||
|
indicator: PaddedRectangle {
|
||||||
|
implicitWidth: 56
|
||||||
|
implicitHeight: 28
|
||||||
|
|
||||||
|
x: 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
|
||||||
|
}
|
||||||
|
}
|
74
deploy/qt/imports/QtQuick/Controls.2/TabButton.qml
Normal file
74
deploy/qt/imports/QtQuick/Controls.2/TabButton.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.TabButton {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
contentItem.implicitHeight + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 6
|
||||||
|
spacing: 6
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : control.palette.brightText
|
||||||
|
|
||||||
|
contentItem: IconLabel {
|
||||||
|
spacing: control.spacing
|
||||||
|
mirrored: control.mirrored
|
||||||
|
display: control.display
|
||||||
|
|
||||||
|
icon: control.icon
|
||||||
|
text: control.text
|
||||||
|
font: control.font
|
||||||
|
color: 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)
|
||||||
|
}
|
||||||
|
}
|
76
deploy/qt/imports/QtQuick/Controls.2/ToolButton.qml
Normal file
76
deploy/qt/imports/QtQuick/Controls.2/ToolButton.qml
Normal file
@ -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 2.10
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls.impl 2.3
|
||||||
|
import QtQuick.Templates 2.3 as T
|
||||||
|
|
||||||
|
T.ToolButton {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||||
|
contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(background ? background.implicitHeight : 0,
|
||||||
|
contentItem.implicitHeight + topPadding + bottomPadding)
|
||||||
|
baselineOffset: contentItem.y + contentItem.baselineOffset
|
||||||
|
|
||||||
|
padding: 6
|
||||||
|
spacing: 6
|
||||||
|
|
||||||
|
icon.width: 24
|
||||||
|
icon.height: 24
|
||||||
|
icon.color: control.enabled ? "transparent" : 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
|
||||||
|
}
|
||||||
|
}
|
7
deploy/qt/qt.conf
Normal file
7
deploy/qt/qt.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Paths]
|
||||||
|
Binaries = .
|
||||||
|
LibraryExecutables = .
|
||||||
|
Plugins = plugins
|
||||||
|
Translations = i18n
|
||||||
|
Imports = imports
|
||||||
|
Qml2Imports = imports
|
Loading…
Reference in New Issue
Block a user