Improvements to GUI performance

This commit is contained in:
Yousef Khadadeh 2026-05-19 16:35:08 +03:00
parent 1960ea827e
commit 80097dc41e
8 changed files with 31 additions and 21 deletions

View file

@ -1002,12 +1002,12 @@ void PhoneDrawingProgramScreen::color_settings_popup(Vector4f* color, const Colo
.aspectRatio = {1.0f}
}) {
gui.element<ColorPicker<Vector4f>>("color picker element", color, true, ColorPickerData{
.onChange = [&, d] {
if(d.onChange) d.onChange();
gui.set_to_layout();
},
.onChange = d.onChange,
.onHold = d.onSelect,
.onRelease = d.onDeselect
.onRelease = [&, d] {
if(d.onDeselect) d.onDeselect();
main.g.gui.set_to_layout();
}
});
}
CLAY_AUTO_ID({