aboutsummaryrefslogtreecommitdiff
path: root/src/tui/colors.rs
diff options
context:
space:
mode:
authorlukeflo2024-11-28 19:06:08 +0100
committerlukeflo2024-11-28 19:06:08 +0100
commitf55b0c221cf1d901b3bc2301b8a08b4cc71b40d8 (patch)
tree1b362436b92ce6bf1fc9e64aae98644b7bad3471 /src/tui/colors.rs
parentbb6f07dfb252eb74766051a750b9ae2696069bd5 (diff)
downloadbibiman-f55b0c221cf1d901b3bc2301b8a08b4cc71b40d8.tar.gz
bibiman-f55b0c221cf1d901b3bc2301b8a08b4cc71b40d8.zip
substitute style const for UI rendering
Diffstat (limited to 'src/tui/colors.rs')
-rw-r--r--src/tui/colors.rs22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/tui/colors.rs b/src/tui/colors.rs
index cbb0617..206ac92 100644
--- a/src/tui/colors.rs
+++ b/src/tui/colors.rs
@@ -17,11 +17,13 @@
#[derive(Debug, Clone)]
pub struct AppColors {
- main_text_color: u8,
- highlight_text_color: u8,
- entry_color: u8,
- keyword_color: u8,
- info_color: u8,
+ pub main_text_color: u8,
+ pub highlight_text_color: u8,
+ pub entry_color: u8,
+ pub keyword_color: u8,
+ pub info_color: u8,
+ pub confirm_color: u8,
+ pub warn_color: u8,
}
impl Default for AppColors {
@@ -32,6 +34,8 @@ impl Default for AppColors {
entry_color: 36,
keyword_color: 101,
info_color: 99,
+ confirm_color: 47,
+ warn_color: 124,
}
}
}
@@ -61,6 +65,14 @@ impl AppColors {
self.info_color = index
}
+ pub fn confirm_color(&mut self, index: u8) {
+ self.confirm_color = index
+ }
+
+ pub fn warn_color(&mut self, index: u8) {
+ self.warn_color = index
+ }
+
/// Activates the default color scheme for light background terminals
pub fn light_colors(&mut self) {
self.main_text_color(235);