remove output box border
This commit is contained in:
2
TODO
2
TODO
@@ -10,7 +10,7 @@ x ui abstraction from core
|
|||||||
- generates status messages "ruffling feathers..."
|
- generates status messages "ruffling feathers..."
|
||||||
- project description?
|
- project description?
|
||||||
- treesitter + friends
|
- treesitter + friends
|
||||||
- error where it just gives up turn
|
x error where it just gives up turn
|
||||||
- "project" behaviors (read readme first)
|
- "project" behaviors (read readme first)
|
||||||
- advance project mgmt
|
- advance project mgmt
|
||||||
- git for reverting
|
- git for reverting
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ impl RetroTui {
|
|||||||
// IMPORTANT: Update the last known visible height BEFORE drawing
|
// IMPORTANT: Update the last known visible height BEFORE drawing
|
||||||
// This ensures auto-scroll calculations use the correct height
|
// This ensures auto-scroll calculations use the correct height
|
||||||
let old_height = state.last_visible_height;
|
let old_height = state.last_visible_height;
|
||||||
// Calculate the actual visible height accounting for borders (2 lines)
|
// Calculate the actual visible height accounting for padding (2 lines)
|
||||||
let new_visible_height = chunks[1].height.saturating_sub(2) as usize;
|
let new_visible_height = chunks[1].height.saturating_sub(2) as usize;
|
||||||
|
|
||||||
// Only update if we have a valid height
|
// Only update if we have a valid height
|
||||||
@@ -560,8 +560,8 @@ impl RetroTui {
|
|||||||
output_history: &[String],
|
output_history: &[String],
|
||||||
scroll_offset: usize,
|
scroll_offset: usize,
|
||||||
) {
|
) {
|
||||||
// Calculate visible lines
|
// Calculate visible lines (no borders now, but padding takes 2 lines)
|
||||||
let visible_height = area.height.saturating_sub(2) as usize; // Account for borders
|
let visible_height = area.height.saturating_sub(2) as usize; // Account for padding
|
||||||
let total_lines = output_history.len();
|
let total_lines = output_history.len();
|
||||||
|
|
||||||
// Calculate the proper scroll position
|
// Calculate the proper scroll position
|
||||||
@@ -665,10 +665,10 @@ impl RetroTui {
|
|||||||
let output = Paragraph::new(visible_lines)
|
let output = Paragraph::new(visible_lines)
|
||||||
.block(
|
.block(
|
||||||
Block::default()
|
Block::default()
|
||||||
.title(" SYSTEM OUTPUT ")
|
// Remove borders but keep the block for spacing
|
||||||
.title_alignment(Alignment::Center)
|
.borders(Borders::NONE)
|
||||||
.borders(Borders::ALL)
|
// Add padding to maintain the same spacing as borders would provide
|
||||||
.border_style(Style::default().fg(TERMINAL_DIM_GREEN))
|
.padding(ratatui::widgets::Padding::new(1, 1, 1, 1))
|
||||||
.style(Style::default().bg(TERMINAL_BG)),
|
.style(Style::default().bg(TERMINAL_BG)),
|
||||||
)
|
)
|
||||||
.wrap(Wrap { trim: false });
|
.wrap(Wrap { trim: false });
|
||||||
@@ -691,8 +691,8 @@ impl RetroTui {
|
|||||||
f.render_stateful_widget(
|
f.render_stateful_widget(
|
||||||
scrollbar,
|
scrollbar,
|
||||||
area.inner(ratatui::layout::Margin {
|
area.inner(ratatui::layout::Margin {
|
||||||
vertical: 1,
|
vertical: 0, // No borders, so no vertical margin needed
|
||||||
horizontal: 0,
|
horizontal: 0, // Keep horizontal margin at 0
|
||||||
}),
|
}),
|
||||||
&mut scrollbar_state,
|
&mut scrollbar_state,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user