fix: make full titlebar strip draggable in dock and sidebar

This commit is contained in:
2026-11-09 10:04:57 +07:00
parent 7784e8d570
commit 6815585528
4 changed files with 49 additions and 37 deletions
+1 -3
View File
@@ -166,9 +166,7 @@ pub fn maximize_on_double_click() -> impl Fn(&ClickEvent, &mut Window, &mut App)
}
}
/// Makes an element a titlebar strip: pressing and dragging it moves the
/// window, double-clicking maximizes, and Windows keeps its native caption
/// behavior through the `Drag` control area.
/// Makes an element a titlebar strip.
pub fn titlebar_strip(this: Stateful<Div>, window: &mut Window, cx: &mut App) -> Stateful<Div> {
let should_move = window.use_state(cx, |_, _| false);
this.window_control_area(WindowControlArea::Drag)