gardesk/tarmac / c38fcff

Browse files

Reveal stacked windows on both axes

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
c38fcff0c1909c8f7f494e81b5fa1dbae808743b
Parents
92e1d14
Tree
fd7792d

1 changed file

StatusFile+-
M tarmac/src/core/tree.rs 5 3
tarmac/src/core/tree.rsmodified
@@ -61,7 +61,8 @@ impl Rect {
6161
     }
6262
 }
6363
 
64
-const STACK_REVEAL_OFFSET: f64 = 24.0;
64
+const STACK_REVEAL_OFFSET_X: f64 = 24.0;
65
+const STACK_REVEAL_OFFSET_Y: f64 = 24.0;
6566
 
6667
 #[derive(Debug, Clone, PartialEq)]
6768
 pub enum Node {
@@ -321,8 +322,8 @@ impl Node {
321322
                     geoms.push((
322323
                         *wid,
323324
                         Rect::new(
324
-                            padded.x + STACK_REVEAL_OFFSET * depth as f64,
325
-                            padded.y,
325
+                            padded.x + STACK_REVEAL_OFFSET_X * depth as f64,
326
+                            padded.y + STACK_REVEAL_OFFSET_Y * depth as f64,
326327
                             padded.width,
327328
                             padded.height,
328329
                         ),
@@ -1421,6 +1422,7 @@ mod tests {
14211422
         let g3 = geoms.iter().find(|(wid, _)| *wid == 3).unwrap().1;
14221423
 
14231424
         assert!(g2.x > g3.x);
1425
+        assert!(g2.y > g3.y);
14241426
         assert_eq!(g2.width, g3.width);
14251427
         assert_eq!(g2.height, g3.height);
14261428
     }