aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-client/src
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-08 20:58:17 +0200
committeruser <user@clank>2026-08-08 20:58:17 +0200
commitc21f7324abdb6d83300a62b95e2af27bfcc75a1e (patch)
tree4bf95a6a71c5c0b6e36c96d2a2d58d654b13052b /zellij-client/src
parentsl0p: add fastdev build profile + SPEED.md (60x faster iteration) (diff)
downloadsl0ppij-c21f7324abdb6d83300a62b95e2af27bfcc75a1e.tar.gz
sl0ppij-c21f7324abdb6d83300a62b95e2af27bfcc75a1e.tar.xz
sl0ppij-c21f7324abdb6d83300a62b95e2af27bfcc75a1e.zip
sl0p: uniform pane gap + aspect-corrected horizontal gap
Two changes to how the gap is defined. 1. UNIFORM GAP. Previously every pane inset every side by `gap`, so two neighbours each gave up a cell and the space between them was 2*gap while the screen edge got only gap. Now a pane insets RIGHT and BOTTOM always, and LEFT/TOP only where that edge is the viewport boundary. Two neighbours contribute exactly one gap between them, and the outer screen edges get the same gap. `gap 1` now means 1 everywhere. The per-side offset is computed in tiled_panes, which is the layer that knows the viewport, and pushed to panes via Pane::set_gap_offset before the content-offset sweep. Floating panes keep a zero gap: they are positioned explicitly by the user, so an inter-pane gap does not apply to them (they still get padding). 2. ASPECT CORRECTION. Terminal cells are roughly twice as tall as they are wide, so an equal number of rows and columns does not look like an equal distance. `gap` and `padding` are now expressed in ROWS, and columns are multiplied by `gap_aspect` (default 2, minimum 1). Style carries the resolved pane_gap_x/y and pane_padding_x/y. FrameConfig::Default is now hand-written rather than derived: gap_aspect must default to 2 to match the KDL parser, otherwise a parsed config disagrees with a default-constructed one and it surfaces as config round-trip diffs (this broke can_define_ui_configuration_in_configfile and both bare_config_from_default_assets_to_string tests). Tests assert the actual invariants: stacked and side-by-side neighbours get exactly one gap between them, screen edges get the same gap as between panes, and inset_by refuses to collapse a pane too small to survive it. Baselines held: zellij-server 1421/30, zellij-utils 433/5.
Diffstat (limited to 'zellij-client/src')
-rw-r--r--zellij-client/src/web_client/server_listener.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/zellij-client/src/web_client/server_listener.rs b/zellij-client/src/web_client/server_listener.rs
index 71ef5376..8f80f4ac 100644
--- a/zellij-client/src/web_client/server_listener.rs
+++ b/zellij-client/src/web_client/server_listener.rs
@@ -84,8 +84,10 @@ pub fn zellij_server_listener(
rounded_corners: config.ui.pane_frames.rounded_corners,
hide_session_name: config.ui.pane_frames.hide_session_name,
pane_title_alignment: config.ui.pane_frames.title_alignment,
- pane_gap: config.ui.pane_frames.gap,
- pane_padding: config.ui.pane_frames.padding,
+ pane_gap_x: config.ui.pane_frames.resolved_gap().0,
+ pane_gap_y: config.ui.pane_frames.resolved_gap().1,
+ pane_padding_x: config.ui.pane_frames.resolved_padding().0,
+ pane_padding_y: config.ui.pane_frames.resolved_padding().1,
},
};