aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs9
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,
}
}
}