// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.0 OR LicenseRef-Slint-commercial import { Palette } from "styling.slint"; export component ProgressIndicator { in property progress; in property indeterminate; min-height: 4px; horizontal-stretch: 1; vertical-stretch: 0; accessible-role: none; accessible-value: root.progress; i-background := Rectangle { background: Palette.surface-variant; clip: true; i-track := Rectangle { background: Palette.primary; x: !root.indeterminate ? 0px : -parent.width + (parent.width * mod(animation-tick(), 2s) / 1s); y: (parent.height - self.height) / 2; width: !root.indeterminate ? parent.width * min(1, max(0, root.progress)) : parent.width; border-radius: i-background.border-radius; } } }