mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-26 14:54:55 +00:00
update: qt6,qml,materiallinearprogress (1 files)
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import "MaterialPalette.qml" as MaterialPalette
|
||||
|
||||
ProgressBar {
|
||||
Rectangle {
|
||||
id: progress
|
||||
from: 0
|
||||
to: 1
|
||||
value: 0
|
||||
property real value: 0
|
||||
property real minValue: 0
|
||||
property real maxValue: 1
|
||||
implicitHeight: 6
|
||||
background: Rectangle {
|
||||
color: MaterialPalette.surfaceVariant
|
||||
width: parent ? parent.width : 160
|
||||
radius: 3
|
||||
color: MaterialPalette.surfaceVariant
|
||||
|
||||
Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
y: (parent.height - height) / 2
|
||||
height: parent.height
|
||||
width: ((progress.value - progress.minValue) / Math.max(0.0001, progress.maxValue - progress.minValue)) * parent.width
|
||||
radius: 3
|
||||
}
|
||||
contentItem: Rectangle {
|
||||
color: MaterialPalette.primary
|
||||
radius: 3
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user