// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 import { Palette } from "std-widgets.slint"; component Line { in property stroke-line-cap <=> p.stroke-line-cap; p := Path { viewbox-width: 6; viewbox-height: 6; stroke: Palette.foreground; stroke-width: 20px; MoveTo { x: 1; y: 1; } LineTo { x: 5; y: 1; } } } export component TestCase inherits Window { preferred-width: 300px; preferred-height: 300px; Line { x: 10px; y: 10px; width: parent.width - 20px; height: 50px; stroke-line-cap: butt; } Line { x: 10px; y: 50px; width: parent.width - 20px; height: 50px; stroke-line-cap: round; } Line { x: 10px; y: 100px; width: parent.width - 20px; height: 50px; stroke-line-cap: square; } /* */ }