use ui::titlebar::{self, CaptionSide, DragState};
// self.drag: DragState, one field on the view
titlebar::titlebar("titlebar", true, window)
.px(px(8.0))
.child(titlebar::controls(CaptionSide::Left, window, cx))
.child(title)
.child(titlebar::grip("titlebar-grip", &self.drag, window))
.child(actions)
.child(titlebar::controls(CaptionSide::Right, window, cx))- Open the window with
appears_transparent: true, and on Linux ask forWindowDecorations::Client. - Only the
gripmoves the window, and it takes the free space the content leaves. A bar with no grip has no handle off macOS. - Call
controlsat both ends; the desktop decides which one fills. They are empty on macOS and in full screen. The frame around the window isui::window::frame. - Pass
traffic_lights: trueon the one strip the macOS lights sit over.