summaryrefslogtreecommitdiff
path: root/src/style
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-11-16 00:37:33 +0100
committerLaurenz <laurmaedje@gmail.com>2021-11-16 00:37:33 +0100
commit210c4d93736263e124e66622f052758dbec544b1 (patch)
treea0ccabe6686bc9f50a80ad3d6c383ceb8139a985 /src/style
parent370802de1368961744316ea8f4a8786afc0b87d6 (diff)
Move `lang` functionality into `par`
Diffstat (limited to 'src/style')
-rw-r--r--src/style/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/style/mod.rs b/src/style/mod.rs
index bb662032..c2a92568 100644
--- a/src/style/mod.rs
+++ b/src/style/mod.rs
@@ -16,8 +16,6 @@ use crate::util::EcoString;
/// Defines a set of properties a template can be instantiated with.
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct Style {
- /// The direction for text and other inline objects.
- pub dir: Dir,
/// The alignments of layouts in their parents.
pub aligns: Gen<Align>,
/// The page settings.
@@ -58,7 +56,6 @@ impl Style {
impl Default for Style {
fn default() -> Self {
Self {
- dir: Dir::LTR,
aligns: Gen::splat(Align::Start),
page: Rc::new(PageStyle::default()),
par: Rc::new(ParStyle::default()),
@@ -106,17 +103,20 @@ impl Default for PageStyle {
/// Defines style properties of paragraphs.
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct ParStyle {
- /// The spacing between paragraphs (dependent on scaled font size).
- pub spacing: Linear,
+ /// The direction for text and other inline objects.
+ pub dir: Dir,
/// The spacing between lines (dependent on scaled font size).
pub leading: Linear,
+ /// The spacing between paragraphs (dependent on scaled font size).
+ pub spacing: Linear,
}
impl Default for ParStyle {
fn default() -> Self {
Self {
- spacing: Relative::new(1.2).into(),
+ dir: Dir::LTR,
leading: Relative::new(0.65).into(),
+ spacing: Relative::new(1.2).into(),
}
}
}