Spacing and alignment adjustments
This commit is contained in:
parent
6053c527a8
commit
c8f0590a55
1 changed files with 21 additions and 7 deletions
|
|
@ -68,10 +68,14 @@ pub(crate) fn layer_surface<'a>(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn close_button(on_press: Msg) -> cosmic::Element<'static, Msg> {
|
fn close_button(on_press: Msg) -> cosmic::Element<'static, Msg> {
|
||||||
widget::button(widget::icon::from_name("window-close-symbolic").size(16))
|
widget::container(
|
||||||
.style(cosmic::theme::Button::Destructive)
|
widget::button(widget::icon::from_name("window-close-symbolic").size(16))
|
||||||
.on_press(on_press)
|
.style(cosmic::theme::Button::Destructive)
|
||||||
.into()
|
.on_press(on_press),
|
||||||
|
)
|
||||||
|
.align_x(iced::alignment::Horizontal::Right)
|
||||||
|
.width(iced::Length::Fill)
|
||||||
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn workspace_item<'a>(
|
pub(crate) fn workspace_item<'a>(
|
||||||
|
|
@ -86,6 +90,7 @@ pub(crate) fn workspace_item<'a>(
|
||||||
.style(cosmic::theme::Button::Image)
|
.style(cosmic::theme::Button::Image)
|
||||||
.on_press(Msg::ActivateWorkspace(workspace.handle.clone())),
|
.on_press(Msg::ActivateWorkspace(workspace.handle.clone())),
|
||||||
]
|
]
|
||||||
|
.spacing(4)
|
||||||
//.height(iced::Length::Fill)
|
//.height(iced::Length::Fill)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
@ -146,9 +151,16 @@ fn workspaces_sidebar<'a>(
|
||||||
};
|
};
|
||||||
let sidebar_entries_container =
|
let sidebar_entries_container =
|
||||||
widget::container(crate::widgets::workspace_bar(sidebar_entries, axis)).padding(12.0);
|
widget::container(crate::widgets::workspace_bar(sidebar_entries, axis)).padding(12.0);
|
||||||
let new_workspace_button = widget::button(widget::text("New Workspace"))
|
let new_workspace_button = widget::button(
|
||||||
.on_press(Msg::NewWorkspace)
|
widget::container(row![
|
||||||
.width(iced::Length::Fill);
|
widget::icon::from_name("list-add-symbolic").symbolic(true),
|
||||||
|
widget::text("New Workspace")
|
||||||
|
])
|
||||||
|
.width(iced::Length::Fill)
|
||||||
|
.align_x(iced::alignment::Horizontal::Center),
|
||||||
|
)
|
||||||
|
.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 => {
|
||||||
|
|
@ -196,6 +208,8 @@ pub(crate) fn toplevel_preview(toplevel: &Toplevel) -> cosmic::Element<Msg> {
|
||||||
widget::button(widget::text(&toplevel.info.title))
|
widget::button(widget::text(&toplevel.info.title))
|
||||||
.on_press(Msg::ActivateToplevel(toplevel.handle.clone()))
|
.on_press(Msg::ActivateToplevel(toplevel.handle.clone()))
|
||||||
]
|
]
|
||||||
|
.spacing(4)
|
||||||
|
.align_items(iced::Alignment::Center)
|
||||||
.width(iced::Length::Fill)
|
.width(iced::Length::Fill)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue