feat(ui): refine Graphite visuals and center navigation content
This commit is contained in:
1 parent
cc3b6f903f
commit
1e34ec47ad
14 files changed
+646
-121
No files matched your search
@@ -61,6 +61,38 @@ pub fn panel_select<'a>(
|
||||
cosmic::widget::container(content).class(surface(ferese_theme::mix(p.card, p.text, 0.035), 7.))
|
||||
}
|
||||
|
||||
/// Low-contrast section planes replace large filled cards. High contrast
|
||||
/// preferences strengthen boundaries without changing the section hierarchy.
|
||||
pub fn section(p: Palette) -> cosmic::theme::Container<'static> {
|
||||
cosmic::theme::Container::custom(move |_| cosmic::widget::container::Style {
|
||||
background: Some(ferese_theme::mix(p.background, p.card, 0.42).into()),
|
||||
border: cosmic::iced::Border {
|
||||
width: 1.,
|
||||
color: ferese_theme::mix(
|
||||
p.background,
|
||||
p.text,
|
||||
if p.high_contrast { 0.45 } else { 0.09 },
|
||||
),
|
||||
radius: p.radius.min(10.).into(),
|
||||
shape: cosmic::iced::border::Shape::Continuous,
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
pub fn sidebar(p: Palette) -> cosmic::theme::Container<'static> {
|
||||
cosmic::theme::Container::custom(move |_| cosmic::widget::container::Style {
|
||||
background: Some(p.sidebar.into()),
|
||||
border: cosmic::iced::Border {
|
||||
width: 1.,
|
||||
color: ferese_theme::mix(p.sidebar, p.text, if p.high_contrast { 0.45 } else { 0.07 }),
|
||||
radius: 0.into(),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
pub fn color(value: &str, fallback: Color) -> Color {
|
||||
ferese_theme::parse_color(value).unwrap_or(fallback)
|
||||
}
|
||||
@@ -86,7 +118,7 @@ pub fn brand_icon() -> svg_icon::Icon {
|
||||
cosmic::widget::icon::from_svg_bytes(ferese_theme::icons::APPLICATION)
|
||||
.symbolic(false)
|
||||
.icon()
|
||||
.size(32)
|
||||
.size(24)
|
||||
.content_fit(cosmic::iced::ContentFit::Contain)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user