Expand description
titlebar — the strip a window with no system titlebar moves itself by.
Two platform facts it exists to carry. The window is moved with
Window::start_window_move on the first motion after a press, never on
the press: a bar that moved on mouse-down would swallow every click on the
buttons sitting in it. And the macOS traffic lights need
Theme::TRAFFIC_LIGHT_INSET of leading room, which is nothing until the
window goes full screen and AppKit takes them away.
The window it belongs to opens with appears_transparent: true and
app_owns_titlebar_drag: true — the second one stops AppKit from
dragging the window and from delaying titlebar clicks while it waits to
see a double-click.
ⓘ
titlebar::titlebar("titlebar", &self.drag, true, window)
.px(px(8.0))
.child(/* … */)Structs§
Functions§
- titlebar
- The strip: full width,
Theme::TITLEBAR_HEIGHTtall, dragging its window and zooming it on a double click.