mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-21 01:44:57 +01:00
The monitor list for floating panels now carries each monitor's work area: rcWork from GetMonitorInfo on Windows, and visibleFrame on macOS, turned into the top-left origin and physical pixels of the monitor's rect. The work area is converted to points with the same scale and zoom as the rect, and craft-ui uses it to decide whether a reopened panel's title bar can be grabbed and where to move it. A work area with no width or height is left out. Restoring the main window now keeps it inside its monitor's work area too, so a window saved at the top edge of a monitor with a taskbar along its top opens below the taskbar, and a window taller or wider than the work area is made to fit it, with room for a system title bar and border when the window has them. On Windows the panel list stays empty when the monitors have different scale factors, as before, and a build without the wgpu feature reads no work areas. Linux and the BSDs keep the whole monitor rect.