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:
Michael Bolin
2025-05-10 23:34:13 -07:00
committed by GitHub
parent b4785b5f88
commit a1f51bf91b
3 changed files with 63 additions and 45 deletions

View File

@@ -120,7 +120,7 @@ impl WidgetRef for StatusIndicatorWidget {
.padding(Padding::new(1, 0, 0, 0))
.borders(Borders::ALL)
.border_type(BorderType::Rounded)
.border_style(widget_style);
.border_style(widget_style.dim());
// Animated 3dot pattern inside brackets. The *active* dot is bold
// white, the others are dim.
const DOT_COUNT: usize = 3;