chore: Rust 2024 and update dependencies
This commit is contained in:
parent
05c9af1b95
commit
a939335b9e
23 changed files with 941 additions and 722 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
target/
|
target/
|
||||||
.cargo/
|
.cargo/
|
||||||
vendor.tar
|
vendor.tar
|
||||||
|
vendor/
|
||||||
|
|
|
||||||
1537
Cargo.lock
generated
1537
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
30
Cargo.toml
30
Cargo.toml
|
|
@ -1,16 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cosmic-workspaces"
|
name = "cosmic-workspaces"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.99"
|
||||||
calloop = { version = "0.14.2", features = ["executor"] }
|
calloop = { version = "0.14.3", features = ["executor"] }
|
||||||
clap = { version = "4", features = ["derive"] }
|
clap = { version = "4", features = ["derive"] }
|
||||||
cosmic-bg-config = { git = "https://github.com/pop-os/cosmic-bg" }
|
cosmic-bg-config = { git = "https://github.com/pop-os/cosmic-bg" }
|
||||||
cosmic-comp-config = { git = "https://github.com/pop-os/cosmic-comp" }
|
cosmic-comp-config = { git = "https://github.com/pop-os/cosmic-comp" }
|
||||||
env_logger = "0.11.0"
|
env_logger = "0.11.8"
|
||||||
futures-channel = "0.3.25"
|
futures-channel = "0.3.31"
|
||||||
gbm = "0.18.0"
|
gbm = "0.18.0"
|
||||||
libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = [
|
libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = [
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
@ -23,21 +23,21 @@ libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = fa
|
||||||
cosmic-config = { git = "https://github.com/pop-os/libcosmic" }
|
cosmic-config = { git = "https://github.com/pop-os/libcosmic" }
|
||||||
freedesktop-icons = { package = "cosmic-freedesktop-icons", git = "https://github.com/pop-os/freedesktop-icons" }
|
freedesktop-icons = { package = "cosmic-freedesktop-icons", git = "https://github.com/pop-os/freedesktop-icons" }
|
||||||
|
|
||||||
memmap2 = "0.9.0"
|
memmap2 = "0.9.8"
|
||||||
tokio = "1.23.0"
|
tokio = "1.47.1"
|
||||||
wayland-protocols = "0.32.1"
|
wayland-protocols = "0.32.9"
|
||||||
delegate = "0.13.0"
|
delegate = "0.13.4"
|
||||||
itertools = "0.14.0"
|
itertools = "0.14.0"
|
||||||
log = "0.4.20"
|
log = "0.4.28"
|
||||||
i18n-embed-fl = "0.9.0"
|
i18n-embed-fl = "0.10"
|
||||||
rust-embed = "8.1.0"
|
rust-embed = "8.7.2"
|
||||||
rustix = { version = "1.0.7", features = ["fs", "shm"] }
|
rustix = { version = "1.1.2", features = ["fs", "shm"] }
|
||||||
calloop-wayland-source = "0.4.0"
|
calloop-wayland-source = "0.4.1"
|
||||||
aliasable = "0.1.3"
|
aliasable = "0.1.3"
|
||||||
futures-executor = { version = "0.3.31", features = ["thread-pool"] }
|
futures-executor = { version = "0.3.31", features = ["thread-pool"] }
|
||||||
|
|
||||||
[dependencies.i18n-embed]
|
[dependencies.i18n-embed]
|
||||||
version = "0.15.3"
|
version = "0.16"
|
||||||
features = ["fluent-system", "desktop-requester"]
|
features = ["fluent-system", "desktop-requester"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@ use cosmic::{
|
||||||
workspace::v2::client::zcosmic_workspace_handle_v2,
|
workspace::v2::client::zcosmic_workspace_handle_v2,
|
||||||
},
|
},
|
||||||
wayland_client::{
|
wayland_client::{
|
||||||
protocol::{wl_output, wl_shm},
|
|
||||||
Connection, WEnum,
|
Connection, WEnum,
|
||||||
|
protocol::{wl_output, wl_shm},
|
||||||
},
|
},
|
||||||
wayland_protocols::ext::workspace::v1::client::ext_workspace_handle_v1,
|
wayland_protocols::ext::workspace::v1::client::ext_workspace_handle_v1,
|
||||||
},
|
},
|
||||||
iced::{
|
iced::{
|
||||||
self,
|
self,
|
||||||
futures::{executor::block_on, FutureExt, SinkExt},
|
futures::{FutureExt, SinkExt, executor::block_on},
|
||||||
},
|
},
|
||||||
iced_winit::platform_specific::wayland::subsurface_widget::{Shmbuf, SubsurfaceBuffer},
|
iced_winit::platform_specific::wayland::subsurface_widget::{Shmbuf, SubsurfaceBuffer},
|
||||||
};
|
};
|
||||||
|
|
@ -27,8 +27,8 @@ use std::{
|
||||||
fs,
|
fs,
|
||||||
io::{self, Write},
|
io::{self, Write},
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicU32, Ordering},
|
|
||||||
Arc,
|
Arc,
|
||||||
|
atomic::{AtomicU32, Ordering},
|
||||||
},
|
},
|
||||||
thread,
|
thread,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ pub use wayland::subscription;
|
||||||
mod mock;
|
mod mock;
|
||||||
#[cfg(feature = "mock-backend")]
|
#[cfg(feature = "mock-backend")]
|
||||||
pub use mock::{
|
pub use mock::{
|
||||||
subscription, ExtForeignToplevelHandleV1, ExtWorkspaceHandleV1, ToplevelInfo, Workspace,
|
ExtForeignToplevelHandleV1, ExtWorkspaceHandleV1, ToplevelInfo, Workspace, subscription,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
use cctk::{
|
use cctk::{
|
||||||
screencopy::Formats,
|
screencopy::Formats,
|
||||||
wayland_client::{
|
wayland_client::{
|
||||||
protocol::{wl_buffer, wl_shm, wl_shm_pool},
|
|
||||||
Connection, Dispatch, QueueHandle,
|
Connection, Dispatch, QueueHandle,
|
||||||
|
protocol::{wl_buffer, wl_shm, wl_shm_pool},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
|
|
@ -87,7 +87,6 @@ impl AppData {
|
||||||
let Some((_dev_path, gbm)) = self.gbm_devices.gbm_device(drm_dev)? else {
|
let Some((_dev_path, gbm)) = self.gbm_devices.gbm_device(drm_dev)? else {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
};
|
};
|
||||||
let formats = feedback.format_table();
|
|
||||||
|
|
||||||
let modifiers = modifiers
|
let modifiers = modifiers
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ use cctk::{
|
||||||
self,
|
self,
|
||||||
dmabuf::{DmabufFeedback, DmabufHandler, DmabufState},
|
dmabuf::{DmabufFeedback, DmabufHandler, DmabufState},
|
||||||
},
|
},
|
||||||
wayland_client::{protocol::wl_buffer, Connection, QueueHandle},
|
wayland_client::{Connection, QueueHandle, protocol::wl_buffer},
|
||||||
};
|
};
|
||||||
use cosmic::cctk;
|
use cosmic::cctk;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ use cctk::{
|
||||||
toplevel_info::ToplevelInfoState,
|
toplevel_info::ToplevelInfoState,
|
||||||
toplevel_management::ToplevelManagerState,
|
toplevel_management::ToplevelManagerState,
|
||||||
wayland_client::{
|
wayland_client::{
|
||||||
globals::registry_queue_init, protocol::wl_seat, Connection, Proxy, QueueHandle,
|
Connection, Proxy, QueueHandle, globals::registry_queue_init, protocol::wl_seat,
|
||||||
},
|
},
|
||||||
workspace::WorkspaceState,
|
workspace::WorkspaceState,
|
||||||
};
|
};
|
||||||
|
|
@ -23,7 +23,7 @@ use cosmic::{
|
||||||
cctk,
|
cctk,
|
||||||
iced::{
|
iced::{
|
||||||
self,
|
self,
|
||||||
futures::{executor::block_on, FutureExt, SinkExt},
|
futures::{FutureExt, SinkExt, executor::block_on},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use futures_channel::mpsc;
|
use futures_channel::mpsc;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
//! Types related to drag-and-drop
|
//! Types related to drag-and-drop
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
cctk::wayland_client::{protocol::wl_output, Proxy},
|
cctk::wayland_client::{Proxy, protocol::wl_output},
|
||||||
iced::clipboard::mime::AsMimeTypes,
|
iced::clipboard::mime::AsMimeTypes,
|
||||||
};
|
};
|
||||||
use std::{borrow::Cow, sync::LazyLock};
|
use std::{borrow::Cow, sync::LazyLock};
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
|
||||||
DefaultLocalizer, LanguageLoader, Localizer,
|
DefaultLocalizer, LanguageLoader, Localizer,
|
||||||
|
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||||
};
|
};
|
||||||
use rust_embed::RustEmbed;
|
use rust_embed::RustEmbed;
|
||||||
use std::sync::LazyLock;
|
use std::sync::LazyLock;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use cctk::{
|
||||||
cosmic_protocols::toplevel_management::v1::client::zcosmic_toplevel_manager_v1,
|
cosmic_protocols::toplevel_management::v1::client::zcosmic_toplevel_manager_v1,
|
||||||
cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2,
|
cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2,
|
||||||
sctk::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer},
|
sctk::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer},
|
||||||
wayland_client::{protocol::wl_output, Connection, Proxy},
|
wayland_client::{Connection, Proxy, protocol::wl_output},
|
||||||
wayland_protocols::ext::workspace::v1::client::ext_workspace_handle_v1,
|
wayland_protocols::ext::workspace::v1::client::ext_workspace_handle_v1,
|
||||||
};
|
};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
@ -15,12 +15,11 @@ use cosmic::{
|
||||||
app::{Application, CosmicFlags},
|
app::{Application, CosmicFlags},
|
||||||
cctk, dbus_activation,
|
cctk, dbus_activation,
|
||||||
iced::{
|
iced::{
|
||||||
self,
|
self, Size, Subscription, Task,
|
||||||
clipboard::dnd::{DndEvent, SourceEvent},
|
clipboard::dnd::{DndEvent, SourceEvent},
|
||||||
event::wayland::{Event as WaylandEvent, LayerEvent, OutputEvent},
|
event::wayland::{Event as WaylandEvent, LayerEvent, OutputEvent},
|
||||||
keyboard::key::{Key, Named},
|
keyboard::key::{Key, Named},
|
||||||
mouse::ScrollDelta,
|
mouse::ScrollDelta,
|
||||||
Size, Subscription, Task,
|
|
||||||
},
|
},
|
||||||
iced_core::window::Id as SurfaceId,
|
iced_core::window::Id as SurfaceId,
|
||||||
iced_runtime::platform_specific::wayland::layer_surface::{
|
iced_runtime::platform_specific::wayland::layer_surface::{
|
||||||
|
|
@ -31,7 +30,7 @@ use cosmic::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use cosmic_comp_config::CosmicCompConfig;
|
use cosmic_comp_config::CosmicCompConfig;
|
||||||
use cosmic_config::{cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry};
|
use cosmic_config::{CosmicConfigEntry, cosmic_config_derive::CosmicConfigEntry};
|
||||||
use i18n_embed::DesktopLanguageRequester;
|
use i18n_embed::DesktopLanguageRequester;
|
||||||
use std::{
|
use std::{
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
|
Apply,
|
||||||
cctk::{
|
cctk::{
|
||||||
cosmic_protocols::{
|
cosmic_protocols::{
|
||||||
toplevel_info::v1::client::zcosmic_toplevel_handle_v1,
|
toplevel_info::v1::client::zcosmic_toplevel_handle_v1,
|
||||||
|
|
@ -8,24 +9,22 @@ use cosmic::{
|
||||||
wayland_protocols::ext::workspace::v1::client::ext_workspace_handle_v1,
|
wayland_protocols::ext::workspace::v1::client::ext_workspace_handle_v1,
|
||||||
},
|
},
|
||||||
iced::{
|
iced::{
|
||||||
self,
|
self, Alignment, Border, Length,
|
||||||
advanced::layout::flex::Axis,
|
advanced::layout::flex::Axis,
|
||||||
clipboard::mime::{AllowedMimeTypes, AsMimeTypes},
|
clipboard::mime::{AllowedMimeTypes, AsMimeTypes},
|
||||||
widget::{column, row},
|
widget::{column, row},
|
||||||
Alignment, Border, Length,
|
|
||||||
},
|
},
|
||||||
iced_core::{text::Wrapping, Shadow},
|
iced_core::{Shadow, text::Wrapping},
|
||||||
iced_winit::platform_specific::wayland::subsurface_widget::Subsurface,
|
iced_winit::platform_specific::wayland::subsurface_widget::Subsurface,
|
||||||
widget::{self, Widget},
|
widget::{self, Widget},
|
||||||
Apply,
|
|
||||||
};
|
};
|
||||||
use cosmic_comp_config::workspace::WorkspaceLayout;
|
use cosmic_comp_config::workspace::WorkspaceLayout;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
App, LayerSurface, Msg, Toplevel, Workspace,
|
||||||
backend::{self, CaptureImage},
|
backend::{self, CaptureImage},
|
||||||
dnd::{Drag, DragSurface, DragToplevel, DragWorkspace, DropTarget},
|
dnd::{Drag, DragSurface, DragToplevel, DragWorkspace, DropTarget},
|
||||||
App, LayerSurface, Msg, Toplevel, Workspace,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fn dnd_source_with_drag_surface<D: AsMimeTypes + Send + Clone + 'static>(
|
fn dnd_source_with_drag_surface<D: AsMimeTypes + Send + Clone + 'static>(
|
||||||
|
|
@ -291,8 +290,8 @@ fn workspace_item(
|
||||||
"workspace",
|
"workspace",
|
||||||
HashMap::from([("number", &workspace.info.name)])
|
HashMap::from([("number", &workspace.info.name)])
|
||||||
))
|
))
|
||||||
.width(Length::Fill)
|
.apply(widget::container)
|
||||||
.align_x(Alignment::Center),
|
.center_x(Length::Fill),
|
||||||
pin_button(workspace),
|
pin_button(workspace),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -304,7 +303,7 @@ fn workspace_item(
|
||||||
.spacing(4)
|
.spacing(4)
|
||||||
.align_x(Alignment::Center)
|
.align_x(Alignment::Center)
|
||||||
.apply(widget::container)
|
.apply(widget::container)
|
||||||
.max_height(image_height + 26.0)
|
.max_height(image_height + 28.0)
|
||||||
.max_width(image_width);
|
.max_width(image_width);
|
||||||
|
|
||||||
let is_active = workspace.is_active() && !has_workspace_drag;
|
let is_active = workspace.is_active() && !has_workspace_drag;
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::{
|
iced::{
|
||||||
|
Length, Rectangle, Size, Vector,
|
||||||
advanced::{
|
advanced::{
|
||||||
|
Clipboard, Layout, Shell, Widget,
|
||||||
layout::{self},
|
layout::{self},
|
||||||
mouse, overlay, renderer,
|
mouse, overlay, renderer,
|
||||||
widget::{tree, Operation, Tree},
|
widget::{Operation, Tree, tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Rectangle, Size, Vector,
|
|
||||||
},
|
},
|
||||||
iced_core::Renderer,
|
iced_core::Renderer,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
//! Show one surface, sized to match the size of another (invisible) widget
|
//! Show one surface, sized to match the size of another (invisible) widget
|
||||||
|
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
Length, Rectangle, Size,
|
||||||
advanced::{
|
advanced::{
|
||||||
layout, mouse, renderer,
|
Clipboard, Layout, Shell, Widget, layout, mouse, renderer,
|
||||||
widget::{Operation, Tree},
|
widget::{Operation, Tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Rectangle, Size,
|
|
||||||
};
|
};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
Length, Rectangle, Size, Vector,
|
||||||
advanced::{
|
advanced::{
|
||||||
layout, mouse, overlay, renderer,
|
Clipboard, Layout, Shell, Widget, layout, mouse, overlay, renderer,
|
||||||
widget::{tree, Id, Operation, Tree},
|
widget::{Id, Operation, Tree, tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Rectangle, Size, Vector,
|
|
||||||
};
|
};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
Length, Rectangle, Size, Vector,
|
||||||
advanced::{
|
advanced::{
|
||||||
layout, mouse, overlay, renderer,
|
Clipboard, Layout, Shell, Widget, layout, mouse, overlay, renderer,
|
||||||
widget::{tree, Id, Operation, Tree},
|
widget::{Id, Operation, Tree, tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Rectangle, Size, Vector,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
// This widget defines it's cross axis size as the `index`th child's size
|
// This widget defines it's cross axis size as the `index`th child's size
|
||||||
|
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
Length, Point, Rectangle, Size,
|
||||||
advanced::{
|
advanced::{
|
||||||
|
Clipboard, Layout, Shell, Widget,
|
||||||
layout::{self, flex::Axis},
|
layout::{self, flex::Axis},
|
||||||
mouse, renderer,
|
mouse, renderer,
|
||||||
widget::{Operation, Tree},
|
widget::{Operation, Tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Point, Rectangle, Size,
|
|
||||||
};
|
};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
Length, Rectangle, Size, Vector,
|
||||||
advanced::{
|
advanced::{
|
||||||
|
Clipboard, Layout, Shell, Widget,
|
||||||
layout::{self, flex::Axis},
|
layout::{self, flex::Axis},
|
||||||
mouse, renderer,
|
mouse, renderer,
|
||||||
widget::{Operation, Tree},
|
widget::{Operation, Tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Rectangle, Size, Vector,
|
|
||||||
};
|
};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use aliasable::vec::AliasableVec;
|
use aliasable::vec::AliasableVec;
|
||||||
use cosmic::iced::{advanced::layout::flex::Axis, Length, Point, Rectangle, Size};
|
use cosmic::iced::{Length, Point, Rectangle, Size, advanced::layout::flex::Axis};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
use super::{LayoutToplevel, ToplevelLayout};
|
use super::{LayoutToplevel, ToplevelLayout};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
use cosmic::iced::{advanced::layout::flex::Axis, Length};
|
use cosmic::iced::{Length, advanced::layout::flex::Axis};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
axis_toplevel_layout::{AxisPoint, AxisRectangle, AxisSize, AxisToplevelLayout},
|
|
||||||
LayoutToplevel,
|
LayoutToplevel,
|
||||||
|
axis_toplevel_layout::{AxisPoint, AxisRectangle, AxisSize, AxisToplevelLayout},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(crate) struct RowColToplevelLayout {
|
pub(crate) struct RowColToplevelLayout {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
use cosmic::iced::{advanced::layout::flex::Axis, Length};
|
use cosmic::iced::{Length, advanced::layout::flex::Axis};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
|
LayoutToplevel,
|
||||||
axis_toplevel_layout::{AxisRectangle, AxisSize, AxisToplevelLayout},
|
axis_toplevel_layout::{AxisRectangle, AxisSize, AxisToplevelLayout},
|
||||||
row_col_toplevel_layout::RowColToplevelLayout,
|
row_col_toplevel_layout::RowColToplevelLayout,
|
||||||
LayoutToplevel,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(crate) struct TwoRowColToplevelLayout(RowColToplevelLayout);
|
pub(crate) struct TwoRowColToplevelLayout(RowColToplevelLayout);
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,12 @@
|
||||||
//! takes the same space but does not draw.
|
//! takes the same space but does not draw.
|
||||||
|
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
Length, Rectangle, Size,
|
||||||
advanced::{
|
advanced::{
|
||||||
layout, mouse, renderer,
|
Clipboard, Layout, Shell, Widget, layout, mouse, renderer,
|
||||||
widget::{Operation, Tree},
|
widget::{Operation, Tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Rectangle, Size,
|
|
||||||
};
|
};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@
|
||||||
// Gives each child widget a maximum size on main axis of total/n
|
// Gives each child widget a maximum size on main axis of total/n
|
||||||
|
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
Length, Point, Rectangle, Size,
|
||||||
advanced::{
|
advanced::{
|
||||||
|
Clipboard, Layout, Shell, Widget,
|
||||||
layout::{self, flex::Axis},
|
layout::{self, flex::Axis},
|
||||||
mouse, renderer,
|
mouse, renderer,
|
||||||
widget::{Operation, Tree},
|
widget::{Operation, Tree},
|
||||||
Clipboard, Layout, Shell, Widget,
|
|
||||||
},
|
},
|
||||||
core::clipboard::DndDestinationRectangles,
|
core::clipboard::DndDestinationRectangles,
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
Length, Point, Rectangle, Size,
|
|
||||||
};
|
};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue