chore: re-export iced row and column

This removes the custom row and column implementations and uses the iced ones directly.
This commit is contained in:
Vukašin Vojinović 2026-04-01 23:24:53 +02:00 committed by Michael Murphy
parent a9e0671075
commit fdf3369cea
20 changed files with 103 additions and 227 deletions

View file

@ -24,7 +24,7 @@
//! .on_press(Message::LaunchUrl(REPOSITORY))
//! .padding(0);
//!
//! let content = widget::column()
//! let content = widget::column::with_capacity(3)
//! .push(widget::icon::from_name("my-app-icon"))
//! .push(widget::text::title3("My App Name"))
//! .push(link)
@ -53,6 +53,9 @@ pub use iced::widget::{Canvas, canvas};
#[doc(inline)]
pub use iced::widget::{Checkbox, checkbox};
#[doc(inline)]
pub use iced::widget::{Column, column};
#[doc(inline)]
pub use iced::widget::{ComboBox, combo_box};
@ -80,6 +83,9 @@ pub use iced::widget::{ProgressBar, progress_bar};
#[doc(inline)]
pub use iced::widget::{Responsive, responsive};
#[doc(inline)]
pub use iced::widget::{Row, row};
#[doc(inline)]
pub use iced::widget::{Slider, VerticalSlider, slider, vertical_slider};
@ -135,34 +141,6 @@ pub mod context_drawer;
#[doc(inline)]
pub use context_drawer::{ContextDrawer, context_drawer};
#[doc(inline)]
pub use column::{Column, column};
pub mod column {
//! A container which aligns its children in a column.
pub type Column<'a, Message> = iced::widget::Column<'a, Message, crate::Theme, crate::Renderer>;
#[must_use]
/// A container which aligns its children in a column.
pub fn column<'a, Message>() -> Column<'a, Message> {
Column::new()
}
#[must_use]
/// A pre-allocated [`column`].
pub fn with_capacity<'a, Message>(capacity: usize) -> Column<'a, Message> {
Column::with_capacity(capacity)
}
#[must_use]
/// A [`column`] that will be assigned an [`Iterator`] of children.
pub fn with_children<'a, Message>(
children: impl IntoIterator<Item = crate::Element<'a, Message>>,
) -> Column<'a, Message> {
Column::with_children(children)
}
}
pub mod layer_container;
#[doc(inline)]
pub use layer_container::{LayerContainer, layer_container};
@ -287,35 +265,6 @@ pub mod rectangle_tracker;
#[doc(inline)]
pub use rectangle_tracker::{RectangleTracker, rectangle_tracking_container};
#[doc(inline)]
pub use row::{Row, row};
pub mod row {
//! A container which aligns its children in a row.
pub type Row<'a, Message> = iced::widget::Row<'a, Message, crate::Theme, crate::Renderer>;
#[must_use]
/// A container which aligns its children in a row.
pub fn row<'a, Message>() -> Row<'a, Message> {
Row::new()
}
#[must_use]
/// A pre-allocated [`row`].
pub fn with_capacity<'a, Message>(capacity: usize) -> Row<'a, Message> {
Row::with_capacity(capacity)
}
#[must_use]
/// A [`row`] that will be assigned an [`Iterator`] of children.
pub fn with_children<'a, Message>(
children: impl IntoIterator<Item = crate::Element<'a, Message>>,
) -> Row<'a, Message> {
Row::with_children(children)
}
}
pub mod scrollable;
#[doc(inline)]
pub use scrollable::scrollable;