fix(color_picker): apply color when receiving ActionFinished message

This commit is contained in:
Michael Aaron Murphy 2024-03-07 00:08:04 +01:00
parent 30b60aba84
commit fafbfb99c2
No known key found for this signature in database
GPG key ID: B2732D4240C9212C

View file

@ -188,7 +188,11 @@ impl ColorPickerModel {
}
ColorPickerUpdate::ActionFinished => {
let srgb = palette::Srgb::from_color(self.active_color);
if let Some(applied_color) = self.applied_color.take() {
self.recent_colors.push(applied_color);
}
self.applied_color = Some(Color::from(srgb));
self.active = false;
self.save_next = Some(Color::from(srgb));
}
ColorPickerUpdate::ToggleColorPicker => {