this post was submitted on 31 Oct 2024
16 points (94.4% liked)
Rust
5938 readers
4 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Just use
label.add_css_class()
,label.remove_css_class()
orlabel.set_css_classes()
and make sure to properly load your CSS style sheets, this is usually done by including them as a resource alongside .ui files and icons. If you are using libadwaita, you can also use its predefined style classes.full example (requires nightly toolchain)
This is embarrassing, but when was it not?
I have to add a "." before the name of a
css
class, I must learn my tools.Well, that's CSS :D
Note that if you create a custom Widget class, you can set a CSS name, wich isn't a CSS class and doesn't use a leading dot.
Yeah that's what I've been using all along.