Live data from Hacker News

Show HN: Slint – A declarative UI toolkit for embedded and desktop

slint.dev

151–152 of 152 posts

Re: Show HN: Slint – A declarative UI toolkit for embedded and desktop

#151
post #150
post #125

Earlier quoted context omitted.

I'm essentially looking for something like imgui but with ability to draw directly to framebuffer. I looked at egui but that has same issue.

Imgui doesn’t write to a framebuffer, it records GPU commands. Really embedded MCUs don’t have space for a framebuffer either, a technique used is filling a line buffer on a timer interrupt and driving the lcd off that. The gui has to be written quite differently.

Beefier display modules will have a framebuffer inside so you don’t have to mind the timing, even if you still have to transfer the image line by line because a full screen buffer (at the full colour depth) may not fit into the microcontroller’s own RAM. It would actually be interesting to do some sort of IMGUI for this kind of environment, that would perhaps rerun the display function multiple times per screen update, once for each line where a widget’s bounding box starts or ends.

Re: Show HN: Slint – A declarative UI toolkit for embedded and desktop

#152

I'm always happy when a new GUI toolkit comes out and Slint looks really well done, especially if you like QML. I could imagine using it if I do another embedded or kiosk application. However, I find the modern flavor of "declarative" is not really for me. QML, Slint, and to some degree XAML and SwiftUI are all like this. They mix widgets with layout elements and presentational elements (like rectangles). There is no…

Separating content and style does not really have a purpose in GUIs. A lot of people who come from HTML assume it does because HTML does it, but HTML does it because it's for documents, where it does have a purpose. It's got nothing to do with declarativeness; everyone does the same thing because it works and the other way doesn't solve problems.

The only non-DOM-based library I know of to use separate stylesheets is JavaFX and it's one of the biggest reasons people hate it.

Post reply on HN