Skip to content

Commit

Permalink
Merge pull request #118 from mahkoh/jorth/color
Browse files Browse the repository at this point in the history
config: add freestanding get_color and set_color functions
  • Loading branch information
mahkoh authored Mar 3, 2024
2 parents a7139b1 + 044029f commit 3582b8f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jay-config/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3582b8f

Please sign in to comment.