change default window padding

This makes the default terminal config look a little nicer.
This commit is contained in:
Wez Furlong committed 2021-10-08 20:38:28 -07:00
1 parent 5d765e2efe
commit 854ea8f2d1
2 files changed
+26 -5

No files matched your search

+24 -5
View File
@@ -1339,19 +1339,38 @@ impl DefaultCursorStyle {
}
}
#[derive(Default, Deserialize, Serialize, Clone, Copy, Debug)]
const fn default_one_cell() -> Dimension {
Dimension::Cells(1.)
}
const fn default_half_cell() -> Dimension {
Dimension::Cells(0.5)
}
#[derive(Deserialize, Serialize, Clone, Copy, Debug)]
pub struct WindowPadding {
#[serde(default, deserialize_with = "de_pixels")]
#[serde(deserialize_with = "de_pixels", default = "default_one_cell")]
pub left: Dimension,
#[serde(default, deserialize_with = "de_pixels")]
#[serde(deserialize_with = "de_pixels", default = "default_half_cell")]
pub top: Dimension,
#[serde(default, deserialize_with = "de_pixels")]
#[serde(deserialize_with = "de_pixels", default = "default_one_cell")]
pub right: Dimension,
#[serde(default, deserialize_with = "de_pixels")]
#[serde(deserialize_with = "de_pixels", default = "default_half_cell")]
pub bottom: Dimension,
}
impl_lua_conversion!(WindowPadding);
impl Default for WindowPadding {
fn default() -> Self {
Self {
left: default_one_cell(),
right: default_one_cell(),
top: default_half_cell(),
bottom: default_half_cell(),
}
}
}
#[derive(Deserialize, Serialize, Clone, Copy, Debug)]
pub enum WindowCloseConfirmation {
AlwaysPrompt,
+2
View File
@@ -33,6 +33,8 @@ a string value with a unit suffix:
You may use a fractional number such as `"0.5cell"` or numbers large than one such as `"72pt"`.
The default padding is shown below. In earlier releases, the default padding was 0 for each of the possible edges.
```lua
return {
window_padding = {