2020-08-20 00:14:19 +02:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2019 David Edmundson <kde@davidedmundson.co.uk>
|
|
|
|
* SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
|
|
|
|
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2019-09-10 12:35:55 +02:00
|
|
|
import QtQuick 2.0
|
2020-08-18 11:45:23 +02:00
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
2019-09-10 12:35:55 +02:00
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
ComponentBase {
|
2020-08-18 11:45:23 +02:00
|
|
|
id: root
|
|
|
|
title: "Plasma Components 3 BusyIndicator"
|
|
|
|
contentItem: ColumnLayout {
|
|
|
|
spacing: PlasmaCore.Units.gridUnit
|
2019-09-10 12:35:55 +02:00
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
wrapMode: Text.WordWrap
|
2020-08-23 04:32:22 +02:00
|
|
|
text: "The BusyIndicator should have a height of 16px and should have a 1:1 aspect ratio"
|
|
|
|
Layout.preferredWidth: Math.max(busyIndicatorLayout.width, root.implicitHeaderWidth)
|
|
|
|
}
|
|
|
|
PlasmaComponents.BusyIndicator {
|
|
|
|
Layout.preferredHeight: 16
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: "The BusyIndicator should use its implicit size."
|
|
|
|
Layout.preferredWidth: Math.max(busyIndicatorLayout.width, root.implicitHeaderWidth)
|
|
|
|
}
|
|
|
|
PlasmaComponents.BusyIndicator {}
|
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: "The BusyIndicator should maintain a 1:1 aspect ratio, disappear when unchecked and restart when checked."
|
2020-08-18 11:45:23 +02:00
|
|
|
Layout.preferredWidth: Math.max(busyIndicatorLayout.width, root.implicitHeaderWidth)
|
2019-09-10 12:35:55 +02:00
|
|
|
}
|
|
|
|
|
2020-08-18 11:45:23 +02:00
|
|
|
RowLayout {
|
|
|
|
id: busyIndicatorLayout
|
|
|
|
spacing: PlasmaCore.Units.gridUnit
|
2019-09-10 12:35:55 +02:00
|
|
|
|
|
|
|
PlasmaComponents.BusyIndicator {
|
2020-08-23 04:32:22 +02:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2019-09-10 12:35:55 +02:00
|
|
|
running: runningButton.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.CheckBox {
|
|
|
|
id: runningButton
|
|
|
|
text: "Running"
|
2020-08-18 11:45:23 +02:00
|
|
|
checked: true
|
2019-09-10 12:35:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|