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:
parent
e81f9701f6
commit
2378aa049d
1 changed files with 9 additions and 7 deletions
16
src/tab.rs
16
src/tab.rs
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue