mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-07 13:23:22 +00:00
Floating panels are OS windows of their own, and craft-ui keeps a palette above the app's other windows while it is active. A modal dialog or an open menu is drawn in the main window, so a floating panel covered it: the Colour Picker's OK button and fields, Recolor Artwork, and the menu bar's drop-downs (#5238, defect 1). While a modal dialog or a menu of the in-window menu bar is open the docking renderer hides each palette window, and when neither is open each palette shows again at its palette level: topmost while the app is active, behind other applications' windows while it is not, as craft-ui leaves a palette it creates. Hiding rather than lowering covers both: a lowered window can be clicked back to the front, and craft-ui varies the level through the viewport builder, which egui applies when the window opens and not to one already on screen, so the commands go explicitly to the windows there are. The menu bar tells the docking renderer whether one of its top-level menus is open, the same state its hover switching uses; egui's own "any popup open" misses the in-window menu bar. Measured on Windows with the app focused and panels floating: before, a palette was at the front of the z-order and topmost over the main window with the Colour Picker open; after, the main window is in front and the palette is hidden until the dialog or menu closes. Tests: a_modal_lowers_the_native_palette_windows and a_menu_of_the_menu_bar_lowers_the_palette_windows check the commands sent, and a_palette_window_keeps_out_of_the_way_of_the_main_windows_dialog_and_menus the level and visibility table. The wheel test `wheel_over_a_floating_character_font_field_changes_the_font` fails on this machine without this change too (font-order dependent), so it is not part of it.