From 5a84f8d841d09e9aa91befbbb8e8b634b7f8959a Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 23 May 2025 08:38:00 +0200 Subject: conf: pad: add center-when-fullscreen and center-when-maximized-and-fullscreen Before this patch, the grid content was *always* centered when the window was maximized or fullscreened, regardless of how the user had configured padding. Now, the behavior is controlled by the 'pad' option. Before this patch, the syntax was pad MxN [center] Now it is pad MxN [center|center-when-fullscreen|center-when-maximized-and-fullscreen] The default is "pad 0x0 center-when-maximized-and-fullscreen", to match current behavior. Closes #2111 --- doc/foot.ini.5.scd | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 81b88f64..74b3f35b 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -289,18 +289,29 @@ empty string to be set, but it must be quoted: *KEY=""*) *pad* Padding between border and glyphs, in pixels (subject to output - scaling), in the form _XxY_. + scaling), in the form + + ``` + _XxY_ [center | center-when-fullscreen | center-when-maximized-and-fullscreen] + ``` This will add _at least_ X pixels on both the left and right - sides, and Y pixels on the top and bottom sides. The grid content - will be anchored in the top left corner. I.e. if the window - manager forces an odd window size on foot, the additional pixels - will be added to the right and bottom sides. + sides, and Y pixels on the top and bottom sides. + + When no centering is specified, the grid content is anchored to + the top left corner. I.e. if the window manager forces an odd + window size on foot, the additional pixels will be added to the + right and bottom sides. + + If *center* is specified, the grid content is instead + centered. This may cause "jumpiness" when resizing the window. - To instead center the grid content, append *center* (e.g. *pad=5x5 - center*). + With *center-when-fullscreen* and + *center-when-maximized-and-fullscreen*, the grid is anchored to + the top left corner, unless the window is maximized, or + fullscreened. - Default: _0x0_. + Default: _0x0_ center-when-maximized-and-fullscreen. *resize-delay-ms* -- cgit v1.3