Refactor Margin for fine grained control (#2727)

This commit is contained in:
Gokul Soumya 2022-06-21 22:22:08 +05:30 committed by GitHub
parent ce85b9716d
commit 8e8367eea6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 75 additions and 43 deletions

View file

@ -323,10 +323,7 @@ impl Component for Markdown {
.wrap(Wrap { trim: false })
.scroll((cx.scroll.unwrap_or_default() as u16, 0));
let margin = Margin {
vertical: 1,
horizontal: 1,
};
let margin = Margin::all(1);
par.render(area.inner(&margin), surface);
}