chore(grid): remove unused Item struct
This commit is contained in:
parent
7ee1f545e1
commit
21cc4124f0
3 changed files with 3 additions and 21 deletions
|
|
@ -7,9 +7,9 @@ use iced_core::layout::{Limits, Node};
|
||||||
use iced_core::{Alignment, Length, Padding, Point, Size};
|
use iced_core::{Alignment, Length, Padding, Point, Size};
|
||||||
|
|
||||||
use taffy::geometry::{Line, Rect};
|
use taffy::geometry::{Line, Rect};
|
||||||
use taffy::style::{AlignContent, AlignItems, Dimension, Display, GridPlacement, Style};
|
use taffy::style::{AlignItems, Dimension, Display, GridPlacement, Style};
|
||||||
use taffy::style_helpers::{auto, length};
|
use taffy::style_helpers::{auto, length};
|
||||||
use taffy::{LayoutTree, Taffy};
|
use taffy::Taffy;
|
||||||
|
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
pub fn resolve<Message>(
|
pub fn resolve<Message>(
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
pub mod layout;
|
pub mod layout;
|
||||||
pub mod widget;
|
pub mod widget;
|
||||||
|
|
||||||
pub use widget::{Grid, Item};
|
pub use widget::Grid;
|
||||||
|
|
||||||
/// Responsively generates rows and columns of widgets based on its dimmensions.
|
/// Responsively generates rows and columns of widgets based on its dimmensions.
|
||||||
pub const fn grid<'a, Message>() -> Grid<'a, Message> {
|
pub const fn grid<'a, Message>() -> Grid<'a, Message> {
|
||||||
|
|
|
||||||
|
|
@ -309,21 +309,3 @@ impl From<(u16, u16, u16, u16)> for Assignment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub struct Item<'a, Message> {
|
|
||||||
widget: Element<'a, Message>,
|
|
||||||
assignment: Assignment,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a, Message> Item<'a, Message> {
|
|
||||||
pub fn width(mut self, width: u16) -> Self {
|
|
||||||
self.assignment.width = width;
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn height(mut self, height: u16) -> Self {
|
|
||||||
self.assignment.height = height;
|
|
||||||
self
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue