fix(footer): corner radius

This commit is contained in:
Vukašin Vojinović 2024-11-15 00:56:59 +01:00 committed by Ashley Wulber
parent 62b0c8a401
commit dd79e900da
2 changed files with 5 additions and 14 deletions

View file

@ -6,7 +6,6 @@
use crate::theme::{CosmicComponent, Theme, TRANSPARENT_COMPONENT}; use crate::theme::{CosmicComponent, Theme, TRANSPARENT_COMPONENT};
use cosmic_theme::composite::over; use cosmic_theme::composite::over;
use iced::{ use iced::{
border, color,
overlay::menu, overlay::menu,
widget::{ widget::{
button as iced_button, checkbox as iced_checkbox, container as iced_container, pane_grid, button as iced_button, checkbox as iced_checkbox, container as iced_container, pane_grid,
@ -14,7 +13,6 @@ use iced::{
slider::{self, Rail}, slider::{self, Rail},
svg, toggler, svg, toggler,
}, },
Gradient,
}; };
use iced_core::{Background, Border, Color, Shadow, Vector}; use iced_core::{Background, Border, Color, Shadow, Vector};
use iced_widget::{pane_grid::Highlight, text_editor, text_input}; use iced_widget::{pane_grid::Highlight, text_editor, text_input};
@ -411,7 +409,7 @@ impl<'a> Container<'a> {
text_color: Some(Color::from(theme.background.on)), text_color: Some(Color::from(theme.background.on)),
background: Some(iced::Background::Color(theme.background.base.into())), background: Some(iced::Background::Color(theme.background.base.into())),
border: Border { border: Border {
radius: theme.corner_radii.radius_xs.into(), radius: theme.corner_radii.radius_s.into(),
..Default::default() ..Default::default()
}, },
shadow: Shadow::default(), shadow: Shadow::default(),
@ -425,7 +423,7 @@ impl<'a> Container<'a> {
text_color: Some(Color::from(theme.primary.on)), text_color: Some(Color::from(theme.primary.on)),
background: Some(iced::Background::Color(theme.primary.base.into())), background: Some(iced::Background::Color(theme.primary.base.into())),
border: Border { border: Border {
radius: theme.corner_radii.radius_xs.into(), radius: theme.corner_radii.radius_s.into(),
..Default::default() ..Default::default()
}, },
shadow: Shadow::default(), shadow: Shadow::default(),
@ -439,7 +437,7 @@ impl<'a> Container<'a> {
text_color: Some(Color::from(theme.secondary.on)), text_color: Some(Color::from(theme.secondary.on)),
background: Some(iced::Background::Color(theme.secondary.base.into())), background: Some(iced::Background::Color(theme.secondary.base.into())),
border: Border { border: Border {
radius: theme.corner_radii.radius_xs.into(), radius: theme.corner_radii.radius_s.into(),
..Default::default() ..Default::default()
}, },
shadow: Shadow::default(), shadow: Shadow::default(),
@ -531,13 +529,7 @@ impl iced_container::Catalog for Theme {
} }
Container::ContextDrawer => { Container::ContextDrawer => {
let mut appearance = crate::style::Container::primary(cosmic); let mut appearance = Container::primary(cosmic);
appearance.border = Border {
color: cosmic.primary.divider.into(),
width: 0.0,
radius: cosmic.corner_radii.radius_s.into(),
};
appearance.shadow = Shadow { appearance.shadow = Shadow {
color: cosmic.shade.into(), color: cosmic.shade.into(),

View file

@ -39,7 +39,6 @@ impl<'a, Message: Clone + 'static> ContextDrawer<'a, Message> {
{ {
let cosmic_theme::Spacing { let cosmic_theme::Spacing {
space_xxs, space_xxs,
space_xs,
space_s, space_s,
space_m, space_m,
space_l, space_l,
@ -78,7 +77,7 @@ impl<'a, Message: Clone + 'static> ContextDrawer<'a, Message> {
container(element) container(element)
.width(Length::Fixed(480.0)) .width(Length::Fixed(480.0))
.align_y(Alignment::Center) .align_y(Alignment::Center)
.padding([space_xs, horizontal_padding]) .padding([space_xxs, horizontal_padding])
}); });
let pane = column::with_capacity(3) let pane = column::with_capacity(3)
.push(header) .push(header)