fix: disable ScrollView
All checks were successful
Rust / build (map[name:nightly]) (push) Successful in 12m38s
Rust / build (map[name:stable]) (push) Successful in 13m3s
Release Please / Release-plz (push) Successful in 1m57s

Current version is incompatible with latest Ratatui. Backout this change
when compatibility is restore.
This commit is contained in:
Paul Campbell 2024-10-22 07:20:08 +01:00
parent 9d6271a176
commit 23de987444

View file

@ -1,12 +1,13 @@
//
use std::collections::BTreeMap;
use git_next_core::ForgeAlias;
use ratatui::{
buffer::Buffer,
layout::{Direction, Layout, Rect, Size},
widgets::StatefulWidget,
layout::{Direction, Layout, Rect},
widgets::{StatefulWidget, Widget},
};
use tui_scrollview::{ScrollView, ScrollViewState};
use tui_scrollview::ScrollViewState;
use crate::tui::actor::ForgeState;
@ -27,16 +28,10 @@ impl<'a> HeightContraintLength for ConfiguredAppWidget<'a> {
impl<'a> StatefulWidget for ConfiguredAppWidget<'a> {
type State = ScrollViewState;
fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State)
fn render(self, area: Rect, buf: &mut Buffer, _state: &mut Self::State)
where
Self: Sized,
{
let height = self
.children()
.iter()
.map(HeightContraintLength::height_constraint_length)
.sum::<u16>();
let mut scroll = ScrollView::new(Size::new(area.width - 1, height));
let layout_forge_list = Layout::default()
.direction(Direction::Vertical)
.constraints(
@ -44,14 +39,12 @@ impl<'a> StatefulWidget for ConfiguredAppWidget<'a> {
.iter()
.map(HeightContraintLength::height_constraint_length),
)
.split(scroll.area());
.split(area);
self.children()
.into_iter()
.enumerate()
.for_each(|(i, w)| scroll.render_widget(w, layout_forge_list[i]));
scroll.render(area, buf, state);
.for_each(|(i, w)| w.render(layout_forge_list[i], buf));
}
}
impl<'a> ConfiguredAppWidget<'a> {