diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-06 20:36:59 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-06 20:36:59 +0300 |
commit | a028aa9a44ea2a4c30e5f1d2bfb3d56daac9d6aa (patch) | |
tree | be585cb0716bc41ccc9b919f9d8009cb1d024de1 /ui | |
parent | 74be47ec5ac59d31c80bf3801ead1ea47ad13bd3 (diff) |
ui: change contact list header colors
Diffstat (limited to 'ui')
-rw-r--r-- | ui/src/components/contacts.rs | 24 | ||||
-rw-r--r-- | ui/src/components/contacts/contact_list.rs | 27 |
2 files changed, 26 insertions, 25 deletions
diff --git a/ui/src/components/contacts.rs b/ui/src/components/contacts.rs index e3fa8b84..7a7174f7 100644 --- a/ui/src/components/contacts.rs +++ b/ui/src/components/contacts.rs @@ -72,19 +72,11 @@ impl ContactManager { 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())); } } diff --git a/ui/src/components/contacts/contact_list.rs b/ui/src/components/contacts/contact_list.rs index 5fd5b3ae..7da666ae 100644 --- a/ui/src/components/contacts/contact_list.rs +++ b/ui/src/components/contacts/contact_list.rs @@ -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()); |