Skip to content

Commit

Permalink
style(ui): change the selection index position
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Nov 3, 2024
1 parent 4545c77 commit c75e27d
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions systeroid-tui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ pub fn render(frame: &mut Frame<'_>, app: &mut App, colors: &Colors) {
colors,
);
}
render_selection_text(
frame,
rect,
format!(
"{}/{}",
app.parameter_list
.state
.selected()
.map(|v| v + 1)
.unwrap_or(0),
app.parameter_list.items.len()
),
colors,
);
}
if app.show_logs {
render_log_view(frame, chunks[1], app, colors);
Expand Down Expand Up @@ -117,19 +131,6 @@ fn render_parameter_list(frame: &mut Frame<'_>, rect: Rect, app: &mut App, color
rect,
&mut app.parameter_list.state,
);
render_selection_text(
frame,
rect,
format!(
"{}/{}",
app.parameter_list
.state
.selected()
.map(|v| v + 1)
.unwrap_or(0),
app.parameter_list.items.len()
),
colors,
frame.render_stateful_widget(
Scrollbar::new(ScrollbarOrientation::VerticalRight)
.begin_symbol(Some("↑"))
Expand Down

0 comments on commit c75e27d

Please sign in to comment.