Skip to content

Commit e4aa1e6

Browse files
HackerFooemilk
andauthored
Make color_picker_hsva_2d public. (#1091)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
1 parent 76ac41f commit e4aa1e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

egui/src/widgets/color_picker.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,10 @@ fn color_picker_hsvag_2d(ui: &mut Ui, hsva: &mut HsvaGamma, alpha: Alpha) {
308308
color_slider_2d(ui, v, s, |v, s| HsvaGamma { s, v, ..opaque }.into());
309309
}
310310

311+
//// Shows a color picker where the user can change the given [`Hsva`] color.
312+
///
311313
/// Returns `true` on change.
312-
fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
314+
pub fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
313315
let mut hsvag = HsvaGamma::from(*hsva);
314316
ui.vertical(|ui| {
315317
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 {
323325
}
324326
}
325327

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

0 commit comments

Comments
 (0)