diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-11-15 19:57:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-15 19:57:15 +0000 |
commit | d68ecb0deff8b966a0c7d09203d14bfdf5ccd8ad (patch) | |
tree | 4b0326cf4ea450d6870d2604f464b8ecfd354c9c /src/config.rs | |
parent | ba76ac8661539727c96362d501590d4a18936b39 (diff) | |
download | alacritty-d68ecb0deff8b966a0c7d09203d14bfdf5ccd8ad.tar.gz alacritty-d68ecb0deff8b966a0c7d09203d14bfdf5ccd8ad.zip |
Add option for dynamic padding (#1780)
This adds the `window.dynamic_padding` option which allows disabling the
dynamic spread of additional padding around the grid's content.
Based on the feedback I've gotten so far and the fact that most other
terminal emulators do not seem to center the content inside themselves,
I've changed the default configuration option to disable centering of the grid.
This fixes #1778.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index b638ea43..ee30c085 100644 --- a/src/config.rs +++ b/src/config.rs @@ -376,6 +376,10 @@ pub struct WindowConfig { /// Draw the window with title bar / borders #[serde(default)] decorations: Decorations, + + /// Spread out additional padding evenly + #[serde(default, deserialize_with = "failure_default")] + dynamic_padding: bool, } fn default_padding() -> Delta<u8> { @@ -398,6 +402,10 @@ impl WindowConfig { pub fn decorations(&self) -> Decorations { self.decorations } + + pub fn dynamic_padding(&self) -> bool { + self.dynamic_padding + } } impl Default for WindowConfig { @@ -406,6 +414,7 @@ impl Default for WindowConfig { dimensions: Default::default(), padding: default_padding(), decorations: Default::default(), + dynamic_padding: false, } } } |