sqlly_datatable/grid/
theme.rs1use gpui::Hsla;
6
7#[derive(Clone, Debug)]
8pub struct GridTheme {
9 pub bg: Hsla,
10 pub header_bg: Hsla,
11 pub filter_bg: Hsla,
12 pub filter_active_bg: Hsla,
13 pub row_header_bg: Hsla,
14 pub selection_bg: Hsla,
15 pub alt_row_bg: Hsla,
16 pub grid_line: Hsla,
17 pub header_fg: Hsla,
18 pub text_fg: Hsla,
19 pub negative_fg: Hsla,
20 pub sort_indicator: Hsla,
21 pub filter_cursor: Hsla,
22}
23
24impl Default for GridTheme {
25 fn default() -> Self {
26 Self {
27 bg: hsla(0.0, 0.0, 1.0, 1.0),
28 header_bg: hsla(0.0, 0.0, 0.93, 1.0),
29 filter_bg: hsla(0.0, 0.0, 0.96, 1.0),
30 filter_active_bg: hsla(0.58, 0.30, 0.85, 1.0),
31 row_header_bg: hsla(0.0, 0.0, 0.90, 1.0),
32 selection_bg: hsla(0.58, 0.50, 0.80, 0.50),
33 alt_row_bg: hsla(0.0, 0.0, 0.95, 1.0),
34 grid_line: hsla(0.0, 0.0, 0.85, 1.0),
35 header_fg: hsla(0.0, 0.0, 0.15, 1.0),
36 text_fg: hsla(0.0, 0.0, 0.1, 1.0),
37 negative_fg: hsla(0.0, 0.75, 0.45, 1.0),
38 sort_indicator: hsla(0.58, 0.50, 0.40, 1.0),
39 filter_cursor: hsla(0.0, 0.0, 0.1, 1.0),
40 }
41 }
42}
43
44fn hsla(h: f32, s: f32, l: f32, a: f32) -> Hsla {
45 Hsla { h, s, l, a }
46}