From e4aa1e6e1ac000c83c3bec66f2b260e5b8881f0e Mon Sep 17 00:00:00 2001 From: Dusty DeWeese Date: Wed, 19 Jan 2022 02:28:26 -0800 Subject: [PATCH] Make `color_picker_hsva_2d` public. (#1091) Co-authored-by: Emil Ernerfeldt --- egui/src/widgets/color_picker.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/egui/src/widgets/color_picker.rs b/egui/src/widgets/color_picker.rs index 63e24119..474b0505 100644 --- a/egui/src/widgets/color_picker.rs +++ b/egui/src/widgets/color_picker.rs @@ -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); @@ -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 {