It might be lack of sleep, but I can’t figure this out.
I have a Label
, and I want its text to be red when it represents an error, and I want it be green when it represent “good to go”.
I found search result for C
and maybe a solution for Python
, but nothing for Rust
.
I tried manually setting the css-classes
property and running queue_draw()
; it didn’t work.
I can have a gtk::Box
or a Frame
that I place where the Label
should go, then declare two Label
s, and use set_child()
to switch between them, but that seems like an ugly solution.
Do you have a solution?
Before anyone suggests another library:
Iced
andEgui
both can’t handle Arabic, which is a deal breaker.Iced
takes forever to compile and iterate, maybe that’ll be fixed with dynamic linking.Relm
: I didn’t know it existed before I started this project.Qt
bindings: IDK I forgotQt
existed, I was always more of GNOME* guy.* GNU Network Object something Environment
Use libcosmic 😑
No, but seriously… skip to the end.
Iced can handle Arabic shaping-wise when cosmic-text is used, but it can’t handle the direction (yet). If you only need it for the interface, a shit workaround would be to prefix all text with an RLM (RIGHT-TO-LEFT Mark). This would left-align all text of course.
Fast iteration is already fixed by using cranelift in your release-dev profile (or whatever you want to call it), and mold as a linker. The binary will be slower, but iteration will be much much faster.
Okay, something helpful instead: Did you try asking in the
rust:gnome.org
matrix room mentioned in the project page?