1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Sizing, color, and styling constants for the picker.
/// Brightness and alpha sliders track height
pub const SLIDER_HEIGHT: f32 = 16.0;
/// Cursor circle radius for color wheel gradient picker
pub const CURSOR_RADIUS: f64 = 8.0;
/// Thumb radius on 1D sliders
pub const THUMB_RADIUS: f64 = 7.0;
/// Border radius for slider tracks
pub const RADIUS: f32 = 4.0;
/// Gap between picker elements
pub const GAP: f32 = 8.0;
/// Padding around the whole picker
pub const PADDING: f32 = 8.0;
/// Input field width
pub const INPUT_WIDTH: f32 = 28.0;
/// Hex input field width
pub const HEX_INPUT_WIDTH: f32 = 64.0;
/// Input font size
pub const INPUT_FONT: f32 = 11.0;
/// Label font size
pub const LABEL_FONT: f32 = 10.0;
/// Fixed raster size (in pixels) for the color wheel and slider gradients.
/// Rasterized once and scaled by the renderer, avoiding new texture-atlas
/// entries on every resize (which exhausts vger's fixed-size atlas).
pub const WHEEL_RASTER_SIZE: u32 = 1024;
/// Fixed raster width for slider gradients.
pub const SLIDER_RASTER_WIDTH: u32 = 256;
/// Fixed raster height for slider gradients.
pub const SLIDER_RASTER_HEIGHT: u32 = 32;
/// Checkerboard cell size (for alpha backgrounds)
pub const CHECKER_CELL: f64 = 5.0;