Remove extra items from header
This commit is contained in:
parent
dfb86e4ce2
commit
c74d5d6f56
2 changed files with 3 additions and 29 deletions
30
src/main.rs
30
src/main.rs
|
|
@ -14,8 +14,7 @@ use cosmic::{
|
||||||
futures::SinkExt,
|
futures::SinkExt,
|
||||||
keyboard::{Event as KeyEvent, KeyCode, Modifiers},
|
keyboard::{Event as KeyEvent, KeyCode, Modifiers},
|
||||||
subscription::{self, Subscription},
|
subscription::{self, Subscription},
|
||||||
widget::row,
|
window, Event, Length, Point,
|
||||||
window, Alignment, Event, Length, Point,
|
|
||||||
},
|
},
|
||||||
style,
|
style,
|
||||||
widget::{self, segmented_button},
|
widget::{self, segmented_button},
|
||||||
|
|
@ -724,32 +723,7 @@ impl Application for App {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn header_start(&self) -> Vec<Element<Self::Message>> {
|
fn header_start(&self) -> Vec<Element<Self::Message>> {
|
||||||
let cosmic_theme::Spacing { space_xxs, .. } = self.core().system_theme().cosmic().spacing;
|
vec![menu_bar(&self.config).into()]
|
||||||
|
|
||||||
vec![row![
|
|
||||||
widget::button(widget::icon::from_name("list-add-symbolic").size(16).icon())
|
|
||||||
.on_press(Message::TabNew)
|
|
||||||
.padding(space_xxs)
|
|
||||||
.style(style::Button::Icon),
|
|
||||||
menu_bar(&self.config)
|
|
||||||
]
|
|
||||||
.align_items(Alignment::Center)
|
|
||||||
.into()]
|
|
||||||
}
|
|
||||||
|
|
||||||
fn header_end(&self) -> Vec<Element<Self::Message>> {
|
|
||||||
let cosmic_theme::Spacing { space_xxs, .. } = self.core().system_theme().cosmic().spacing;
|
|
||||||
|
|
||||||
vec![row![widget::button(
|
|
||||||
widget::icon::from_name("preferences-system-symbolic")
|
|
||||||
.size(16)
|
|
||||||
.icon()
|
|
||||||
)
|
|
||||||
.on_press(Message::ToggleContextPage(ContextPage::Settings))
|
|
||||||
.padding(space_xxs)
|
|
||||||
.style(style::Button::Icon)]
|
|
||||||
.align_items(Alignment::Center)
|
|
||||||
.into()]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a view after each update.
|
/// Creates a view after each update.
|
||||||
|
|
|
||||||
|
|
@ -474,7 +474,7 @@ where
|
||||||
status = Status::Captured;
|
status = Status::Captured;
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
},
|
||||||
(_, _, true, _) => {
|
(_, _, true, _) => {
|
||||||
// Ignore alt keys
|
// Ignore alt keys
|
||||||
//TODO: alt keys for control characters
|
//TODO: alt keys for control characters
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue