Adjust styling around workspaces sidebar
This commit is contained in:
parent
0cebd30600
commit
88fa8eecd1
1 changed files with 23 additions and 7 deletions
|
|
@ -122,9 +122,11 @@ fn workspaces_sidebar<'a>(
|
||||||
WorkspaceLayout::Vertical => Axis::Vertical,
|
WorkspaceLayout::Vertical => Axis::Vertical,
|
||||||
WorkspaceLayout::Horizontal => Axis::Horizontal,
|
WorkspaceLayout::Horizontal => Axis::Horizontal,
|
||||||
};
|
};
|
||||||
let sidebar_entries_container = crate::widgets::workspace_bar(sidebar_entries, axis);
|
let sidebar_entries_container =
|
||||||
let new_workspace_button =
|
widget::container(crate::widgets::workspace_bar(sidebar_entries, axis)).padding(12.0);
|
||||||
widget::button(widget::text("New Workspace")).on_press(Msg::NewWorkspace);
|
let new_workspace_button = widget::button(widget::text("New Workspace"))
|
||||||
|
.on_press(Msg::NewWorkspace)
|
||||||
|
.width(iced::Length::Fill);
|
||||||
let bar: cosmic::Element<_> = if amount != WorkspaceAmount::Dynamic {
|
let bar: cosmic::Element<_> = if amount != WorkspaceAmount::Dynamic {
|
||||||
match layout {
|
match layout {
|
||||||
WorkspaceLayout::Vertical => {
|
WorkspaceLayout::Vertical => {
|
||||||
|
|
@ -137,10 +139,24 @@ fn workspaces_sidebar<'a>(
|
||||||
} else {
|
} else {
|
||||||
sidebar_entries_container.into()
|
sidebar_entries_container.into()
|
||||||
};
|
};
|
||||||
widget::container(bar)
|
widget::container(
|
||||||
.width(iced::Length::Fill)
|
widget::container(bar)
|
||||||
.height(iced::Length::Fill)
|
.width(iced::Length::Fill)
|
||||||
.into()
|
//.height(iced::Length::Fill)
|
||||||
|
.style(cosmic::theme::Container::custom(|theme| {
|
||||||
|
cosmic::iced_style::container::Appearance {
|
||||||
|
text_color: Some(theme.cosmic().on_bg_color().into()),
|
||||||
|
icon_color: Some(theme.cosmic().on_bg_color().into()),
|
||||||
|
background: Some(iced::Color::from(theme.cosmic().background.base).into()),
|
||||||
|
border_radius: (12.0).into(),
|
||||||
|
border_width: 0.0,
|
||||||
|
border_color: iced::Color::TRANSPARENT,
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
)
|
||||||
|
.width(iced::Length::Fill)
|
||||||
|
.padding(24.0)
|
||||||
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn toplevel_preview(toplevel: &Toplevel) -> cosmic::Element<Msg> {
|
pub(crate) fn toplevel_preview(toplevel: &Toplevel) -> cosmic::Element<Msg> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue