diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-03-28 03:07:43 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-10 19:40:41 +0300 |
commit | 1867bb6aa35408461ab699b56267a249432f6d91 (patch) | |
tree | 7ebd871b665af81208d5ef2bba1a016b92fffcb4 | |
parent | 4629e6a22fb93d9f2e0b7db9a00b4789c7f28970 (diff) |
ui: hide divider column in VSplit if !self.show_divider
-rw-r--r-- | src/bin.rs | 2 | ||||
-rw-r--r-- | ui/src/components/mail.rs | 3 | ||||
-rw-r--r-- | ui/src/components/utilities.rs | 2 |
3 files changed, 2 insertions, 5 deletions
@@ -67,7 +67,7 @@ fn main() { let listing = listing::Listing::from(IndexStyle::Compact); let b = Entity::from(Box::new(listing)); let tabs = Box::new(Tabbed::new(vec![ - Box::new(VSplit::new(menu, b, 90, true)), + Box::new(VSplit::new(menu, b, 90, false)), Box::new(AccountsPanel::new(&state.context)), Box::new(ContactList::default()), ])); diff --git a/ui/src/components/mail.rs b/ui/src/components/mail.rs index 557de7cd..4a760fd7 100644 --- a/ui/src/components/mail.rs +++ b/ui/src/components/mail.rs @@ -253,9 +253,6 @@ impl Component for AccountMenu { self.dirty = false; let mut y = get_y(upper_left); for a in &self.accounts { - for x in x..=x_max { - grid[(x, y)].set_ch('━'); - } y += 1; y += self.print_account(grid, (set_y(upper_left, y), bottom_right), &a, context); } diff --git a/ui/src/components/utilities.rs b/ui/src/components/utilities.rs index 27626ff8..9d126ecd 100644 --- a/ui/src/components/utilities.rs +++ b/ui/src/components/utilities.rs @@ -200,7 +200,7 @@ impl Component for VSplit { } else { self.left.component.draw( grid, - (upper_left, ((mid - 1), get_y(bottom_right))), + (upper_left, (if self.show_divider { mid - 1 } else { mid }, get_y(bottom_right))), context, ); self.right |