Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bauhaus: major refactoring/partial rewrite
1. simplify the control flow, avoid recomputing everything all the time, limit redrawings 2. have cursor coordinates computed only in motion_notify callbacks 3. dispatch value-changed events only on button_released events (instead of everywhyre, button_pressed and motion_notify), so we don't start a pipeline recompute on every mouse interaction. 4. be sure to redraw widgets on every interaction BEFORE sending value-changed signal and dispatching pipeline params commits. That makes the GUI more responsive and less frustrating, giving immediate feedback about value changing, while the pipeline recomputes may take some time 5. have a timeout on all scrolling events (comboboxes and sliders) so intermediate scroll steps don't lead to pipeline recomputes until scrolling is finished. This may lead to a small lag in GUI response when scrolling on comboboxes, but it can prevents many intermediate useless pipeline recomputes, so overall it's better. 6. dispatch value-changed event ONLY if the value actually changed. 7. Remove duplicated (copy-pasted) code computing coordinates and translations. All pixel computations are done in getters/setters functions in one place. Fix many inconsistencies in coordinates recomputings because of isolated changes not propagated in all the right places. 8. Handle text drawing using uniform bounding-box adjustment. 9. Remove useless features needlessly complexifying code, like the curve and center alignment 10. Do not shift the combobox popup in the viewport when scrolling. This was meant to keep the overlayed item in front of the (non-popup) label, but there is no guaranty that the shifted popup stays entirely visible in viewport. We rely on native Gtk popup positionning and that's it. 11. Dispatch hovered and active CSS rules on pseudo-elements in comboboxes, allowing to style them. 12. Replace expensive calls to powf by optimized integer ipow. 13. Handle clicks on comboboxes chevrons "quad" too, as in any select field in any GUI toolkit. 14. Remove the ability to add shortcuts on sliders and comboboxes because that things needs to be removed entirely. Will be replaced with native Gtk accels that perfectly did the job until 2021. 15. Add shitloads of Doxygen docstrings for future dev doc. 16. Fix a couple of silent bugs : doing boolean operations on floats, comparing floats with integers or double, etc.
- Loading branch information