1
0
Fork 0
forked from wry/wry

Merge pull request #118 from mahkoh/jorth/color

config: add freestanding get_color and set_color functions
This commit is contained in:
mahkoh 2024-03-03 16:12:14 +01:00 committed by GitHub
commit 3582b8f935
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -258,6 +258,16 @@ pub mod colors {
/// Default: `#23092c`.
const 14 => ATTENTION_REQUESTED_BACKGROUND_COLOR,
}
/// Sets the color of GUI element.
pub fn set_color(element: Colorable, color: Color) {
get!().set_color(element, color);
}
/// Gets the color of GUI element.
pub fn get_color(element: Colorable) -> Color {
get!(Color::BLACK).get_color(element)
}
}
/// Elements of the compositor whose size can be changed.