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 error_text: Color,
26 pub warning_text: Color,
27 pub info_text: Color,
28 // Add other commonly used colors if needed
29 pub border_color: Color,
30 pub title_color: Color,
31}
32
33impl Default for CommonColors {
34 fn default() -> Self {
35 Self {
36 // Using standard Ratatui colors for defaults
37 default_text: Color::White,
38 highlight_text: Color::Yellow,
39 header_text: Color::White,
40 header_background: Color::Blue,
41 highlight_background: Color::DarkGray,
42 error_text: Color::Red,
43 warning_text: Color::Yellow,
44 info_text: Color::Cyan,
45 border_color: Color::Gray,
46 title_color: Color::White,
47 }
48 }
49}