Only provide WidthDb in [Async]Widget::size
This commit is contained in:
parent
417f33cc24
commit
0573fcec77
13 changed files with 91 additions and 83 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use async_trait::async_trait;
|
||||
|
||||
use crate::{AsyncWidget, Frame, Pos, Size, Widget};
|
||||
use crate::{AsyncWidget, Frame, Pos, Size, Widget, WidthDb};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Cursor<I> {
|
||||
|
|
@ -32,11 +32,11 @@ where
|
|||
{
|
||||
fn size(
|
||||
&self,
|
||||
frame: &mut Frame,
|
||||
widthdb: &mut WidthDb,
|
||||
max_width: Option<u16>,
|
||||
max_height: Option<u16>,
|
||||
) -> Result<Size, E> {
|
||||
self.inner.size(frame, max_width, max_height)
|
||||
self.inner.size(widthdb, max_width, max_height)
|
||||
}
|
||||
|
||||
fn draw(self, frame: &mut Frame) -> Result<(), E> {
|
||||
|
|
@ -53,11 +53,11 @@ where
|
|||
{
|
||||
async fn size(
|
||||
&self,
|
||||
frame: &mut Frame,
|
||||
widthdb: &mut WidthDb,
|
||||
max_width: Option<u16>,
|
||||
max_height: Option<u16>,
|
||||
) -> Result<Size, E> {
|
||||
self.inner.size(frame, max_width, max_height).await
|
||||
self.inner.size(widthdb, max_width, max_height).await
|
||||
}
|
||||
|
||||
async fn draw(self, frame: &mut Frame) -> Result<(), E> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue