improv: use spacing variables in more places

This commit is contained in:
Vukašin Vojinović 2024-09-14 03:09:03 +02:00 committed by Ashley Wulber
parent 3c88edb217
commit 282700b987
3 changed files with 18 additions and 8 deletions

View file

@ -8,10 +8,13 @@ pub use self::item::{flex_item, flex_item_row, item, item_row};
pub use self::section::{section, view_section, Section};
use crate::widget::{column, Column};
use crate::Element;
use crate::{theme, Element};
/// A column with a predefined style for creating a settings panel
#[must_use]
pub fn view_column<Message: 'static>(children: Vec<Element<Message>>) -> Column<Message> {
column::with_children(children).spacing(24).padding([0, 24])
let spacing = theme::THEME.lock().unwrap().cosmic().spacing;
column::with_children(children)
.spacing(spacing.space_m)
.padding([0, spacing.space_m])
}