summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-11-28 20:38:21 +0100
committerLaurenz <laurmaedje@gmail.com>2019-11-28 20:38:21 +0100
commitb4efae08834a3a950387f01aebaa9e832acd9423 (patch)
treebf311243f625a6da5660ff99ebc2764079f502cf /src
parent17082389ae90438682978c825ec620b544d73b65 (diff)
Remove bad tests and tweak numbers for better debugging 🧪
Diffstat (limited to 'src')
-rw-r--r--src/size.rs12
-rw-r--r--src/style.rs4
2 files changed, 14 insertions, 2 deletions
diff --git a/src/size.rs b/src/size.rs
index fac31625..50b3ace5 100644
--- a/src/size.rs
+++ b/src/size.rs
@@ -116,6 +116,12 @@ impl Size2D {
Size2D::default()
}
+ /// Create a 2D-size with `x` and `y` set to the same value `s`.
+ #[inline]
+ pub fn with_all(s: Size) -> Size2D {
+ Size2D { x: s, y: s }
+ }
+
/// Create a new 2D-size with `x` set to a value and `y` zero.
#[inline]
pub fn with_x(x: Size) -> Size2D {
@@ -179,6 +185,12 @@ impl SizeBox {
pub fn zero() -> SizeBox {
SizeBox::default()
}
+
+ /// Create a box with all four fields set to the same value `s`.
+ #[inline]
+ pub fn with_all(s: Size) -> SizeBox {
+ SizeBox { left: s, top: s, right: s, bottom: s }
+ }
}
/// The maximum of two sizes.
diff --git a/src/style.rs b/src/style.rs
index da190b46..ae396852 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -65,10 +65,10 @@ impl Default for TextStyle {
TextStyle {
classes: vec![Regular],
fallback: vec![Serif],
- font_size: Size::pt(11.0),
+ font_size: Size::pt(10.0),
word_spacing: 0.25,
line_spacing: 1.2,
- paragraph_spacing: 1.5,
+ paragraph_spacing: 1.4,
}
}
}