git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commit253fbb4262415faff5a1a3dbf6f7b7a7b4308704
parentdfb674f7e6
authorLucas Galante <[email protected]>
date2026-09-01 10:39
fix: the fronted second network editor wears the focus ring

plate_focus_tint knew only pane 1's slots, so fronting Network 2
dropped the network focus glint entirely; its plate and content now
share the LEFT_MENUBAR focus domain. The non-relief ring path had the
same gap — it hardcoded pane 1's rect, zero while it waits as a tab —
and now rings whichever network plate is laid out.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/render.rs | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/render.rs b/src/render.rs
index 8a49a0c..8a8ddd7 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -592,6 +592,11 @@ impl State {
             NETWORK_PANEL_IDX | CONTENT_IDX => {
                 self.focused_pane == LEFT_MENUBAR_IDX && !self.circular_network_pane
             }
+            // The second network editor shares the network focus domain —
+            // whichever of the two is FRONTED wears the ring when it holds.
+            crate::slots::NETWORK_PANEL2_IDX | crate::slots::CONTENT2_IDX => {
+                self.focused_pane == LEFT_MENUBAR_IDX
+            }
             VIEWPORT_IDX => self.focused_pane == RIGHT_MENUBAR_IDX,
             PARAM_IDX => self.focused_pane == PARAM_MENUBAR_IDX,
             SPREADSHEET_IDX => self.focused_pane == SPREADSHEET_MENUBAR_IDX,
@@ -637,7 +642,14 @@ impl State {
                     return;
                 }
                 color[3] *= self.network_opacity;
-                self.positions[NETWORK_PANEL_IDX]
+                // Whichever network editor is FRONTED owns the ring — pane
+                // 1's rect is zero while it waits as a tab.
+                let p2 = self.positions[crate::slots::NETWORK_PANEL2_IDX];
+                if p2.2 > 0.0 && self.positions[NETWORK_PANEL_IDX].2 <= 0.0 {
+                    p2
+                } else {
+                    self.positions[NETWORK_PANEL_IDX]
+                }
             }
             RIGHT_MENUBAR_IDX => {
                 if !self.show_viewport || relief {