Files
Ely-GPUI-Components/src/theme/calendar.rs
T
ZacharyZhang-NY 48ff348357 Calendar · Agenda and people: an agenda, an event's details, its guests
AgendaView lists the days ahead under their names, whole days first,
then by the hour, and leaves out days with nothing; it rides on
lists::Sections, so a press or an arrow selects and Enter opens. An
empty stretch says nothing is planned.

EventPopover is an event's chip that opens its details: its title in
its hue, when and where, who is asked, and Edit and Delete when the
owner handles them. It opens through Popover::with_opener, which now
hands any element the toggle and keeps focus, placement and every way
out in the popover. AttendeeList counts the answers and lists each
guest with their answer, the organizer first. A hue worn in a row is
now data_display::color_mark, for mail labels and events alike.
2026-09-27 03:35:59 -04:00

34 lines
875 B
Rust

use gpui::Rems;
use super::{Theme, tokens::px_to_rems};
/// Calendar's measures.
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CalendarSizes {
/// An event's chip in a day, tall.
pub chip: Rems,
/// Rows of events a month's day holds under its number.
pub day_rows: usize,
/// A day in a year's small months, square.
pub mini_day: Rems,
/// An hour in a time grid, tall.
pub hour: Rems,
/// A time grid's column of hours, wide.
pub gutter: Rems,
/// An event's details in a panel, wide.
pub card: Rems,
}
impl Theme {
pub fn calendar(&self) -> CalendarSizes {
CalendarSizes {
chip: px_to_rems(20.0),
day_rows: 3,
mini_day: px_to_rems(28.0),
hour: px_to_rems(48.0),
gutter: px_to_rems(56.0),
card: px_to_rems(320.0),
}
}
}