fix: fix border style for BottomPane (#893)
This PR fixes things so that: * when the `BottomPane` is in the `StatusIndicator` state, the border should be dim * when the `BottomPane` does not have input focus, the border should be dim To make it easier to enforce this invariant, this PR introduces `BottomPane::set_state()` that will: * update `self.state` * call `update_border_for_input_focus()` * request a repaint This should make it easier to enforce other updates for state changes going forward.
This commit is contained in:
@@ -252,10 +252,7 @@ impl ChatWidget<'_> {
|
||||
cwd,
|
||||
reason,
|
||||
};
|
||||
let needs_redraw = self.bottom_pane.push_approval_request(request);
|
||||
if needs_redraw {
|
||||
self.request_redraw()?;
|
||||
}
|
||||
self.bottom_pane.push_approval_request(request)?;
|
||||
}
|
||||
EventMsg::ApplyPatchApprovalRequest {
|
||||
changes,
|
||||
@@ -284,8 +281,7 @@ impl ChatWidget<'_> {
|
||||
reason,
|
||||
grant_root,
|
||||
};
|
||||
let _needs_redraw = self.bottom_pane.push_approval_request(request);
|
||||
// Redraw is always need because the history has changed.
|
||||
self.bottom_pane.push_approval_request(request)?;
|
||||
self.request_redraw()?;
|
||||
}
|
||||
EventMsg::ExecCommandBegin {
|
||||
|
||||
Reference in New Issue
Block a user