mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-07 01:56:45 +01:00
add value bar
This commit is contained in:
parent
2ebf2c6cef
commit
41b6a0cd57
6 changed files with 64 additions and 39 deletions
|
|
@ -8,6 +8,7 @@ pub struct Column<T, G, S> {
|
|||
pub width: usize,
|
||||
pub getter: G,
|
||||
pub setter: Option<S>,
|
||||
//pub styler: Option<U>,
|
||||
}
|
||||
|
||||
impl<T> Column<T, fn(&T)->Option<Arc<str>>, fn(&mut [T], usize, &str)> {
|
||||
|
|
@ -33,7 +34,7 @@ impl<T> Column<T, fn(&T)->Option<Arc<str>>, fn(&mut [T], usize, &str)> {
|
|||
macro_rules! setter {
|
||||
($method:ident) => {
|
||||
|entries: &mut [Entry], index: usize, value: &str|{
|
||||
if let Some(entries) = paths_under(entries, index) {
|
||||
if let Some(entries) = entries_under(entries, index) {
|
||||
for entry in entries.iter() {
|
||||
entry.write().unwrap().$method(&value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue