crashdump_viewer_lib/config.rs
1// Copyright (c) Meta Platforms, Inc. and affiliates.
2
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6
7// http://www.apache.org/licenses/LICENSE-2.0
8
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use ratatui::style::Color;
16
17// Kept as CommonColors to match app.rs for now.
18#[derive(Clone, Debug)] // Added Debug
19pub struct CommonColors {
20 pub default_text: Color,
21 pub highlight_text: Color, // e.g., for selected items text
22 pub header_text: Color,
23 pub header_background: Color,
24 pub highlight_background: Color, // e.g., for selected items background
25 pub info_preamble: Color,
26 pub info_text: Color,
27
28 pub border_color: Color,
29 pub title_color: Color,
30
31 pub alt_color_1: Color,
32 pub alt_color_2: Color,
33 pub alt_color_3: Color,
34 pub background_color: Color
35}
36
37impl Default for CommonColors {
38 fn default() -> Self {
39 Self {
40 // Using standard Ratatui colors for defaults
41 default_text: Color::White,
42 highlight_text: Color::Yellow,
43 header_text: Color::White,
44 header_background: Color::Blue,
45 highlight_background: Color::DarkGray,
46 info_preamble: Color::Yellow,
47 info_text: Color::White,
48 border_color: Color::Gray,
49 title_color: Color::White,
50 alt_color_1: Color::Blue,
51 alt_color_2: Color::Magenta,
52 alt_color_3: Color::Red,
53 background_color: Color::Black,
54 }
55 }
56}