Skip to content

Commit

Permalink
add demo entry on docs
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jan 6, 2025
1 parent ca24467 commit f8dd34b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions docs/docs/config/line-height.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 'line-height'
language: 'en'
---

Default is `1.0`.

Note: It cannot be settled as any value under `1.0`.

```toml
line-height = 1.5
```

![Demo line height](/assets/demos/demo-line-height.png)
Binary file added docs/static/assets/demos/demo-line-height.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions frontends/rioterm/src/context/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ pub struct ContextDimension {
pub lines: usize,
pub dimension: SugarDimensions,
pub margin: Delta<f32>,
pub line_height: f32,
}

impl Default for ContextDimension {
Expand All @@ -858,6 +859,7 @@ impl Default for ContextDimension {
height: 0.,
columns: MIN_COLS,
lines: MIN_LINES,
line_height: 1.,
dimension: SugarDimensions::default(),
margin: Delta::<f32>::default(),
}
Expand All @@ -880,6 +882,7 @@ impl ContextDimension {
lines,
dimension,
margin,
line_height,
}
}

Expand Down Expand Up @@ -925,8 +928,7 @@ impl ContextDimension {
self.width,
self.height,
self.dimension,
// self.line_height,
1.0,
self.line_height,
self.margin,
);

Expand Down

0 comments on commit f8dd34b

Please sign in to comment.