diff options
author | Jeff Zhao <jeff.no.zhao@gmail.com> | 2022-09-05 17:00:01 -0400 |
---|---|---|
committer | Jeff Zhao <jeff.no.zhao@gmail.com> | 2022-09-05 17:00:01 -0400 |
commit | 35b36cfe5e2053a53656d3e1b4ba54a10d1a1618 (patch) | |
tree | 0a17e8f1960522c0cbb9e2c87b2a5009f1ef307e /src/context | |
parent | e8a812d73cfb0c3e9a171dc9de3b43acc2f3a2f3 (diff) |
move border rendering out of folder view
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/app_context.rs | 9 | ||||
-rw-r--r-- | src/context/mod.rs | 2 | ||||
-rw-r--r-- | src/context/ui_context.rs | 6 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/context/app_context.rs b/src/context/app_context.rs index 66ffbc6..4f605ce 100644 --- a/src/context/app_context.rs +++ b/src/context/app_context.rs @@ -2,12 +2,12 @@ use std::collections::HashSet; use std::process; use std::sync::mpsc; use std::thread; -use tui::layout::Rect; use crate::commands::quit::QuitAction; use crate::config; use crate::context::{ - CommandLineContext, LocalStateContext, MessageQueue, PreviewContext, TabContext, WorkerContext, + CommandLineContext, LocalStateContext, MessageQueue, PreviewContext, TabContext, UiContext, + WorkerContext, }; use crate::event::{AppEvent, Events}; use crate::ui::views; @@ -17,11 +17,6 @@ use crate::Args; use notify::{RecursiveMode, Watcher}; use std::path; -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct UiContext { - pub layout: Vec<Rect>, -} - pub struct AppContext { pub quit: QuitAction, // event loop querying diff --git a/src/context/mod.rs b/src/context/mod.rs index 884c492..ac6c445 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -4,6 +4,7 @@ mod local_state; mod message_queue; mod preview_context; mod tab_context; +mod ui_context; mod worker_context; pub use self::app_context::*; @@ -12,4 +13,5 @@ pub use self::local_state::*; pub use self::message_queue::*; pub use self::preview_context::*; pub use self::tab_context::*; +pub use self::ui_context::*; pub use self::worker_context::*; diff --git a/src/context/ui_context.rs b/src/context/ui_context.rs new file mode 100644 index 0000000..c5a8006 --- /dev/null +++ b/src/context/ui_context.rs @@ -0,0 +1,6 @@ +use tui::layout::Rect; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct UiContext { + pub layout: Vec<Rect>, +} |