slint
slint copied to clipboard
Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
Demo code ([SlintPad](https://slintpad.com/?snippet=import+%7B+Button%2C+VerticalBox%2C+HorizontalBox+%7D+from+%22std-widgets.slint%22%3B%0A%0Aexport+component+Demo+%7B%0A++++min-width%3A+hbox.min-width%3B%0A++++min-height%3A+hbox.min-height%3B%0A++++preferred-width%3A+hbox.preferred-width%3B%0A++++preferred-height%3A+hbox.preferred-height%3B%0A%0A++++hbox+%3A%3D+HorizontalBox+%7B%0A++++++++y%3A+0%3B%0A++++++++animate+y+%7B%0A++++++++++++duration%3A+3s%3B%0A++++++++%7D%0A%0A++++++++VerticalBox+%7B%0A++++++++++++horizontal-stretch%3A+0%25%3B%0A++++++++++++alignment%3A+start%3B%0A++++++++++++padding%3A+0%3B%0A%0A++++++++++++Button+%7B%0A++++++++++++++++icon%3A+%40image-url%28%22https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Ffluentui-system-icons%2Frefs%2Fheads%2Fmain%2Fassets%2FBox%2520Arrow%2520Up%2FSVG%2Fic_fluent_box_arrow_up_20_regular.svg%22%29%3B%0A++++++++++++++++colorize-icon%3A+true%3B%0A++++++++++++++++text%3A+%22Update%22%3B%0A++++++++++++++++primary%3A+true%3B%0A++++++++++++++++min-height%3A+90px%3B%0A++++++++++++%7D%0A%0A++++++++++++Button+%7B%0A++++++++++++++++icon%3A+%40image-url%28%22https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Ffluentui-system-icons%2Frefs%2Fheads%2Fmain%2Fassets%2FBox%2520Arrow%2520Up%2FSVG%2Fic_fluent_box_arrow_up_20_regular.svg%22%29%3B%0A++++++++++++++++colorize-icon%3A+true%3B%0A++++++++++++++++primary%3A+true%3B%0A++++++++++++++++width%3A+self.preferred-width%3B%0A++++++++++++++++min-height%3A+self.width%3B%0A++++++++++++++++max-height%3A+self.width%3B%0A++++++++++++%7D%0A++++++++%7D%0A%0A++++++++Rectangle+%7B%0A++++++++++++horizontal-stretch%3A+100%25%3B%0A++++++++++++background%3A+lightgray%3B%0A++++++++++++min-width%3A+100px%3B%0A++++++++++++min-height%3A+200px%3B%0A%0A++++++++++++TouchArea+%7B%0A++++++++++++++++changed+has-hover+%3D%3E+%7B%0A++++++++++++++++++++hbox.y+%3D+self.has-hover+%3F+5px+%3A+0%3B%0A++++++++++++++++%7D%0A++++++++++++%7D%0A++++++++%7D%0A++++%7D%0A%7D%0A&style=fluent-light)): ```slint import { Button, VerticalBox, HorizontalBox } from "std-widgets.slint"; export component Demo { min-width: hbox.min-width; min-height: hbox.min-height; preferred-width: hbox.preferred-width; preferred-height: hbox.preferred-height; hbox := HorizontalBox { y: 0;...
Syntax errors in slint-lsp format in valid slint files: version 1.8.0 ``` slint-lsp format * -i ``` Files - [ui.zip](https://github.com/user-attachments/files/17284486/ui.zip) errors ``` Inconsistency: expected [Identifier], found Node(SyntaxNode { node: [email protected],...
Linux Flatpak: Runtime: org.freedesktop.Platform//24.08 Host distrubutions confirmed: Steam OS (Steam Deck), Arch Linux Rust. Slint 1.8.0, Winit backend, cosmic style Build slint app and package it as flatpak. Run app....
The version of TypeDoc currently used is incompatible with TypeScript 5.6 >. However updating TypeDoc isn't minor as it crashes when attempting to create the docs. Seems the latest version...
Demo video: https://github.com/user-attachments/assets/a2b25873-72a8-43db-bbe5-b2d7030fe353 When clicking an element *in code*, it should be selected in the preview. This is the behavior in SlintPad.
- Open [an empty](https://slintpad.com/?snippet=export+component+Demo+%7B%7D%0A&style=native) or any resizable SlintPad demo. (Also happens in VS Code preview window.) - Resize any of the four sides, so that the outer component is larger...
I'd like to draw complex path with logical operations such as And(united), Or(intersected), NotOr(subtracted), and Xor. This would allow developers to combine and manipulate vector paths more easily.
Currently it's not possible to align widgets on the baseline of text: ```slint HorizontalLayout { alignment: start; Text { text: "Text"; vertical-alignment: center; } Text { text: "Large Text"; font-size:...
Demo video, slowed down 4x: https://github.com/user-attachments/assets/26f1b6ed-3842-44d7-9342-4034496f6cc4 The bug doesn't occur in SlintPad, but in a local build as well as the VS Code preview window. Rust test project I wrote...
The live preview is very handy to have it open while writing *.slint files, and the integrated VSCode preview is really awesome. However, while typing, the *.slint file is temporarily...