Tunal/crates/tunal/ui/dialogs/errors.slint
astar76 321ce8c244 S038: expressive restyle with shaped containers, ripples and rounded surfaces
Shape library (cookies, clover, scallop) with morphing Shape component,
press ripple in StateLayer, content card shell, shaped file glyphs,
card grid tiles, dialog header shapes, menu pills, wavy toast progress.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 19:24:41 -06:00

32 lines
1 KiB
Text

import { Icons } from "../components/icon.slint";
import { ListView } from "std-widgets.slint";
import { Theme } from "../theme.slint";
import { Dialog } from "../components/dialog.slint";
// One item that failed, or a list of them after a job: `lines` shows below the body. The
// owner sets `actions` (retry/skip/abort while a job waits, OK for the final list) and
// `answered(i)` reports the button.
export component ErrorsDialog inherits Dialog {
glyph: Icons.error;
in property <[string]> lines;
callback answered(int);
dialog-width: 480px;
action(i) => {
root.answered(i);
}
if root.lines.length > 0: ListView {
height: min(root.lines.length, 6) * 24px;
for line in root.lines: Text {
height: 24px;
text: line;
color: Theme.on-surface-variant;
font-size: Theme.body-small.size;
font-weight: Theme.body-small.weight;
vertical-alignment: center;
overflow: elide;
}
}
}