Make color_picker_hsva_2d
public. (#1091)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
parent
76ac41f9b5
commit
e4aa1e6e1a
1 changed files with 4 additions and 2 deletions
|
@ -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());
|
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.
|
/// 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);
|
let mut hsvag = HsvaGamma::from(*hsva);
|
||||||
ui.vertical(|ui| {
|
ui.vertical(|ui| {
|
||||||
color_picker_hsvag_2d(ui, &mut hsvag, alpha);
|
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.
|
/// Returns `true` on change.
|
||||||
pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool {
|
pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool {
|
||||||
|
|
Loading…
Reference in a new issue