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; } } }