Re-layout menu if position changes

This commit is contained in:
Dániel Buga 2022-05-05 18:45:56 +02:00
parent b047b83504
commit 73efba0eb6
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ fn update(
data: &LapceWindowData,
_env: &Env,
) {
if !old_data.menu.origin.same(&data.menu.origin) {
ctx.request_layout();
}
if !old_data.menu.items.same(&data.menu.items) {
ctx.request_layout();
}