mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-15 01:13:53 +01:00
refactor(ui): better view & colors
This commit is contained in:
parent
777a460ec9
commit
4eca53fd85
3 changed files with 665 additions and 153 deletions
|
|
@ -15,6 +15,20 @@ pub fn get_color(color_name: &str) -> Box<&dyn color::Color> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Holds color-related data, for clarity.
|
||||
///
|
||||
/// - `focus_*` colors are used to render the currently focused matched text.
|
||||
/// - `normal_*` colors are used to render other matched text.
|
||||
/// - `hint_*` colors are used to render the hints.
|
||||
pub struct RenderingColors<'a> {
|
||||
pub focus_fg_color: Box<&'a dyn color::Color>,
|
||||
pub focus_bg_color: Box<&'a dyn color::Color>,
|
||||
pub normal_fg_color: Box<&'a dyn color::Color>,
|
||||
pub normal_bg_color: Box<&'a dyn color::Color>,
|
||||
pub hint_fg_color: Box<&'a dyn color::Color>,
|
||||
pub hint_bg_color: Box<&'a dyn color::Color>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue