Update iced/libcosmic
This commit is contained in:
parent
e0c0f27f67
commit
b70828e23f
17 changed files with 2019 additions and 1262 deletions
|
|
@ -5,9 +5,10 @@ use cosmic::iced::{
|
|||
advanced::{
|
||||
layout::{self, flex::Axis},
|
||||
mouse, renderer,
|
||||
widget::{Operation, OperationOutputWrapper, Tree},
|
||||
widget::{Operation, Tree},
|
||||
Clipboard, Layout, Shell, Widget,
|
||||
},
|
||||
core::clipboard::DndDestinationRectangles,
|
||||
event::{self, Event},
|
||||
Length, Point, Rectangle, Size,
|
||||
};
|
||||
|
|
@ -122,7 +123,7 @@ impl<'a, Msg> Widget<Msg, cosmic::Theme, cosmic::Renderer> for WorkspaceBar<'a,
|
|||
tree: &mut Tree,
|
||||
layout: Layout<'_>,
|
||||
renderer: &cosmic::Renderer,
|
||||
operation: &mut dyn Operation<OperationOutputWrapper<Msg>>,
|
||||
operation: &mut dyn Operation<()>,
|
||||
) {
|
||||
operation.container(None, layout.bounds(), &mut |operation| {
|
||||
self.children
|
||||
|
|
@ -219,6 +220,24 @@ impl<'a, Msg> Widget<Msg, cosmic::Theme, cosmic::Renderer> for WorkspaceBar<'a,
|
|||
fn diff(&mut self, tree: &mut Tree) {
|
||||
tree.diff_children(&mut self.children);
|
||||
}
|
||||
|
||||
fn drag_destinations(
|
||||
&self,
|
||||
state: &Tree,
|
||||
layout: Layout<'_>,
|
||||
renderer: &cosmic::Renderer,
|
||||
dnd_rectangles: &mut DndDestinationRectangles,
|
||||
) {
|
||||
for ((e, layout), state) in self
|
||||
.children
|
||||
.iter()
|
||||
.zip(layout.children())
|
||||
.zip(state.children.iter())
|
||||
{
|
||||
e.as_widget()
|
||||
.drag_destinations(state, layout, renderer, dnd_rectangles);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Msg: 'static> From<WorkspaceBar<'a, Msg>> for cosmic::Element<'a, Msg> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue