зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-07 07:55:50 +03:00
Merge pull request #79 from fmorroni/single_line-example-fix
Add block border color to single_line example so it matches readme gif
Этот коммит содержится в:
@@ -16,12 +16,18 @@ fn validate(textarea: &mut TextArea) -> bool {
|
|||||||
textarea.set_block(
|
textarea.set_block(
|
||||||
Block::default()
|
Block::default()
|
||||||
.borders(Borders::ALL)
|
.borders(Borders::ALL)
|
||||||
|
.border_style(Color::LightRed)
|
||||||
.title(format!("ERROR: {}", err)),
|
.title(format!("ERROR: {}", err)),
|
||||||
);
|
);
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
textarea.set_style(Style::default().fg(Color::LightGreen));
|
textarea.set_style(Style::default().fg(Color::LightGreen));
|
||||||
textarea.set_block(Block::default().borders(Borders::ALL).title("OK"));
|
textarea.set_block(
|
||||||
|
Block::default()
|
||||||
|
.border_style(Color::LightGreen)
|
||||||
|
.borders(Borders::ALL)
|
||||||
|
.title("OK"),
|
||||||
|
);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user