diff options
author | Anatoly Kozlov <AnKozlov@luxoft.com> | 2018-03-08 10:33:02 +0100 |
---|---|---|
committer | Lukáš Tinkl <ltinkl@luxoft.com> | 2018-03-12 10:10:01 +0000 |
commit | c74ccbd22d37b4e766f1d27346efd4fccd36ee7f (patch) | |
tree | c1294a81be04f018d8e18dacca24436c6a587a6d /styles | |
parent | 900e5d372991e0d63398e0ebbdb03a07324d9839 (diff) |
[sysui] New component ListItemProgress
- Add a new basic type ListItemBasic for all of list items
- Add a new type of list item ListItemProgress
- ListItem inherits ListItemBasic
- Add examples in The sheet app how to use the component
- Add a style for ProgressBar
Change-Id: I660198820d4503a6e933e90774f294ae7a7bc5c9
Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
Reviewed-by: Lukáš Tinkl <ltinkl@luxoft.com>
Diffstat (limited to 'styles')
-rw-r--r-- | styles/neptune/ProgressBar.qml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/styles/neptune/ProgressBar.qml b/styles/neptune/ProgressBar.qml new file mode 100644 index 00000000..42bba0d1 --- /dev/null +++ b/styles/neptune/ProgressBar.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Pelagicore AG +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Neptune 3 IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite 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 https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +import QtQuick 2.10 +import QtQuick.Templates 2.3 as T +import QtQuick.Controls 2.3 +import QtQuick.Controls.impl 2.3 + +import com.pelagicore.styles.neptune 3.0 + +T.ProgressBar { + id: control + + implicitWidth: Math.max(background ? background.implicitWidth : 0, + contentItem.implicitWidth + leftPadding + rightPadding) + implicitHeight: Math.max(background ? background.implicitHeight : 0, + contentItem.implicitHeight + topPadding + bottomPadding) + + contentItem: ProgressBarImpl { + implicitHeight: 6 + implicitWidth: 116 + scale: control.mirrored ? -1 : 1 + progress: control.position + indeterminate: control.visible && control.indeterminate + color: NeptuneStyle.accentColor + } + + background: Item { + implicitWidth: 200 + implicitHeight: 6 + y: (control.height - height) / 2 + height: 6 + } +} |