diff --git a/dizzle b/dizzle index 3d04622..b029973 160000 --- a/dizzle +++ b/dizzle @@ -1 +1 @@ -Subproject commit 3d04622e4266eac65021da6cd3d378e84a843b87 +Subproject commit b0299735e58bd1b79db5bbb033956e437a1e56ef diff --git a/src/layout/azimuth.rs b/src/layout/azimuth.rs index 8c6fc86..15c54ef 100644 --- a/src/layout/azimuth.rs +++ b/src/layout/azimuth.rs @@ -14,8 +14,8 @@ use Azimuth::*; } pub struct Origin( - pub(crate) Option, - pub(crate) T + pub Option, + pub T ); impl<'a, S: Screen, T: Draw> Draw for Origin { @@ -199,14 +199,16 @@ impl, B: Draw> Draw for Bar { fn draw (&self, to: &mut S) -> Drawn { #[cfg(feature = "prof")] profiling::scope!("bar_draw"); let Self(split, n, a, b, ..) = self; - let (area_a, area_b) = bar_areas(to, split, *n, a, b)?; + let (area_a, area_b) = bar_areas(to, split, *n)?; let (drawn_a, drawn_b) = draw_stacks(split, to, a, area_a, None, b, area_b, None)?; Ok(stack_drawn(split, drawn_a, drawn_b)) } } pub fn bar_areas <'a, S: Screen> ( - to: &mut S, split: &Split, n: S::Unit, a: impl Draw, b: impl Draw, + to: &mut S, + split: &Split, + n: S::Unit, ) -> UsuallyRef<'a, (Option>, Option>)> { let XYWH(x0, y0, w0, h0) = to.area(); Ok(match split { diff --git a/src/term.rs b/src/term.rs index a5ed594..11c8f6c 100644 --- a/src/term.rs +++ b/src/term.rs @@ -29,7 +29,6 @@ mod modify; pub use self::modify::*; mod phat; pub use self::phat::*; mod repeat; pub use self::repeat::*; mod scroll; pub use self::scroll::*; -#[cfg(feature = "text")] mod text; #[macro_export] macro_rules! tui_app { ($Struct:ident { $($fields:tt)* }) => { diff --git a/src/term/text.rs b/src/term/text.rs deleted file mode 100644 index c7b7e81..0000000 --- a/src/term/text.rs +++ /dev/null @@ -1 +0,0 @@ -use crate::*; diff --git a/src/text.rs b/src/text.rs index b1bd20f..b03c650 100644 --- a/src/text.rs +++ b/src/text.rs @@ -1,4 +1,3 @@ -use crate::*; pub(crate) use ::unicode_width::*; /// Displays a multi-line text string. @@ -21,7 +20,7 @@ impl> AsRef for TrimString { } impl<'a, T: AsRef> TrimString { - fn to_ref (&self) -> TrimStr<'_, T> { + pub fn to_ref (&self) -> TrimStr<'_, T> { TrimStr(self.0, &self.1) } } @@ -193,7 +192,7 @@ mod text_term { } } - fn layout_text_u16 (text: &str, area: XYWH) -> Perhaps> { + pub fn layout_text_u16 (text: &str, area: XYWH) -> Perhaps> { let XYWH(x, y, w, h) = area; let mut max_w = 0u16; let mut max_h = 0u16;