Add new tab button next to window controls (#89)

This commit is contained in:
Jeremy Soller 2024-01-31 10:37:10 -07:00
parent ff6ad163d6
commit 6ec3e499cb
No known key found for this signature in database
GPG key ID: D02FD439211AF56F

View file

@ -1403,6 +1403,15 @@ impl Application for App {
vec![menu_bar(&self.key_binds).into()]
}
fn header_end(&self) -> Vec<Element<Self::Message>> {
let cosmic_theme::Spacing { space_xxs, .. } = self.core().system_theme().cosmic().spacing;
vec![widget::button(widget::icon::from_name("list-add-symbolic"))
.on_press(Message::TabNew)
.padding(space_xxs)
.style(style::Button::Icon)
.into()]
}
/// Creates a view after each update.
fn view(&self) -> Element<Self::Message> {
let cosmic_theme::Spacing { space_xxs, .. } = self.core().system_theme().cosmic().spacing;