mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
separate render/content macros; add has_jack
This commit is contained in:
parent
08184f9906
commit
e62e36d558
19 changed files with 183 additions and 226 deletions
|
|
@ -1,13 +1,11 @@
|
|||
use crate::*;
|
||||
|
||||
pub struct Bordered<S: BorderStyle, W: Content<TuiOut>>(pub S, pub W);
|
||||
|
||||
render!(TuiOut: (self: Bordered<S: BorderStyle, W: Content<TuiOut>>) => {
|
||||
Fill::xy(lay!(Border(self.0), Padding::xy(1, 1, &self.1)))
|
||||
});
|
||||
content!(TuiOut: |self: Bordered<S: BorderStyle, W: Content<TuiOut>>|Fill::xy(
|
||||
lay!(Border(self.0), Padding::xy(1, 1, &self.1))
|
||||
));
|
||||
|
||||
pub struct Border<S: BorderStyle>(pub S);
|
||||
|
||||
render!(TuiOut: |self: Border<S: BorderStyle>, to| {
|
||||
let area = to.area();
|
||||
if area.w() > 0 && area.y() > 0 {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ pub enum FileBrowserCommand {
|
|||
Chdir(PathBuf),
|
||||
Filter(Arc<str>),
|
||||
}
|
||||
render!(TuiOut: (self: FileBrowser) => /*Stack::down(|add|{
|
||||
content!(TuiOut: |self: FileBrowser| /*Stack::down(|add|{
|
||||
let mut i = 0;
|
||||
for (_, name) in self.dirs.iter() {
|
||||
if i >= self.scroll {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue