Fix drag select for grid view

When there was a single row of files and there weren't enough files to
fill the row, you couldn't initiate a drag select from the right side of
these files.
This commit is contained in:
Jason Rodney Hansen 2024-07-03 16:31:30 -06:00
parent e81f9701f6
commit 2378aa049d

View file

@ -2296,13 +2296,15 @@ impl Tab {
Element::from(dnd_grid)
.map(|m| cosmic::app::Message::App(crate::app::Message::TabMessage(None, m)))
}),
mouse_area::MouseArea::new(widget::column::with_children(children))
.on_press(|_| Message::Click(None))
.on_drag(Message::Drag)
.on_drag_end(|_| Message::DragEnd(None))
.show_drag_rect(true)
.on_release(|_| Message::ClickRelease(None))
.into(),
mouse_area::MouseArea::new(
widget::container(widget::column::with_children(children)).width(Length::Fill),
)
.on_press(|_| Message::Click(None))
.on_drag(Message::Drag)
.on_drag_end(|_| Message::DragEnd(None))
.show_drag_rect(true)
.on_release(|_| Message::ClickRelease(None))
.into(),
true,
)
}