aboutsummaryrefslogtreecommitdiff
path: root/src/command.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-08-03 11:35:55 +0100
committerAkshay <[email protected]>2020-08-03 11:35:55 +0100
commitfcaf919fd1e176e4b8dd6d5d21e25db7f68c32a8 (patch)
treeb1fa143f95d5bbc48f4008641ce031cd7f5f4532 /src/command.rs
parent7e1dff439f1768fc463ddcfcd6ea58a7a1711056 (diff)
use consts for dimensions
Diffstat (limited to 'src/command.rs')
-rw-r--r--src/command.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/command.rs b/src/command.rs
index 0ef5121..8c823a2 100644
--- a/src/command.rs
+++ b/src/command.rs
@@ -6,7 +6,8 @@ use cursive::view::Resizable;
6use cursive::views::{EditView, LinearLayout, OnEventView, TextView}; 6use cursive::views::{EditView, LinearLayout, OnEventView, TextView};
7use cursive::Cursive; 7use cursive::Cursive;
8 8
9use crate::{app::App, CONFIGURATION}; 9use crate::app::App;
10use crate::utils::{GRID_WIDTH, VIEW_WIDTH};
10 11
11static COMMANDS: &'static [&'static str] = &[ 12static COMMANDS: &'static [&'static str] = &[
12 "add", 13 "add",
@@ -68,7 +69,7 @@ pub fn open_command_window(s: &mut Cursive) {
68 } 69 }
69 }, 70 },
70 ) 71 )
71 .fixed_width(CONFIGURATION.view_width * CONFIGURATION.grid_width); 72 .fixed_width(VIEW_WIDTH * GRID_WIDTH);
72 s.call_on_name("Frame", |view: &mut LinearLayout| { 73 s.call_on_name("Frame", |view: &mut LinearLayout| {
73 let mut commandline = LinearLayout::horizontal() 74 let mut commandline = LinearLayout::horizontal()
74 .child(TextView::new(":")) 75 .child(TextView::new(":"))