if node.kind() == SyntaxKind::AtImageUrl && token.kind() == SyntaxKind::StringLiteral { let path = i_slint_compiler::literals::unescape_string(token.text())?; let path = token.source_file.path().parent().map(|p| p.to_path_buf())?.join(path);return...
// Jump to test.png image url let offset: TextSize = (source.find("\"test.png\"").unwrap() as u32).into(); let token = crate::language::token_at_offset(&doc, offset + TextSize::new(1)).unwrap(); Member ogoffart Nov 28, 2024 Suggested change tools/lsp/language/hover...
loads an icon with the @image-url() macro. The path is relative to the location of `ui/appwindow.slint`. ::: :::{tab-item} NodeJS :sync: nodejs Inside the Rectangle place an Image element that loads an icon with the @image-url() macro. The path is relative to the location of...
is replaced by @image-url("...") $children is replaced by @children Added title property to the Window element color property to the Window element maximum/minimum properties to the SpinBox strings can contain escape codes FocusScope to handle key events return statements Text word wrap and el...
Expression::ImageReference Use that data in the live-preview I am a bit uncertain whether 1. is actually needed: The "normal" images I expect to see in the Live Preview have aresource_refofAbsolute(String), which contains the absolute path to the image already. I just wanted to make sur...
icon 窗口图标(Image) icon: @image-url("../../imgs/rust.png"); title 窗口标题(String) title: "Window!"; 文字属性Text Params 属性说明(类型)示例 horizontal-alignment 横向对齐(TextHorizontalAlignment) default-font-family: "Helvetica,Verdana,Arial,sans-serif"; vertical-alignment 纵向对齐(TextVerti...
7 changes: 7 additions & 0 deletions 7 tests/cases/examples/rotate.slint Original file line numberDiff line numberDiff line change @@ -55,4 +55,11 @@ TestCase := Window { source: @image-url("../../../logo/slint-logo-square-light-128x128.png"); } } Text { x: 150px; y:...
{ name: @tr("Print"), id: SubPage.Print, icon: @image-url("images/print.svg") }, { name: @tr("Scan"), id: SubPage.Scan, icon: @image-url("images/scan.svg") }, { name: @tr("Copy"), id: SubPage.Copy, icon: @image-url("images/copy.svg") }, ...
icon: @image-url("/usr/share/icons/breeze/mimetypes/64/application-vnd.debian.binary-package.svg"); in-out property <string> package; in-out property <string> status; @@ -23,8 +24,8 @@ export component DebInstaller inherits Window { GridBox { Row { VerticalBox { vertical-stretch: 0...
source: @image-url("images/sprite.png"); frames-wide: 5; frames-high: 5; total-frames: 21; playing: true; duration: 700ms; }if cb.current-value == "Boing Ball": ball := SpriteSheet { property <int> frameTick: animation-tick() / 16ms; ...