Skip to content

Commit c75e27d

Browse files
committed
style(ui): change the selection index position
1 parent 4545c77 commit c75e27d

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

systeroid-tui/src/ui.rs

+14-13
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ pub fn render(frame: &mut Frame<'_>, app: &mut App, colors: &Colors) {
5959
colors,
6060
);
6161
}
62+
render_selection_text(
63+
frame,
64+
rect,
65+
format!(
66+
"{}/{}",
67+
app.parameter_list
68+
.state
69+
.selected()
70+
.map(|v| v + 1)
71+
.unwrap_or(0),
72+
app.parameter_list.items.len()
73+
),
74+
colors,
75+
);
6276
}
6377
if app.show_logs {
6478
render_log_view(frame, chunks[1], app, colors);
@@ -117,19 +131,6 @@ fn render_parameter_list(frame: &mut Frame<'_>, rect: Rect, app: &mut App, color
117131
rect,
118132
&mut app.parameter_list.state,
119133
);
120-
render_selection_text(
121-
frame,
122-
rect,
123-
format!(
124-
"{}/{}",
125-
app.parameter_list
126-
.state
127-
.selected()
128-
.map(|v| v + 1)
129-
.unwrap_or(0),
130-
app.parameter_list.items.len()
131-
),
132-
colors,
133134
frame.render_stateful_widget(
134135
Scrollbar::new(ScrollbarOrientation::VerticalRight)
135136
.begin_symbol(Some("↑"))

0 commit comments

Comments
 (0)