slint/internal/compiler/tests/syntax/basic/image.slint
Olivier Goffart 3267d68541 Turn warning about non-existing image into error
This is only an error if we embedd recources.
(When using absolute path it is not an error/warning)
2023-03-27 11:14:25 +02:00

23 lines
458 B
Text

// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
export SubElements := Rectangle {
background: blue;
Image {
source: @image-url("foo.png");
}
Image {
source: @image-url("builtin:/common/does-not-exist.svg");
// ^error{Cannot find image file builtin:/common/does-not-exist.svg}
}
Rectangle {
background: red;
}
}