Use default nav bar style, fixes #64
This commit is contained in:
parent
d2d0b02afd
commit
9cc1a0f16d
2 changed files with 0 additions and 38 deletions
19
src/app.rs
19
src/app.rs
|
|
@ -623,25 +623,6 @@ impl Application for App {
|
|||
(app, Command::batch(commands))
|
||||
}
|
||||
|
||||
// The default nav_bar widget needs to have its width reduced for cosmic-files
|
||||
fn nav_bar(&self) -> Option<Element<message::Message<Self::Message>>> {
|
||||
if !self.core().nav_bar_active() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let nav_model = self.nav_model()?;
|
||||
|
||||
let mut nav = widget::nav_bar(nav_model, |entity| {
|
||||
message::cosmic(cosmic::app::cosmic::Message::NavBar(entity))
|
||||
});
|
||||
|
||||
if !self.core().is_condensed() {
|
||||
nav = nav.max_width(200);
|
||||
}
|
||||
|
||||
Some(Element::from(nav))
|
||||
}
|
||||
|
||||
fn nav_model(&self) -> Option<&segmented_button::SingleSelectModel> {
|
||||
Some(&self.nav_model)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,25 +395,6 @@ impl Application for App {
|
|||
None
|
||||
}
|
||||
|
||||
// The default nav_bar widget needs to have its width reduced for cosmic-files
|
||||
fn nav_bar(&self) -> Option<Element<message::Message<Message>>> {
|
||||
if !self.core().nav_bar_active() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let nav_model = self.nav_model()?;
|
||||
|
||||
let mut nav = widget::nav_bar(nav_model, |entity| {
|
||||
message::cosmic(cosmic::app::cosmic::Message::NavBar(entity))
|
||||
});
|
||||
|
||||
if !self.core().is_condensed() {
|
||||
nav = nav.max_width(200);
|
||||
}
|
||||
|
||||
Some(Element::from(nav))
|
||||
}
|
||||
|
||||
fn nav_model(&self) -> Option<&segmented_button::SingleSelectModel> {
|
||||
Some(&self.nav_model)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue