mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 03:25:23 +00:00
formatting
This commit is contained in:
parent
725d399d82
commit
6d398039d3
@ -4,8 +4,8 @@ use television_derive::CliChannel;
|
||||
mod alias;
|
||||
mod env;
|
||||
mod files;
|
||||
mod text;
|
||||
mod stdin;
|
||||
mod text;
|
||||
|
||||
/// The interface that all television channels must implement.
|
||||
///
|
||||
|
@ -1,9 +1,9 @@
|
||||
use ratatui::style::{Color, Style, Stylize};
|
||||
|
||||
pub mod input;
|
||||
pub mod results;
|
||||
pub mod preview;
|
||||
pub mod layout;
|
||||
pub mod preview;
|
||||
pub mod results;
|
||||
|
||||
// input
|
||||
//const DEFAULT_INPUT_FG: Color = Color::Rgb(200, 200, 200);
|
||||
@ -23,4 +23,3 @@ pub fn get_border_style(focused: bool) -> Style {
|
||||
Style::default().fg(Color::Rgb(90, 90, 110)).dim()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
pub mod backend;
|
||||
pub mod actions;
|
||||
pub mod backend;
|
||||
|
||||
/// Input requests are used to change the input state.
|
||||
///
|
||||
|
@ -27,4 +27,4 @@ impl InputActionHandler for Input {
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -111,4 +111,3 @@ fn centered_rect(percent_x: u16, percent_y: u16, r: Rect) -> Rect {
|
||||
// UI size
|
||||
const UI_WIDTH_PERCENT: u16 = 90;
|
||||
const UI_HEIGHT_PERCENT: u16 = 90;
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
use ratatui::prelude::{Color, Line, Modifier, Span, Style, Stylize, Text};
|
||||
use ratatui::widgets::{Block, Paragraph, Wrap};
|
||||
use ratatui::layout::{Alignment, Rect};
|
||||
use std::sync::Arc;
|
||||
use syntect::highlighting::Color as SyntectColor;
|
||||
use crate::previewers::{Preview, PreviewContent, FILE_TOO_LARGE_MSG, PREVIEW_NOT_SUPPORTED_MSG};
|
||||
use crate::previewers::{
|
||||
Preview, PreviewContent, FILE_TOO_LARGE_MSG, PREVIEW_NOT_SUPPORTED_MSG,
|
||||
};
|
||||
use crate::television::Television;
|
||||
use crate::utils::strings::{EMPTY_STRING, FOUR_SPACES};
|
||||
use ratatui::layout::{Alignment, Rect};
|
||||
use ratatui::prelude::{Color, Line, Modifier, Span, Style, Stylize, Text};
|
||||
use ratatui::widgets::{Block, Paragraph, Wrap};
|
||||
use std::sync::Arc;
|
||||
use syntect::highlighting::Color as SyntectColor;
|
||||
|
||||
// preview
|
||||
pub const DEFAULT_PREVIEW_TITLE_FG: Color = Color::Blue;
|
||||
@ -272,4 +274,4 @@ fn convert_syn_color_to_ratatui_color(
|
||||
color: syntect::highlighting::Color,
|
||||
) -> ratatui::style::Color {
|
||||
ratatui::style::Color::Rgb(color.r, color.g, color.b)
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
use crate::entry::Entry;
|
||||
use crate::utils::strings::{next_char_boundary, slice_at_char_boundaries};
|
||||
use ratatui::prelude::{Color, Line, Span, Style, Stylize};
|
||||
use ratatui::widgets::{Block, List, ListDirection};
|
||||
use std::str::FromStr;
|
||||
use crate::entry::Entry;
|
||||
use crate::utils::strings::{next_char_boundary, slice_at_char_boundaries};
|
||||
|
||||
// Styles
|
||||
const DEFAULT_RESULT_NAME_FG: Color = Color::Blue;
|
||||
@ -113,4 +113,4 @@ where
|
||||
.highlight_style(Style::default().bg(Color::Rgb(50, 50, 50)))
|
||||
.highlight_symbol("> ")
|
||||
.block(results_block)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user