The four header nav tabs each owned a PopupWindow for their dropdown. A PopupWindow grabs the pointer while open, so hovering a sibling tab delivered no hover event and the menus could not be hover-switched. Add a HeaderMenuState global (open-index, anchor-x, items, home-item) and the NavMenuEntry struct to state.slint. Tabs now write their identity into the global on hover/click instead of showing a popup; the menu panel itself will be rendered by a separate in-window overlay. Move NavMenuItem into its own file so the overlay can reuse it. cc
335 KiB
335 KiB