mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
remove arrangement border
This commit is contained in:
parent
10c5dcca9d
commit
0820c10f8b
1 changed files with 6 additions and 8 deletions
|
|
@ -148,20 +148,18 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
||||||
let any_size = |_|Ok(Some([0,0]));
|
let any_size = |_|Ok(Some([0,0]));
|
||||||
// column separators
|
// column separators
|
||||||
add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{
|
add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{
|
||||||
let area = to.area();
|
|
||||||
let style = Some(Style::default().fg(COLOR_SEPARATOR));
|
let style = Some(Style::default().fg(COLOR_SEPARATOR));
|
||||||
Ok(for x in cols.iter().map(|col|col.1) {
|
Ok(for x in cols.iter().map(|col|col.1) {
|
||||||
let x = scene_title_w + area.x() + x as u16;
|
let x = scene_title_w + to.area().x() + x as u16;
|
||||||
for y in area.y()..area.y2() { to.blit(&"▎", x, y, style); }
|
for y in to.area().y()..to.area().y2() { to.blit(&"▎", x, y, style); }
|
||||||
})
|
})
|
||||||
}))?;
|
}))?;
|
||||||
// row separators
|
// row separators
|
||||||
add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{
|
add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{
|
||||||
let area = to.area();
|
|
||||||
Ok(for y in rows.iter().map(|row|row.1) {
|
Ok(for y in rows.iter().map(|row|row.1) {
|
||||||
let y = area.y() + (y / PPQ) as u16 + 1;
|
let y = to.area().y() + (y / PPQ) as u16 + 1;
|
||||||
if y >= to.buffer.area.height { break }
|
if y >= to.buffer.area.height { break }
|
||||||
for x in area.x()..area.x2().saturating_sub(2) {
|
for x in to.area().x()..to.area().x2().saturating_sub(2) {
|
||||||
if x < to.buffer.area.x && y < to.buffer.area.y {
|
if x < to.buffer.area.x && y < to.buffer.area.y {
|
||||||
let cell = to.buffer.get_mut(x, y);
|
let cell = to.buffer.get_mut(x, y);
|
||||||
cell.modifier = Modifier::UNDERLINED;
|
cell.modifier = Modifier::UNDERLINED;
|
||||||
|
|
@ -251,7 +249,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
||||||
})
|
})
|
||||||
}).fixed_y(height)
|
}).fixed_y(height)
|
||||||
}
|
}
|
||||||
).fixed_y((self.0.size.h() as u16).saturating_sub(track_title_h + tracks_footer + 2));
|
).fixed_y((self.0.size.h() as u16).saturating_sub(track_title_h + tracks_footer));
|
||||||
// full grid with header and footer
|
// full grid with header and footer
|
||||||
add(&col!(header, content, footer))?;
|
add(&col!(header, content, footer))?;
|
||||||
// cursor
|
// cursor
|
||||||
|
|
@ -302,7 +300,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
||||||
else { area.clip_w(scene_title_w).clip_h(track_title_h) }, &CORNERS)?
|
else { area.clip_w(scene_title_w).clip_h(track_title_h) }, &CORNERS)?
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
}).bg(bg).grow_y(1).border(border);
|
}).bg(bg);//.grow_y(1);//.border(border);
|
||||||
let color = if self.0.focused {Color::Rgb(150, 160, 90)} else {Color::Rgb(120, 130, 100)};
|
let color = if self.0.focused {Color::Rgb(150, 160, 90)} else {Color::Rgb(120, 130, 100)};
|
||||||
let size = format!("{}x{}", self.0.size.w(), self.0.size.h());
|
let size = format!("{}x{}", self.0.size.w(), self.0.size.h());
|
||||||
let lower_right = TuiStyle::fg(size, color).pull_x(1).align_se().fill_xy();
|
let lower_right = TuiStyle::fg(size, color).pull_x(1).align_se().fill_xy();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue