system settings
git clone https://git.lucas.co/cce-system-interface.git
src/widgets.rs (627B)
1 use cce_ui::color;
2
3 pub struct SectionStyle {
4 pub label: String,
5 pub x: f32,
6 pub y: f32,
7 pub w: f32,
8 pub h: f32,
9 }
10
11 pub fn section_rects(_label: &str, x: f32, y: f32, w: f32, h: f32) -> Vec<([f32; 4], f32, f32, f32, f32)> {
12 let mut rects = Vec::new();
13 // Section background
14 rects.push((color::CONTENT_BG, x, y, w, h));
15 // Section border top
16 rects.push(([0.20, 0.33, 0.22, 1.0], x, y, w, 1.0));
17 rects
18 }
19
20 pub fn label_color() -> [f32; 4] {
21 color::TEXT_ACCENT
22 }
23
24 pub fn text_dim_color() -> [f32; 4] {
25 color::TEXT_DIM
26 }
27
28 pub fn text_fg_color() -> [f32; 4] {
29 color::TEXT_FG
30 }