ltk/widget/tooltip/theme.rs
// SPDX-License-Identifier: LGPL-2.1-only
// Copyright (C) 2026 Liberux Labs, S. L. <info@liberux.net>
use crate::types::Color;
/// Tooltip background — uses the theme's primary text colour as
/// a high-contrast hint pill (dark in light mode, light in dark
/// mode). Tooltips traditionally invert against the surface to
/// stand out.
pub fn bg() -> Color
{
let p = crate::theme::palette().text_primary;
Color::rgba( p.r, p.g, p.b, 0.95 )
}
/// Tooltip text — `bg-page` so the lettering reads as the
/// inverse of the bg.
pub fn text() -> Color { crate::theme::palette().bg }
pub const PAD_H: f32 = 12.0;
pub const PAD_V: f32 = 6.0;
pub const FONT_SIZE: f32 = 13.0;
pub const RADIUS: f32 = 8.0;
pub const MAX_W: u32 = 320;
pub const HEIGHT: u32 = 28;