ltk/widget/toggle/
theme.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: LGPL-2.1-only
// Copyright (C) 2026 Liberux Labs, S. L. <info@liberux.net>

use crate::types::Color;
pub fn track_off()    -> Color { crate::theme::palette().divider }
pub fn track_on()     -> Color { crate::theme::palette().accent }
/// Thumb — uses the page-background colour so it reads as the
/// inverse of the track fill regardless of mode.
pub fn thumb()        -> Color { crate::theme::palette().bg }
pub fn thumb_border() -> Color { crate::theme::palette().text_primary }
pub fn focus_color()  -> Color { crate::theme::palette().accent }
pub fn label_color()  -> Color { crate::theme::palette().text_primary }
pub const TRACK_W:        f32 = 52.0;
pub const TRACK_H:        f32 = 30.0;
pub const THUMB_SIZE:     f32 = 24.0;
pub const HEIGHT:         f32 = 48.0;
pub const GAP:            f32 = 12.0;
pub const FOCUS_W:        f32 = 3.0;
pub const THUMB_BORDER_W: f32 = 1.0;
pub const FONT_SIZE:      f32 = 16.0;