From fcaf919fd1e176e4b8dd6d5d21e25db7f68c32a8 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 3 Aug 2020 16:05:55 +0530 Subject: use consts for dimensions --- src/command.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/command.rs') 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; use cursive::views::{EditView, LinearLayout, OnEventView, TextView}; use cursive::Cursive; -use crate::{app::App, CONFIGURATION}; +use crate::app::App; +use crate::utils::{GRID_WIDTH, VIEW_WIDTH}; static COMMANDS: &'static [&'static str] = &[ "add", @@ -68,7 +69,7 @@ pub fn open_command_window(s: &mut Cursive) { } }, ) - .fixed_width(CONFIGURATION.view_width * CONFIGURATION.grid_width); + .fixed_width(VIEW_WIDTH * GRID_WIDTH); s.call_on_name("Frame", |view: &mut LinearLayout| { let mut commandline = LinearLayout::horizontal() .child(TextView::new(":")) -- cgit v1.2.3