ElyTable: a sheet starts at the left, even before its geometry arrives (T-03)
This commit is contained in:
8 files changed
+43
-10
No files matched your search
@@ -251,6 +251,10 @@ impl LokView {
|
||||
|
||||
/// Room beside a narrow document, which sits centred.
|
||||
pub(super) fn slack(&self) -> (f32, f32) {
|
||||
// A sheet's grid grows with the view; it starts left.
|
||||
if self.doc.is_sheet() {
|
||||
return (0.0, 0.0);
|
||||
}
|
||||
let extent = self.extent();
|
||||
let slack = |view: f32, doc: i32| (view - self.geom.px_of(doc)).max(0.0) / 2.0;
|
||||
// A fitted page sits centred both ways.
|
||||
|
||||
Reference in new issue
Block a user