This looks really cool, I learned EGUI (Rust), and it will be my next learning step. Doesnt seems as intimidating as other GUI libraries. Thank you for your contributions!
I'm really impressed by Slint and I've already started using it for small projects. But what I find lacking with those minimal examples is that I still don't have any clue on how to do a bigger project with it. You see, Rust is not a classical OOP language, but Slint is an OOP framwork. So splittings things up in different files/modules/objects seems natural. But this doesn't work in Rust in the same way! There even is an example for C++ where a Slint-Komponent is subclassed to extend its functionality like you would expect it. But how do you structure your project with Rust where you can't do that? And yet, most examples are done in one single file... A tutorial for project achitectures with Slint would be really nice, since this is the part where I struggle the most. For example, you don't have this problem for GUI frameworks like relm or iced, since their concept fits nicely into Rust. But Slint doesn't so much. (Like GTK which implemented a whole polymorphism system for C to make it OOP... Which is insane of course)
You should note that today GUI stuff can be (and should be) put to separate files which makes stuff easier and better separated, there's a great template for that. What I like about Slint is that it feels like a jsonesque sibling to XAML. We need such a thought-out declarative responsive framework. There are some brilliant simple things like "forward-focus". But I guess to really shine on the desktop for certain LOBs the existing modal/multi-modal/window issues need to get sorted out first.
This was a little hard to follow, but I got through it. Three things, though: changing text size and color. My button text is white, which is barely visible against the yellow background. Also, the text is very small so I'd like to make the font size a more readable size. And I'd like so specify the initial window size and change the window title.
Interesting kit! I like the idea to make the design language similar to HTML/CSS. I'm guessing there are some places that are ripe for abstraction and DX improvements (e.g. a derive macro for making that Rc (or Arc) to keep the memory allocation for persistent/global state). Likewise, I'd love to see more about how to extend or compose the components and structure the codebase. I'm wondering how concise this would be in a more complex app. Anyone have an example I can look at?
This looks very nice! Only the hoops you have to jump through to get app in the closure are insane. Can that not be done transparently (by passing a usable app to the closure, or a macro?) And why are the programming parts not as Rusty as they can be (e.g. pub fn?) I do like that you brought back ?: though.
You're right that this part is not ideal and we'd like to find a solution: See github.com/slint-ui/slint/issues/1714 for some discussion. I'm not sure I understand what you mean by parts not being Rusty, could you elaborate?
Can you make a video explaining how to combine multiple .slint files? Maybe also showing how to dynamically create components using rust, and appending them to the gui?
Excellent 😀 Super bien expliqué et pédagogique. Et ça donne une idée rapide de la puissance du framework. quick bug fix : l92 : state.current_value = result; l93: //state.prev_value = result; Vraiment chouette boulot. Je suis preneur d'autres tutos de ce format ;-)
Why slint lsp dont have autocompletion in macro like shown in this video? Is there any setting I missed? Edit: the autocomplete will trigger once you written the macro until you write 'inherits'
@@Slint-UI slint lsp won't auto-complete the keyword `export component`. This is reproducible for vscode and neovim. I'll file an issue later as I'm working right now.
Can you elaborate on what you mean with "video buffer"? I'd also like to suggest to move across to github.com/slint-ui/slint/discussions - then your question gets more visibility :)
So very confused about whether to choose flutter or slint, I know rust is very good at multi general purpose, and dart not so much, are you guys focusing on being a direct alternative to flutter?, I want to use a tech stack that has good performance and also a lot of customization options. I want to work with animation
This is still early development, so if you want a somewhat more polished development experience, you should probably seek Flutter. Also Rust is not a simple language to learn contrary to Flutter.
Yes, we have plans to make slint work on mobile device: github.com/slint-ui/slint/issues/46 and github.com/slint-ui/slint/issues/47 We Will start with android and iOS will follow.
The API hasn't changed. set_value is there because there is a `in property` called value declared in the slint! macro. You probably want to double check your code to check if that property is still there.