Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Menu popups and tooltips don't respect layer transforms (emilk#4708
) The menu buttons, combo box menus, and tooltips don't take layer transforms into account when placing their popups, resulting in popups being placed in the wrong location. This PR makes the popups take layer transforms into account, transforming the positions before displaying them on screen. I implemented this fix for menu buttons, combo boxes, and tooltips; let me know if there's anything I missed. Scaling of the popups is purposefully ignored for now. Personally, I think popup scaling isn't necessary but if it is required I can implement it (also it would require doing more invasive things to the code and I want to keep this as simple as possible.) Before the fix: (with a modified version of the "Pan Zoom" web demo) <video src=https://github.com/emilk/egui/assets/104604363/a2d79757-c410-4815-8159-b64d6bd668ee> After: <video src=https://github.com/emilk/egui/assets/104604363/48f8b1d1-d30f-44bf-961f-f10b85964a92> The frame delay seems to be unavoidable unless we can move the popups _after_ the layer transform is set (or apply the transforms to the popup during painting). I think this would be better implemented once the menu/popup/tooltip unification is done (emilk#4669).
- Loading branch information