mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-21 10:30:48 +08:00
lib: Remove compile-time width from footer
This commit is contained in:
@@ -13,9 +13,9 @@ use crate::ui::theme::style;
|
||||
use super::{Column, Render, Widget};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FooterProps<'a, const W: usize> {
|
||||
pub cells: [Text<'a>; W],
|
||||
pub widths: [Constraint; W],
|
||||
pub struct FooterProps<'a> {
|
||||
pub cells: Vec<Text<'a>>,
|
||||
pub widths: Vec<Constraint>,
|
||||
pub cutoff: usize,
|
||||
pub cutoff_after: usize,
|
||||
pub focus: bool,
|
||||
@@ -71,8 +71,8 @@ impl<A> Footer<A> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, A, const W: usize> Render<FooterProps<'a, W>> for Footer<A> {
|
||||
fn render<B: Backend>(&self, frame: &mut ratatui::Frame, area: Rect, props: FooterProps<W>) {
|
||||
impl<'a, A> Render<FooterProps<'a>> for Footer<A> {
|
||||
fn render<B: Backend>(&self, frame: &mut ratatui::Frame, area: Rect, props: FooterProps) {
|
||||
let widths = props
|
||||
.widths
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user