feat: redesign the header bar for SSD
This commit is contained in:
parent
557900315c
commit
28de69024f
3 changed files with 207 additions and 52 deletions
|
|
@ -321,6 +321,11 @@ where
|
|||
Vec::new()
|
||||
}
|
||||
|
||||
/// Whether to show the nav bar toggle button in the header.
|
||||
fn show_nav_bar_toggle(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// Allows overriding the default nav bar widget.
|
||||
fn nav_bar(&self) -> Option<Element<'_, crate::Action<Self::Message>>> {
|
||||
if !self.core().nav_bar_active() {
|
||||
|
|
@ -734,7 +739,7 @@ impl<App: Application> ApplicationExt for App {
|
|||
header = header.app_icon(icon);
|
||||
}
|
||||
|
||||
if self.nav_model().is_some() {
|
||||
if self.nav_model().is_some() && self.show_nav_bar_toggle() {
|
||||
let toggle = crate::widget::nav_bar_toggle()
|
||||
.active(core.nav_bar_active())
|
||||
.selected(focused)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue