Commit Graph
11 Commits
Author SHA1 Message Date
aiongg ce8a6d6216 Preview zoom row: a typed zoom field between the zoom buttons
PreviewZoom shows the zoom as a percent field; a typed value applies at once through PreviewView::zoomed_to, kept inside the view's zoom range. The parameter dialogs' preview row and Save for Web share it.
2026-11-12 14:32:40 +00:00
aiongg ed0307bc1e Trial: a settled dock runs no closed menu and the same runs per group 2026-11-12 14:32:40 +00:00
aiongg 353579afd3 Docking: a new float opens at a height fitted to its content
A panel or group floated out of the dock opens at its docked width and at
the height its group measures at in a floating window's room, at most
size.float.height. Content that fills its body opens at that height.

- Proposal::Size measures a component as it is shown at a rect of that
  size, with no share of the parent body's room.
- drag::amend lets a host change a drag's payload in the frame the drag
  started. The dock area measures the dragged panel there and puts the
  size on PanelDrag::source / GroupDrag::source. The Float command and a
  tab torn out of the window measure where they run.
- DockGroupOutput::drag_started also reports tab drags.
- FloatSpace::size_of caps a panel's, group's or column's height at the
  default float height. FloatSpace::record and its contents are gone.
2026-11-12 14:32:39 +00:00
aiongg 264ad8cc53 Native windows: the macOS title-row move starts on the press
The tracked macOS move sent StartMove a pass after the pointer passed the
click distance. winit hands performWindowDragWithEvent the event AppKit is
handling when the command runs, and in that later pass it is often not the
press, or none, so the drag took only some of the time.

- StartMove goes out in the band's Down pass where the OS tracks moves. The
  move is reported (Begin, Update, Commit) once the system pointer has passed
  the click distance; a click on the row moves and docks nothing.
- A window whose move the app runs keeps AppKit's own movable flag: the band
  writes nothing for it and the end hook leaves it alone. AppKit moves such a
  window for the hand-off and resizes it from its edges only while it is
  movable.
2026-11-12 14:32:39 +00:00
aiongg 52cc593d40 Native windows: one writer of a window's place at a time
A viewport window's builder carried its caller's rect every pass, and egui sent
each change of it to the window. The caller's rect follows the window's own
reports a pass late (the dock model records the OS place, a saved window reads
its store), so every OS move or resize came back as a command of the place one
pass old. While AppKit moved or live-resized a window the two writers set it to
two places in turn, without end: the title-row drag jittered, and a live resize
stretched the content with black edges.

- The builder carries the place only until the window opens.
- Each window keeps its known place: what its own pass last saw, or what act
  last commanded. A caller's place goes out only where it differs from the
  known place, never while a move gesture runs or the window is minimized,
  maximized or full screen. Placements are recorded from the known place.
- A dock window is fitted to the monitors when it opens; an open one stays at
  the placement the model recorded.
- The windows fixture sends a child the changes of its builder as commands,
  as eframe does, so trials see what an integration would send.
2026-11-12 14:32:39 +00:00
aiongg c19abe8663 Dock a native window by dragging its title row
A floating dock group in its own OS window now moves through a window move
gesture the app runs, which reports Begin, Update, Commit and Cancel like a
layer's move, so the dock marks the target under the pointer and docks the
whole window on release.

- macOS (Caps::OS_MOVES_TRACKED): the OS moves the window (StartMove), and the
  app follows the system pointer, button and Cmd through SystemWindows, the
  running platform's WindowSystem in craft-window. The hand-off ends when the
  system reports the button up.
- X11 and Windows: the app moves the window with SetOuterPosition so the
  pressed point stays under the pointer; Escape puts it back.
- A drag started by a container shown in its own OS window follows that
  window's pointer, not its parent's.
- The runtime's end hook sets NSWindow.movable for every window; a window
  whose move the app runs is never moved by AppKit from its band.
2026-11-12 14:32:39 +00:00
aiongg 97d56c2964 Floats open at their docked size, and the floating drag bar shows no title
A native float's OS window opens at its placed rect; the measured size applies
only to a window sized by its content. A tab, group or window drag carries the
size it left where it started, and a float command the size of the group it
runs from: the float takes it (with the drag bar above), after a panel's own
float size and before the default. FloatSpace's never-filled group and column
records go.

A floating window's drag bar carries no title: the tabs below name the panels.
2026-11-12 14:32:39 +00:00
aiongg 31948854ad A native dock window's own title row is its only title bar
A tool window's frame comes from policy::tool_frame, whatever frame the main
window has: Inset with the traffic lights hidden on macOS, undecorated with no
caption buttons elsewhere. The installed decision applies to the other kinds.
2026-11-12 14:32:39 +00:00
aiongg 0799bc7588 Open floating dock windows as OS windows where the host reports window positions
DockConfig::native_windows is on by default. A float opens native where the
window host opens OS windows and reports their positions (ShellInfo::window_positions,
WindowHost::positions_reported: not on Wayland); a float never shown native opens
over its place in the main window. AppSpec::new takes the backend winit opens on.

The OS close of a native float is its Close action, taken when every panel in the
window may close; the group's open state belongs to the dock model. The gallery's
mock editor keeps its floats inside its preview.
2026-11-12 14:32:39 +00:00
aiongg 47d26b9813 Keep layer and window mounts out of their parent's fill share
A container on a layer, a full-window layer or an OS window takes no room in
its parent's flow, but step 5 sized it in the parent's Ui and counted it among
the children that share a Stack or Row body's room. A dock area's floating
window was a second fill child of the dock root, so the docked tree took half
the window's height.
2026-11-12 14:32:39 +00:00
aiongg a2676b8eac Framework UI crates: widgets, panels, canvas, patterns, shell and the craft-ui facade 2026-11-12 14:09:32 +00:00