mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2026-03-18 22:06:45 +01:00
8 lines
199 B
Rust
8 lines
199 B
Rust
|
|
use glib::IsA;
|
||
|
|
use gtk::prelude::*;
|
||
|
|
use gtk::Widget;
|
||
|
|
|
||
|
|
/// Adds a new CSS class to a widget.
|
||
|
|
pub fn add_class<W: IsA<Widget>>(widget: &W, class: &str) {
|
||
|
|
widget.style_context().add_class(class);
|
||
|
|
}
|