improv: add window border

This commit is contained in:
Vukašin Vojinović 2024-11-03 19:16:37 +01:00 committed by Michael Murphy
parent 36b3cfa13a
commit 127ce17b85
26 changed files with 130 additions and 114 deletions

View file

@ -114,8 +114,8 @@ impl<'a, Message: 'static> Item<'a, Message> {
if let Some(description) = self.description {
let column = column::with_capacity(2)
.spacing(2)
.push(text(self.title).wrapping(Wrapping::Word))
.push(text(description).wrapping(Wrapping::Word).size(10))
.push(text::body(self.title).wrapping(Wrapping::Word))
.push(text::caption(description).wrapping(Wrapping::Word))
.width(Length::Fill);
contents.push(column.into());

View file

@ -5,7 +5,7 @@ pub mod item;
pub mod section;
pub use self::item::{flex_item, flex_item_row, item, item_row};
pub use self::section::{section, view_section, Section};
pub use self::section::{section, Section};
use crate::widget::{column, Column};
use crate::{theme, Element};
@ -13,8 +13,8 @@ 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> {
let spacing = theme::THEME.lock().unwrap().cosmic().spacing;
let space_m = theme::THEME.lock().unwrap().cosmic().spacing.space_m;
column::with_children(children)
.spacing(spacing.space_m)
.padding([0, spacing.space_m])
.spacing(space_m)
.padding([0, space_m])
}