Pane: Fix flicker when opening/closing tabs

Tab bar was losing focus for one frame which led to it skipping rendering of tab controls & flickering. It also occured when opening new tabs.
This commit is contained in:
Piotr Osiewicz
2024-01-03 13:21:21 +01:00
parent 017b25e511
commit b4a205b37c
+1 -1
View File
@@ -1687,7 +1687,7 @@ impl Pane {
),
)
})
.when(self.has_focus(cx), |tab_bar| {
.when(self.was_focused || self.has_focus(cx), |tab_bar| {
tab_bar.end_child({
let render_tab_buttons = self.render_tab_bar_buttons.clone();
render_tab_buttons(self, cx)