mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-27 01:40:16 -05:00
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
This commit is contained in:
parent
5621829bb0
commit
5a84f8d841
6 changed files with 60 additions and 20 deletions
10
config.h
10
config.h
|
|
@ -201,6 +201,14 @@ enum shm_bit_depth {
|
|||
SHM_BITS_16,
|
||||
};
|
||||
|
||||
enum center_when {
|
||||
CENTER_INVALID,
|
||||
CENTER_NEVER,
|
||||
CENTER_FULLSCREEN,
|
||||
CENTER_MAXIMIZED_AND_FULLSCREEN,
|
||||
CENTER_ALWAYS,
|
||||
};
|
||||
|
||||
struct config {
|
||||
char *term;
|
||||
char *shell;
|
||||
|
|
@ -218,7 +226,7 @@ struct config {
|
|||
|
||||
unsigned pad_x;
|
||||
unsigned pad_y;
|
||||
bool center;
|
||||
enum center_when center_when;
|
||||
|
||||
bool resize_by_cells;
|
||||
bool resize_keep_grid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue