We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using zi and zi-term 0.3.2, consider this minimal reproducible example:
0.3.2
use zi::{ components::text::{Text, TextProperties}, prelude::*, }; use zi_term::Result; struct App { link: ComponentLink<Self>, } impl Component for App { type Message = (); type Properties = (); fn create(_: Self::Properties, _frame: Rect, link: ComponentLink<Self>) -> Self { Self { link } } fn view(&self) -> Layout { let t1 = Text::with(TextProperties::new().content("1").style( Style::bold(Colour::black(), Colour::white()))); let t2 = Text::with(TextProperties::new().content("2").style( Style::normal(Colour::rgb(100, 0, 0), Colour:: white()))); let t3 = Text::with(TextProperties::new().content("3").style( Style::normal(Colour::rgb(0, 100, 0), Colour:: white()))); Layout::column([ Item::fixed(1)( Container::row([ Item::auto(t1), Item::auto(t2), Item::auto(t3), ]) )] ) } fn update(&mut self, _: Self::Message) -> ShouldRender { ShouldRender::Yes } fn bindings(&self, bindings: &mut Bindings<Self>) { if !bindings.is_empty() { return; } bindings.set_focus(true); bindings .command("exit", |this: &Self| this.link.exit()) .with([Key::Char('q')]); } } fn main() -> Result<()> { let counter = App::with(()); zi_term::incremental()?.run_event_loop(counter) }
A row with 3 equally spaced columns with text 1, 2 and 3 of different background colors.
A row with 3 equally spaced columns, all three columns have the 1 text, with bold white on black style, i.e., item 1.
1
If the items are rearraged, to say, first t2, then t3, then t1, then all three columns show t2.
I encounter the same problem regardless of whether the flex direction is row or column.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
using zi and zi-term
0.3.2
, consider this minimal reproducible example:Expected
A row with 3 equally spaced columns with text 1, 2 and 3 of different background colors.
Actual
A row with 3 equally spaced columns, all three columns have the
1
text, with bold white on black style, i.e., item 1.If the items are rearraged, to say, first t2, then t3, then t1, then all three columns show t2.
I encounter the same problem regardless of whether the flex direction is row or column.
The text was updated successfully, but these errors were encountered: