mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
some more core refactor before fixing the mess
This commit is contained in:
parent
fe09536a45
commit
0bbf74e915
12 changed files with 31 additions and 28 deletions
|
|
@ -77,7 +77,7 @@ impl<'a> Render<Tui> for RowSeparators<'a> {
|
|||
if y >= to.buffer().area.height {
|
||||
break
|
||||
}
|
||||
for x in area.x..area.width+area.y-2 {
|
||||
for x in area.x..(area.width+area.y).saturating_sub(2) {
|
||||
let cell = to.buffer().get_mut(x, y);
|
||||
cell.modifier = Modifier::UNDERLINED;
|
||||
cell.underline_color = Nord::SEPARATOR;
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@ impl<'a> Render<Tui> for SequenceNotes<'a> {
|
|||
let area = Rect {
|
||||
x: area.x + Sequencer::H_KEYS_OFFSET as u16,
|
||||
y: area.y + 1,
|
||||
width: area.width - Sequencer::H_KEYS_OFFSET as u16,
|
||||
height: area.height - 2
|
||||
width: area.width.saturating_sub(Sequencer::H_KEYS_OFFSET as u16),
|
||||
height: area.height.saturating_sub(2),
|
||||
};
|
||||
to.buffer_update(area, &move |cell, x, y|{
|
||||
let src_x = ((x as usize + self.0.time_axis.start) * self.0.time_axis.scale) as usize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue