fix(viewport): adapt layout crosshair contrast

Choose the sheet or desk surface under the cursor instead of the active input space so MSPACE stays visible on light paper.\n\nRefs #611
This commit is contained in:
Hakan Seven 2026-07-31 23:47:41 +03:00
commit 9382a412df
4 changed files with 84 additions and 5 deletions

View file

@ -458,6 +458,7 @@ struct PaperViewportCache {
layout_block: Handle,
sheet: Handle,
content: Arc<Vec<Handle>>,
paper_limits: Option<((f64, f64), (f64, f64))>,
}
struct PaperSheetRenderCache {
@ -3354,6 +3355,12 @@ impl Scene {
return None;
}
if let Some(cache) = self.paper_viewport_cache.borrow().get(&self.current_layout) {
if cache.epoch == self.geometry_epoch && cache.layout == self.current_layout {
return cache.paper_limits;
}
}
self.document
.objects
.values()