import { Palette, HorizontalBox, StandardButton } from "std-widgets.slint"; component Content inherits Rectangle { in property message; background: Palette.background; HorizontalBox { VerticalLayout { alignment: start; Image { source: @image-url("close-octagon-outline.svg"); colorize: Palette.foreground; width: 50px; height: 50px; } } Text { text: message; wrap: word-wrap; } } } component ActionBar inherits Rectangle { callback close(); background: Palette.alternate-background; HorizontalBox { alignment: end; StandardButton { kind: StandardButtonKind.close; clicked => { close(); } } } } export component ErrorWindow inherits Window { in property message; pure callback close(); title: "Obliteration"; icon: @image-url("@root/assets/icon.png"); min-width: 400px; preferred-width: 400px; // Force word-wrap instead of expand the window. VerticalLayout { Content { message: message; vertical-stretch: 1; } ActionBar { close => { close(); } } } }