sidebar working
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// src/components/handlers/sidebar.rs
|
// src/components/handlers/sidebar.rs
|
||||||
use ratatui::{
|
use ratatui::{
|
||||||
widgets::{Block, Borders, List, ListItem},
|
widgets::{Block, List, ListItem},
|
||||||
layout::Rect,
|
layout::Rect,
|
||||||
style::Style,
|
style::Style,
|
||||||
text::Text,
|
text::Text,
|
||||||
@@ -10,8 +10,6 @@ use crate::config::colors::Theme;
|
|||||||
|
|
||||||
pub fn render_sidebar(f: &mut Frame, area: Rect, theme: &Theme) {
|
pub fn render_sidebar(f: &mut Frame, area: Rect, theme: &Theme) {
|
||||||
let sidebar_block = Block::default()
|
let sidebar_block = Block::default()
|
||||||
.borders(Borders::RIGHT)
|
|
||||||
.border_style(Style::default().fg(theme.border))
|
|
||||||
.style(Style::default().bg(theme.bg));
|
.style(Style::default().bg(theme.bg));
|
||||||
|
|
||||||
let items = vec![
|
let items = vec![
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ pub fn render_ui(
|
|||||||
let chunks = Layout::default()
|
let chunks = Layout::default()
|
||||||
.direction(Direction::Horizontal)
|
.direction(Direction::Horizontal)
|
||||||
.constraints([
|
.constraints([
|
||||||
Constraint::Min(10), // Sidebar minimum width
|
Constraint::Length(16), // Fixed sidebar width
|
||||||
Constraint::Fill(1), // Remaining space for form/preview
|
Constraint::Fill(1), // Remaining space for form/preview
|
||||||
])
|
])
|
||||||
.split(main_content_area);
|
.split(main_content_area);
|
||||||
(Some(chunks[0]), chunks[1])
|
(Some(chunks[0]), chunks[1])
|
||||||
|
|||||||
Reference in New Issue
Block a user