ui: change contact list header colors
parent
74be47ec5a
commit
a028aa9a44
|
@ -71,20 +71,12 @@ impl ContactManager {
|
|||
fn initialize(&mut self) {
|
||||
let (width, _) = self.content.size();
|
||||
|
||||
let (x, _) = write_string_to_grid(
|
||||
"Contact Name ",
|
||||
&mut self.content,
|
||||
Color::Byte(33),
|
||||
Color::Default,
|
||||
((0, 0), (width, 0)),
|
||||
false,
|
||||
);
|
||||
let (x, _) = write_string_to_grid(
|
||||
"Last edited: ",
|
||||
&mut self.content,
|
||||
Color::Byte(250),
|
||||
Color::Default,
|
||||
((x, 0), (width, 0)),
|
||||
((0, 0), (width, 0)),
|
||||
false,
|
||||
);
|
||||
write_string_to_grid(
|
||||
|
@ -98,19 +90,19 @@ impl ContactManager {
|
|||
self.form = FormWidget::new("Save".into());
|
||||
self.form.add_button(("Cancel".into(), false));
|
||||
self.form
|
||||
.push(("Name".into(), self.card.name().to_string()));
|
||||
.push(("NAME".into(), self.card.name().to_string()));
|
||||
self.form.push((
|
||||
"Additional Name".into(),
|
||||
"ADDITIONAL NAME".into(),
|
||||
self.card.additionalname().to_string(),
|
||||
));
|
||||
self.form
|
||||
.push(("Name Prefix".into(), self.card.name_prefix().to_string()));
|
||||
.push(("NAME PREFIX".into(), self.card.name_prefix().to_string()));
|
||||
self.form
|
||||
.push(("Name Suffix".into(), self.card.name_suffix().to_string()));
|
||||
.push(("NAME SUFFIX".into(), self.card.name_suffix().to_string()));
|
||||
self.form
|
||||
.push(("E-mail".into(), self.card.email().to_string()));
|
||||
self.form.push(("url".into(), self.card.url().to_string()));
|
||||
self.form.push(("key".into(), self.card.key().to_string()));
|
||||
.push(("E-MAIL".into(), self.card.email().to_string()));
|
||||
self.form.push(("URL".into(), self.card.url().to_string()));
|
||||
self.form.push(("KEY".into(), self.card.key().to_string()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,30 +86,39 @@ impl ContactList {
|
|||
}
|
||||
maxima.0 += 5;
|
||||
maxima.1 += maxima.0 + 5;
|
||||
write_string_to_grid(
|
||||
"Name",
|
||||
let (x, _) = write_string_to_grid(
|
||||
"NAME",
|
||||
&mut self.content,
|
||||
Color::Default,
|
||||
Color::Default,
|
||||
Color::Black,
|
||||
Color::White,
|
||||
((0, 0), (MAX_COLS - 1, self.length)),
|
||||
false,
|
||||
);
|
||||
for x in x..maxima.0 {
|
||||
self.content[(x, 0)].set_bg(Color::White);
|
||||
}
|
||||
write_string_to_grid(
|
||||
"E-mail",
|
||||
"E-MAIL",
|
||||
&mut self.content,
|
||||
Color::Default,
|
||||
Color::Default,
|
||||
Color::Black,
|
||||
Color::White,
|
||||
((maxima.0, 0), (MAX_COLS - 1, self.length)),
|
||||
false,
|
||||
);
|
||||
for x in x..maxima.1 {
|
||||
self.content[(x, 0)].set_bg(Color::White);
|
||||
}
|
||||
write_string_to_grid(
|
||||
"URL",
|
||||
&mut self.content,
|
||||
Color::Default,
|
||||
Color::Default,
|
||||
Color::Black,
|
||||
Color::White,
|
||||
((maxima.1, 0), (MAX_COLS - 1, self.length)),
|
||||
false,
|
||||
);
|
||||
for x in x..(MAX_COLS - 1) {
|
||||
self.content[(x, 0)].set_bg(Color::White);
|
||||
}
|
||||
for (i, c) in book.values().enumerate() {
|
||||
self.id_positions.push(*c.id());
|
||||
|
||||
|
|
Loading…
Reference in New Issue