dock: Hide suffix action when tab_panel is collapsed (#963)
This commit is contained in:
parent
60bebaf51f
commit
f183236d52
1 changed files with 21 additions and 19 deletions
|
|
@ -761,25 +761,27 @@ impl TabPanel {
|
||||||
))
|
))
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.suffix(
|
.when(!self.collapsed, |this| {
|
||||||
h_flex()
|
this.suffix(
|
||||||
.items_center()
|
h_flex()
|
||||||
.top_0()
|
.items_center()
|
||||||
.right_0()
|
.top_0()
|
||||||
.border_l_1()
|
.right_0()
|
||||||
.border_b_1()
|
.border_l_1()
|
||||||
.h_full()
|
.border_b_1()
|
||||||
.border_color(cx.theme().border)
|
.h_full()
|
||||||
.bg(cx.theme().tab_bar)
|
.border_color(cx.theme().border)
|
||||||
.px_2()
|
.bg(cx.theme().tab_bar)
|
||||||
.gap_1()
|
.px_2()
|
||||||
.children(
|
.gap_1()
|
||||||
self.active_panel(cx)
|
.children(
|
||||||
.and_then(|panel| panel.title_suffix(window, cx)),
|
self.active_panel(cx)
|
||||||
)
|
.and_then(|panel| panel.title_suffix(window, cx)),
|
||||||
.child(self.render_toolbar(state, window, cx))
|
)
|
||||||
.when_some(right_dock_button, |this, btn| this.child(btn)),
|
.child(self.render_toolbar(state, window, cx))
|
||||||
)
|
.when_some(right_dock_button, |this, btn| this.child(btn)),
|
||||||
|
)
|
||||||
|
})
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue