diff options
author | Kyohei Uto <kyoheiu@outlook.com> | 2022-10-25 05:49:12 +0900 |
---|---|---|
committer | Kyohei Uto <kyoheiu@outlook.com> | 2022-10-25 05:49:12 +0900 |
commit | 997432e87832e116693109e5c67d56d4b63a5aa7 (patch) | |
tree | 66997abfc6cd222b6a3667a617593b6b72c451b4 /src/layout.rs | |
parent | ee906a2c4384bdfe5a0b0bb1747d772b6f1e367f (diff) |
Add Split field to Layout
Diffstat (limited to 'src/layout.rs')
-rw-r--r-- | src/layout.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/layout.rs b/src/layout.rs index 4205f89..6c085d9 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -17,7 +17,7 @@ pub const PROPER_WIDTH: u16 = 28; pub const TIME_WIDTH: u16 = 16; pub const DEFAULT_NAME_LENGTH: u16 = 30; -#[derive(Debug, Clone)] +#[derive(Debug)] pub struct Layout { pub y: u16, pub terminal_row: u16, @@ -28,6 +28,7 @@ pub struct Layout { pub option_name_len: Option<usize>, pub colors: ConfigColor, pub preview: bool, + pub split: Split, pub preview_start_column: u16, pub preview_width: u16, pub has_chafa: bool, @@ -43,6 +44,12 @@ pub enum PreviewType { Binary, } +#[derive(Debug)] +pub enum Split { + Horizontal, + Vertical, +} + impl Layout { /// Print preview according to the preview type. pub fn print_preview(&self, item: &ItemInfo, y: u16) { |