a modern tui library written in zig
17
fork

Configure Feed

Select the types of activity you want to include in your feed.

zig fmt

+5 -25
+5 -25
src/widgets/alignment.zig
··· 14 14 pub fn topLeft(parent: Window, cols: u16, rows: u16) Window { 15 15 const y_off: u16 = 0; 16 16 const x_off: u16 = 0; 17 - return parent.child(.{ 18 - .x_off = x_off, 19 - .y_off = y_off, 20 - .width = cols, 21 - .height = rows 22 - }); 17 + return parent.child(.{ .x_off = x_off, .y_off = y_off, .width = cols, .height = rows }); 23 18 } 24 19 25 20 pub fn topRight(parent: Window, cols: u16, rows: u16) Window { 26 21 const y_off: u16 = 0; 27 22 const x_off = parent.width -| cols; 28 - return parent.child(.{ 29 - .x_off = x_off, 30 - .y_off = y_off, 31 - .width = cols, 32 - .height = rows 33 - }); 23 + return parent.child(.{ .x_off = x_off, .y_off = y_off, .width = cols, .height = rows }); 34 24 } 35 25 36 26 pub fn bottomLeft(parent: Window, cols: u16, rows: u16) Window { 37 27 const y_off = parent.height -| rows; 38 28 const x_off: u16 = 0; 39 - return parent.child(.{ 40 - .x_off = x_off, 41 - .y_off = y_off, 42 - .width = cols, 43 - .height = rows 44 - }); 29 + return parent.child(.{ .x_off = x_off, .y_off = y_off, .width = cols, .height = rows }); 45 30 } 46 31 47 32 pub fn bottomRight(parent: Window, cols: u16, rows: u16) Window { 48 33 const y_off = parent.height -| rows; 49 34 const x_off = parent.width -| cols; 50 - return parent.child(.{ 51 - .x_off = x_off, 52 - .y_off = y_off, 53 - .width = cols, 54 - .height = rows 55 - }); 56 - } 35 + return parent.child(.{ .x_off = x_off, .y_off = y_off, .width = cols, .height = rows }); 36 + }