1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-28 07:23:13 -04:00

Fix color picker button (#5847)

* related to #5832 
(I want to keep that open and actually update the button to use the new
popup, but this should be enough to fix it for now)
* [X] I have followed the instructions in the PR template
This commit is contained in:
Lucas Meurer
2025-03-25 14:38:51 +01:00
committed by GitHub
parent 5d6aaa239b
commit 884be3491d

View File

@@ -502,8 +502,9 @@ pub fn color_edit_button_hsva(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> Res
const COLOR_SLIDER_WIDTH: f32 = 275.0;
// TODO(emilk): make it easier to show a temporary popup that closes when you click outside it
// TODO(lucasmerlin): Update this to use new Popup struct
if ui.memory(|mem| mem.is_popup_open(popup_id)) {
ui.memory_mut(|mem| mem.keep_popup_open(popup_id));
let area_response = Area::new(popup_id)
.kind(UiKind::Picker)
.order(Order::Foreground)