mirror of
https://github.com/zaphar/sheetsui.git
synced 2025-07-23 05:19:48 -04:00
parent
665d872f3d
commit
6b94455758
@ -16,7 +16,7 @@ use crate::ui::Address;
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test;
|
mod test;
|
||||||
|
|
||||||
const COL_PIXELS: f64 = 10.0;
|
const COL_PIXELS: f64 = 5.0;
|
||||||
|
|
||||||
/// A spreadsheet book with some internal state tracking.
|
/// A spreadsheet book with some internal state tracking.
|
||||||
pub struct Book {
|
pub struct Book {
|
||||||
|
@ -106,6 +106,7 @@ impl<'book> Viewport<'book> {
|
|||||||
// subtract the first columns size.
|
// subtract the first columns size.
|
||||||
length = length - first.length;
|
length = length - first.length;
|
||||||
// remove the first column.
|
// remove the first column.
|
||||||
|
// TODO(jwall): This is a bit inefficient. Can we do better?
|
||||||
visible = visible.into_iter().skip(1).collect();
|
visible = visible.into_iter().skip(1).collect();
|
||||||
}
|
}
|
||||||
// Add this col to the visible.
|
// Add this col to the visible.
|
||||||
@ -193,7 +194,7 @@ impl<'book> Viewport<'book> {
|
|||||||
col_constraints.extend(constraints.into_iter());
|
col_constraints.extend(constraints.into_iter());
|
||||||
Ok(Table::new(rows, col_constraints)
|
Ok(Table::new(rows, col_constraints)
|
||||||
.header(Row::new(header).underlined())
|
.header(Row::new(header).underlined())
|
||||||
.column_spacing(1)
|
.column_spacing(0)
|
||||||
.flex(Flex::Start))
|
.flex(Flex::Start))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user