diff --git a/frontends/qt6/qmllib/Material/MaterialCircularProgress.qml b/frontends/qt6/qmllib/Material/MaterialCircularProgress.qml new file mode 100644 index 000000000..cd7e8c2fa --- /dev/null +++ b/frontends/qt6/qmllib/Material/MaterialCircularProgress.qml @@ -0,0 +1,18 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +import "MaterialPalette.qml" as MaterialPalette + +BusyIndicator { + id: indicator + running: true + width: 48 + height: 48 + anchors.centerIn: parent + busyIndicatorStyle: BusyIndicatorStyle { + indicator { + color: MaterialPalette.primary + width: 4 + } + } +} diff --git a/frontends/qt6/qmllib/Material/MaterialLinearProgress.qml b/frontends/qt6/qmllib/Material/MaterialLinearProgress.qml new file mode 100644 index 000000000..96a38c5cc --- /dev/null +++ b/frontends/qt6/qmllib/Material/MaterialLinearProgress.qml @@ -0,0 +1,20 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +import "MaterialPalette.qml" as MaterialPalette + +ProgressBar { + id: progress + from: 0 + to: 1 + value: 0 + implicitHeight: 6 + background: Rectangle { + color: MaterialPalette.surfaceVariant + radius: 3 + } + contentItem: Rectangle { + color: MaterialPalette.primary + radius: 3 + } +} diff --git a/frontends/qt6/qmllib/Material/MaterialSkeleton.qml b/frontends/qt6/qmllib/Material/MaterialSkeleton.qml new file mode 100644 index 000000000..fcd13b7bb --- /dev/null +++ b/frontends/qt6/qmllib/Material/MaterialSkeleton.qml @@ -0,0 +1,32 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 + +Rectangle { + id: skeleton + property alias width: root.width + property alias height: root.height + property bool animated: true + property color baseColor: MaterialPalette.surfaceVariant + property color highlightColor: MaterialPalette.surface + + color: baseColor + radius: 8 + implicitWidth: 120 + implicitHeight: 20 + + Gradient { + id: gradient + anchors.fill: parent + gradient: Gradient { + GradientStop { position: 0.0; color: baseColor } + GradientStop { position: 0.5; color: highlightColor } + GradientStop { position: 1.0; color: baseColor } + } + opacity: animated ? 1 : 0 + } + + Behavior on gradient.y { + NumberAnimation { duration: 900; repeat: Animation.Infinite; from: 0; to: width } + } +}