Unbork project search focus

This commit is contained in:
Julia 2023-12-18 10:44:34 -05:00
parent 4eb609a954
commit b4042feccd
2 changed files with 117 additions and 103 deletions

View file

@ -3556,8 +3556,6 @@ impl Render for Workspace {
)
};
let theme = cx.theme().clone();
let colors = theme.colors();
cx.set_rem_size(ui_font_size);
self.actions(div(), cx)
@ -3570,10 +3568,10 @@ impl Render for Workspace {
.gap_0()
.justify_start()
.items_start()
.text_color(colors.text)
.bg(colors.background)
.text_color(cx.theme().colors().text)
.bg(cx.theme().colors().background)
.border()
.border_color(colors.border)
.border_color(cx.theme().colors().border)
.children(self.titlebar_item.clone())
.child(
div()
@ -3586,7 +3584,7 @@ impl Render for Workspace {
.overflow_hidden()
.border_t()
.border_b()
.border_color(colors.border)
.border_color(cx.theme().colors().border)
.child(
canvas(cx.listener(|workspace, bounds, _| {
workspace.bounds = *bounds;
@ -3625,15 +3623,13 @@ impl Render for Workspace {
.flex_row()
.h_full()
// Left Dock
.children(self.zoomed_position.ne(&Some(DockPosition::Left)).then(
|| {
div()
.flex()
.flex_none()
.overflow_hidden()
.child(self.left_dock.clone())
},
))
.child(
div()
.flex()
.flex_none()
.overflow_hidden()
.child(self.left_dock.clone()),
)
// Panes
.child(
div()
@ -3641,52 +3637,29 @@ impl Render for Workspace {
.flex_col()
.flex_1()
.overflow_hidden()
.child(self.center.render(
&self.project,
&self.follower_states,
self.active_call(),
&self.active_pane,
self.zoomed.as_ref(),
&self.app_state,
cx,
))
.children(
self.zoomed_position
.ne(&Some(DockPosition::Bottom))
.then(|| self.bottom_dock.clone()),
),
.child({
self.center.render(
&self.project,
&self.follower_states,
self.active_call(),
&self.active_pane,
self.zoomed.as_ref(),
&self.app_state,
cx,
)
})
.child(self.bottom_dock.clone()),
)
// Right Dock
.children(self.zoomed_position.ne(&Some(DockPosition::Right)).then(
|| {
div()
.flex()
.flex_none()
.overflow_hidden()
.child(self.right_dock.clone())
},
)),
.child(
div()
.flex()
.flex_none()
.overflow_hidden()
.child(self.right_dock.clone()),
),
)
.children(self.render_notifications(cx))
.children(self.zoomed.as_ref().and_then(|view| {
let zoomed_view = view.upgrade()?;
let div = div()
.z_index(1)
.absolute()
.overflow_hidden()
.border_color(colors.border)
.bg(colors.background)
.child(zoomed_view)
.inset_0()
.shadow_lg();
Some(match self.zoomed_position {
Some(DockPosition::Left) => div.right_2().border_r(),
Some(DockPosition::Right) => div.left_2().border_l(),
Some(DockPosition::Bottom) => div.top_2().border_t(),
None => div.top_2().bottom_2().left_2().right_2().border(),
})
})),
.children(self.render_notifications(cx)),
)
.child(self.status_bar.clone())
}