mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
sensible arranger entrypoint! now let's see whats up with the align modifiers
This commit is contained in:
parent
0ee3059cf8
commit
f052891473
7 changed files with 180 additions and 105 deletions
|
|
@ -46,7 +46,6 @@ impl Content<TuiOut> for RepeatV<'_> {
|
|||
}
|
||||
fn render (&self, to: &mut TuiOut) {
|
||||
let [x, y, w, h] = to.area().xywh();
|
||||
let a = self.0.len();
|
||||
for y in y..y+h {
|
||||
if let Some(cell) = to.buffer.cell_mut(ratatui::prelude::Position::from((x, y))) {
|
||||
cell.set_symbol(&self.0);
|
||||
|
|
@ -54,3 +53,19 @@ impl Content<TuiOut> for RepeatV<'_> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RepeatH<'a>(pub &'a str);
|
||||
|
||||
impl Content<TuiOut> for RepeatH<'_> {
|
||||
fn layout (&self, to: [u16;4]) -> [u16;4] {
|
||||
to
|
||||
}
|
||||
fn render (&self, to: &mut TuiOut) {
|
||||
let [x, y, w, h] = to.area().xywh();
|
||||
for x in x..x+w {
|
||||
if let Some(cell) = to.buffer.cell_mut(ratatui::prelude::Position::from((x, y))) {
|
||||
cell.set_symbol(&self.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue