forked from 1b-agent/opencadstudio-upstream
fix(grid): restore viewport visibility
Draw the grid above opaque GPU surfaces and below interaction overlays.\n\nRefs #789
This commit is contained in:
1 parent
f9c3546551
commit
f4889d4c70
1 file changed
+5
-6
+5
-6
@@ -846,12 +846,9 @@ impl OpenCADStudio {
|
|||||||
.width(Fill)
|
.width(Fill)
|
||||||
.height(Fill)
|
.height(Fill)
|
||||||
} else if is_paper {
|
} else if is_paper {
|
||||||
// Paper layout: the GPU shader renders everything — the desk is the
|
// Keep the grid above the opaque GPU sheet and below interaction UI.
|
||||||
// container background, the white sheet + paper entities + borders
|
|
||||||
// come from the full-canvas top-locked "sheet" viewport, and the
|
|
||||||
// floating content viewports overlay it (same path as model space).
|
|
||||||
stack![
|
stack![
|
||||||
container(grid_overlay)
|
container(Space::new())
|
||||||
.style(move |_: &Theme| container::Style {
|
.style(move |_: &Theme| container::Style {
|
||||||
background: Some(Background::Color(PAPER_SPACE_BACKGROUND)),
|
background: Some(Background::Color(PAPER_SPACE_BACKGROUND)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -859,6 +856,7 @@ impl OpenCADStudio {
|
|||||||
.width(Fill)
|
.width(Fill)
|
||||||
.height(Fill),
|
.height(Fill),
|
||||||
viewport_3d,
|
viewport_3d,
|
||||||
|
grid_overlay,
|
||||||
selection_overlay,
|
selection_overlay,
|
||||||
viewport_mouse,
|
viewport_mouse,
|
||||||
]
|
]
|
||||||
@@ -866,7 +864,7 @@ impl OpenCADStudio {
|
|||||||
.height(Fill)
|
.height(Fill)
|
||||||
} else {
|
} else {
|
||||||
stack![
|
stack![
|
||||||
container(grid_overlay)
|
container(Space::new())
|
||||||
.style(move |_: &Theme| container::Style {
|
.style(move |_: &Theme| container::Style {
|
||||||
background: Some(Background::Color(bg_color)),
|
background: Some(Background::Color(bg_color)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -874,6 +872,7 @@ impl OpenCADStudio {
|
|||||||
.width(Fill)
|
.width(Fill)
|
||||||
.height(Fill),
|
.height(Fill),
|
||||||
viewport_3d,
|
viewport_3d,
|
||||||
|
grid_overlay,
|
||||||
selection_overlay,
|
selection_overlay,
|
||||||
]
|
]
|
||||||
.width(Fill)
|
.width(Fill)
|
||||||
|
|||||||
Reference in new issue
Block a user