Files
Ely-GPUI-Components/src/theme/misc.rs
T
ZacharyZhang-NYandClaude Opus 5.5 6c589c3115 Misc · Terms and notices: licenses, consent and a cookie banner
misc::LicenseViewer lists what a product ships with each license beside
the chosen one's text. misc::ConsentDialog asks for a box before Accept
and answers each way out once, accept or decline. misc::CookieBanner
takes Accept all, Reject all, or a switch per kind through Choose, which
turns into Save choices on its focus. ChangeLog Viewer points to
data_display::Changelog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 03:36:03 -04:00

31 lines
786 B
Rust

use gpui::Rems;
use super::{Theme, tokens::px_to_rems};
/// The misc chapter's measures.
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MiscSizes {
/// A clock's face.
pub face: Rems,
/// A world clock row's face.
pub small_face: Rems,
/// A flashcard's least height.
pub card: Rems,
/// A license viewer's list, and the least width of the text beside it.
pub licenses: Rems,
/// How tall a license's text grows before it scrolls.
pub reading: Rems,
}
impl Theme {
pub fn misc(&self) -> MiscSizes {
MiscSizes {
face: px_to_rems(112.0),
small_face: px_to_rems(32.0),
card: px_to_rems(176.0),
licenses: px_to_rems(240.0),
reading: px_to_rems(320.0),
}
}
}