diff options
author | Akshay <[email protected]> | 2021-05-13 18:01:26 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-05-13 18:01:26 +0100 |
commit | a9142b54a72bac4864ae1147a96fcf6896cee3d6 (patch) | |
tree | bb7e3cf5dafecc24c09d592b58c904b8aa7e26dc /src/command.rs | |
parent | bf30b22665ef596f8627559bd8378d7ab6fbbd47 (diff) |
allow custom grid_size from toml filegrid-width
Diffstat (limited to 'src/command.rs')
-rw-r--r-- | src/command.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/command.rs b/src/command.rs index bfd09d8..1b159eb 100644 --- a/src/command.rs +++ b/src/command.rs | |||
@@ -8,7 +8,8 @@ use cursive::views::{EditView, LinearLayout, OnEventView, TextView}; | |||
8 | use cursive::Cursive; | 8 | use cursive::Cursive; |
9 | 9 | ||
10 | use crate::app::App; | 10 | use crate::app::App; |
11 | use crate::utils::{GRID_WIDTH, VIEW_WIDTH}; | 11 | use crate::CONFIGURATION; |
12 | use crate::utils::VIEW_WIDTH; | ||
12 | 13 | ||
13 | static COMMANDS: &'static [&'static str] = &[ | 14 | static COMMANDS: &'static [&'static str] = &[ |
14 | "add", | 15 | "add", |
@@ -69,7 +70,7 @@ pub fn open_command_window(s: &mut Cursive) { | |||
69 | } | 70 | } |
70 | }, | 71 | }, |
71 | ) | 72 | ) |
72 | .fixed_width(VIEW_WIDTH * GRID_WIDTH); | 73 | .fixed_width(VIEW_WIDTH * CONFIGURATION.grid_size()); |
73 | s.call_on_name("Frame", |view: &mut LinearLayout| { | 74 | s.call_on_name("Frame", |view: &mut LinearLayout| { |
74 | let mut commandline = LinearLayout::horizontal() | 75 | let mut commandline = LinearLayout::horizontal() |
75 | .child(TextView::new(":")) | 76 | .child(TextView::new(":")) |