Skip to content

Commit

Permalink
Make color_picker_hsva_2d public. (#1091)
Browse files Browse the repository at this point in the history
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
  • Loading branch information
HackerFoo and emilk authored Jan 19, 2022
1 parent 76ac41f commit e4aa1e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions egui/src/widgets/color_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,10 @@ fn color_picker_hsvag_2d(ui: &mut Ui, hsva: &mut HsvaGamma, alpha: Alpha) {
color_slider_2d(ui, v, s, |v, s| HsvaGamma { s, v, ..opaque }.into());
}

//// Shows a color picker where the user can change the given [`Hsva`] color.
///
/// Returns `true` on change.
fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
pub fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
let mut hsvag = HsvaGamma::from(*hsva);
ui.vertical(|ui| {
color_picker_hsvag_2d(ui, &mut hsvag, alpha);
Expand All @@ -323,7 +325,7 @@ fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
}
}

/// Shows a color picker where the user can change the given color.
/// Shows a color picker where the user can change the given [`Color32`] color.
///
/// Returns `true` on change.
pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool {
Expand Down

0 comments on commit e4aa1e6

Please sign in to comment.