AFAIK, for better or worse, this is the only UI crate (other than HTML-like UI using something like Tauri) that provides a full set of widgets/capabilities on Rust. Every other UI lib is incomplete in some way or falls short for anything other than a toy or specialty type app in my experience. UPDATE: Things I have my eye on as they mature: Slint, egui, and iced. I'm especially watching iced as Pop_os is using it for…
GUI development with Rust and GTK 4
111–120 of 172 posts
Re: GUI development with Rust and GTK 4
#112AFAIK, for better or worse, this is the only UI crate (other than HTML-like UI using something like Tauri) that provides a full set of widgets/capabilities on Rust. Every other UI lib is incomplete in some way or falls short for anything other than a toy or specialty type app in my experience. UPDATE: Things I have my eye on as they mature: Slint, egui, and iced. I'm especially watching iced as Pop_os is using it for…
For me the litmus test is if it has a fully-featured listview or treeview, so you can do something like a file browser, a library app, or other kinds of data-heavy apps. Also important is that keyboard and mouse work as expected (tabbing, shift-selection, etc). Bonus if it supports the current "native" OS paradigms. E.g. on Mac: transparent sidebar, integrated titlebar, on Windows: MS office 2022 style simplified too…
Re: GUI development with Rust and GTK 4
#113Earlier quoted context omitted.
For me the litmus test is if it has a fully-featured listview or treeview, so you can do something like a file browser, a library app, or other kinds of data-heavy apps. Also important is that keyboard and mouse work as expected (tabbing, shift-selection, etc). Bonus if it supports the current "native" OS paradigms. E.g. on Mac: transparent sidebar, integrated titlebar, on Windows: MS office 2022 style simplified too…
> Gtk doesn't look native anywhere but at least it has a very complete widget set and has been around for a while. It's being worked on. https://twitter.com/paulrouget2/status/1595357518913449992
Re: GUI development with Rust and GTK 4
#114Earlier quoted context omitted.
> Gtk doesn't look native anywhere but at least it has a very complete widget set and has been around for a while. It's being worked on. https://twitter.com/paulrouget2/status/1595357518913449992
I’m curious about this, because over the past decade or so, large parts of GTK’s cross-platform ability have been actively sabotaged . It used to be possible to style it to look native on Windows, with some feel problems but mostly comparatively minor. Now, well, no one has quite managed native look (whether or not it’s possible, and certainly I’ll allow that “native” is very ill-defined on Windows these days), and f…
What's the state of wxWidgets nowadays? I feel like they've always had the most honest approach to cross-platform support.
Re: GUI development with Rust and GTK 4
#115What about making it easy to import Rust business logic into C# / Swift / whatever GUI language you're using? I get the value of 100% (or 50% or 80%) implementing the UI in Rust; especially for tools that won't benefit from a native UI, or tools that only need light integration into platform-specific UI features. I've also shipped a desktop product that had a 100% native UI and a cross-platform codebase. Today, imple…
It is really simple to call into native code from C# ( .NET ). While I have not done this with Rust specifically, presenting a C compatible interface from Rust should work fine.
https://news.ycombinator.com/item?id=35701181 did just that and explained the results.
Personally, I find PInvoke time consuming; and often time a lot of people screw it up.
I'm not sure how I'd translate things like lifetimes and ownership into C#: The language just doesn't have those concepts.
Lifetimes might make sense as IDisposable, but that could get tedious. I'd be tempted for types that are just "memory" to have finalizers.
Ownership may require some kind of locking wrapper.
Re: GUI development with Rust and GTK 4
#116Earlier quoted context omitted.
For me the litmus test is if it has a fully-featured listview or treeview, so you can do something like a file browser, a library app, or other kinds of data-heavy apps. Also important is that keyboard and mouse work as expected (tabbing, shift-selection, etc). Bonus if it supports the current "native" OS paradigms. E.g. on Mac: transparent sidebar, integrated titlebar, on Windows: MS office 2022 style simplified too…
> Gtk doesn't look native anywhere but at least it has a very complete widget set and has been around for a while. It's being worked on. https://twitter.com/paulrouget2/status/1595357518913449992
Re: GUI development with Rust and GTK 4
#117Earlier quoted context omitted.
Native look and feel is vastly overrated imo. Delphi and before it borland builder made for great UIs despite not looking native. To the point that when I came across that widget set, I knew I was in for a good UX. Still many bespoke interfaces, like at a brakes repair or small lumber yard chain use delphi and it works just fine. As for the webview, thats a thing, but if you will have web access, you can target wasm,…
> I'm curious what people use that is missing, and what people find unsuited to commercial use. None of the text can be selected in the demo. imo that's a HUGE drawback.
Re: GUI development with Rust and GTK 4
#118Earlier quoted context omitted.
Honestly this looks like programming style from 90s. Why not design UIs in an editor that saves layout to XML?
I've never seen the appeal of those "write your UI in a different language than the logic and deal with the interference layer" style of GUI development. But I also think that UI builders tend to produce bad code and ugly layouts when you go beyond CRUD apps that would have been easy to write in the declarative style anyway.
Re: GUI development with Rust and GTK 4
#119Earlier quoted context omitted.
xml is dated and gross
I really like XML a lot ; I've gotten large numbers of people to use XML & XSLT, where I work. XML is dated, and it is gross. Here's the two things the XML ecosystem nailed , which tie me to it: 1. A dedicated tree-based transformation language (XSL); and, 2. Axis-queries (Xpath). If I could Xpath all-the-things, I'd be a happier human. Although, I also feel like I should be able to SQL all-the-things, too. Maybe I'm…
Re: GUI development with Rust and GTK 4
#120Earlier quoted context omitted.
> Gtk doesn't look native anywhere but at least it has a very complete widget set and has been around for a while. It's being worked on. https://twitter.com/paulrouget2/status/1595357518913449992
I’m curious about this, because over the past decade or so, large parts of GTK’s cross-platform ability have been actively sabotaged . It used to be possible to style it to look native on Windows, with some feel problems but mostly comparatively minor. Now, well, no one has quite managed native look (whether or not it’s possible, and certainly I’ll allow that “native” is very ill-defined on Windows these days), and f…