mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-09-19 13:36:42 +02:00
add Layout trait
This commit is contained in:
parent
1f60b43f61
commit
09463649c6
6 changed files with 208 additions and 222 deletions
|
|
@ -5,8 +5,8 @@ use super::*;
|
|||
/// ```
|
||||
/// /// TODO
|
||||
/// ```
|
||||
pub const fn border (on: bool, style: impl BorderStyle, draw: impl Draw<Tui>) -> impl Draw<Tui> {
|
||||
let content = wh_pad(1, 1, draw);
|
||||
pub fn border (on: bool, style: impl BorderStyle, draw: impl Draw<Tui>) -> impl Draw<Tui> {
|
||||
let content = draw.pad_wh(1, 1);
|
||||
let outline = when(on, thunk(move|to: &mut Tui|{
|
||||
let XYWH(x, y, w, h) = to.1;
|
||||
if w > 0 && h > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue