mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Slightly more expressive method name
This commit is contained in:
parent
7aa3d2c2d6
commit
39a561f2bb
@ -251,7 +251,7 @@ impl Constraints {
|
||||
}
|
||||
|
||||
/// Changes all constraints by adding the `size` to them if they are `Some`.
|
||||
pub fn mutate(&mut self, size: Size, regions: &Regions) {
|
||||
pub fn inflate(&mut self, size: Size, regions: &Regions) {
|
||||
for spec in [
|
||||
&mut self.min,
|
||||
&mut self.max,
|
||||
|
@ -31,7 +31,7 @@ impl Layout for PadNode {
|
||||
let prev = std::mem::take(&mut frame.item);
|
||||
new.push_frame(origin, prev);
|
||||
|
||||
frame.constraints.mutate(padding.size(), ®ions);
|
||||
frame.constraints.inflate(padding.size(), ®ions);
|
||||
|
||||
if self.padding.left.is_relative() || self.padding.right.is_relative() {
|
||||
frame.constraints.base.horizontal = Some(regions.base.width);
|
||||
|
Loading…
x
Reference in New Issue
Block a user