All outline text draws with Slug curves on every platform (SDF/MSDF stays selectable per size); a frame never presents a blank glyph and retained draw lists keep theirs. One coverage model for vector feathering, widget families split out of the core crate, fewer steady-state allocations, video keeps its aspect (Contain/Cover), render and SSAO pass unification. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
234 lines
9.9 KiB
Text
234 lines
9.9 KiB
Text
mod.theme = mod.themes.light
|
|
|
|
// A segment display on a pale glass.
|
|
// The window is one reflective liquid-crystal sheet, grey-green, with near
|
|
// black ink floating over its reflector: the face of a digital wristwatch
|
|
// and the screen of a handheld game console with a dot-matrix screen. Four
|
|
// shades and no more on the glass; everything drawn on it is flat ink,
|
|
// unlit segments always faintly there as ghosts. The depth lives in the
|
|
// dark frames the glass windows are set in.
|
|
// Every state of a family is spelled out, because the base derived its
|
|
// states once, from its own colours.
|
|
//
|
|
// The ladder: ink #292b20, dark middle #565a46, light middle #7a8065,
|
|
// ghost #8d937b (page x 0.90), the page #9ca388, glass #a2a98e, a
|
|
// window's glass #aeb59a, lit glass #b6bda2; the bezel of a window #1c1d21.
|
|
use mod.res.*
|
|
use mod.text.*
|
|
|
|
mod.theme.color_bg_app = #9ca388
|
|
mod.theme.color_fg_app = #a8af94
|
|
mod.theme.color_bg_container = #a8af94
|
|
mod.theme.color_surface_container_lowest = #9ca388
|
|
mod.theme.color_bg_even = #9ca388
|
|
mod.theme.color_bg_odd = #989f84
|
|
|
|
// The surface ladder, every rung a shade of the same glass so the ink
|
|
// reads on all of them.
|
|
mod.theme.color_surface = #a2a98e
|
|
mod.theme.color_surface_container = #a8af94
|
|
mod.theme.color_surface_container_low = #a5ac91
|
|
mod.theme.color_surface_container_high = #adb499
|
|
mod.theme.color_surface_container_highest = #b1b89d
|
|
mod.theme.color_surface_dim = #9aa186
|
|
mod.theme.color_surface_bright = #b6bda2
|
|
mod.theme.color_on_surface = #292b20
|
|
mod.theme.color_on_surface_variant = #45493a
|
|
mod.theme.color_outline = #292b20
|
|
mod.theme.color_outline_variant = #6c725c
|
|
// The opposite page (a tooltip, a snackbar) is an inverted cell.
|
|
mod.theme.color_inverse_surface = #292b20
|
|
mod.theme.color_inverse_on_surface = #b6bda2
|
|
|
|
// Screens. A readout, a meter or a screen view sits on the glass of a
|
|
// window, never in a pale one: its face is a window's glass, its ink the
|
|
// ink, and an unlit segment the faint ghost every segment leaves.
|
|
mod.theme.color_screen = #aeb59a
|
|
mod.theme.color_screen_ink = #292b20
|
|
mod.theme.screen_ghost = 0.12
|
|
|
|
// Raised faces the sheet does not draw itself: lit glass.
|
|
mod.theme.color_outset = #aeb59a
|
|
mod.theme.color_outset_1 = #b3ba9f
|
|
mod.theme.color_outset_2 = #a8af94
|
|
mod.theme.color_outset_hover = #b6bda2
|
|
mod.theme.color_outset_1_hover = #bac1a6
|
|
mod.theme.color_outset_2_hover = #b1b89d
|
|
mod.theme.color_outset_down = #92987f
|
|
mod.theme.color_outset_1_down = #92987f
|
|
mod.theme.color_outset_2_down = #92987f
|
|
mod.theme.color_outset_focus = #aeb59a
|
|
mod.theme.color_outset_1_focus = #b3ba9f
|
|
mod.theme.color_outset_2_focus = #a8af94
|
|
mod.theme.color_outset_active = #aeb59a
|
|
mod.theme.color_outset_1_active = #b3ba9f
|
|
mod.theme.color_outset_2_active = #a8af94
|
|
mod.theme.color_outset_disabled = #a2a98e
|
|
mod.theme.color_outset_1_disabled = #a2a98e
|
|
mod.theme.color_outset_2_disabled = #a2a98e
|
|
|
|
// Wells: glass a shade under the ground.
|
|
mod.theme.color_inset = #9ca388
|
|
mod.theme.color_inset_1 = #9ca388
|
|
mod.theme.color_inset_2 = #9ca388
|
|
mod.theme.color_inset_hover = #a0a78c
|
|
mod.theme.color_inset_1_hover = #a0a78c
|
|
mod.theme.color_inset_2_hover = #a0a78c
|
|
mod.theme.color_inset_focus = #a0a78c
|
|
mod.theme.color_inset_1_focus = #a0a78c
|
|
mod.theme.color_inset_2_focus = #a0a78c
|
|
mod.theme.color_inset_active = #9ca388
|
|
mod.theme.color_inset_1_active = #9ca388
|
|
mod.theme.color_inset_2_active = #9ca388
|
|
mod.theme.color_inset_down = #98a084
|
|
mod.theme.color_inset_1_down = #98a084
|
|
mod.theme.color_inset_2_down = #98a084
|
|
mod.theme.color_inset_drag = #98a084
|
|
mod.theme.color_inset_1_drag = #98a084
|
|
mod.theme.color_inset_2_drag = #98a084
|
|
mod.theme.color_inset_empty = #9ca388
|
|
mod.theme.color_inset_1_empty = #9ca388
|
|
mod.theme.color_inset_2_empty = #9ca388
|
|
mod.theme.color_inset_disabled = #a2a98e
|
|
mod.theme.color_inset_1_disabled = #a2a98e
|
|
mod.theme.color_inset_2_disabled = #a2a98e
|
|
|
|
// Every edge on the glass is ink; a disabled one drops to the ghost.
|
|
mod.theme.color_bevel = #292b20
|
|
mod.theme.color_bevel_hover = #292b20
|
|
mod.theme.color_bevel_focus = #292b20
|
|
mod.theme.color_bevel_down = #292b20
|
|
mod.theme.color_bevel_active = #292b20
|
|
mod.theme.color_bevel_empty = #292b20
|
|
mod.theme.color_bevel_drag = #292b20
|
|
mod.theme.color_bevel_disabled = #7d846b
|
|
mod.theme.color_bevel_inset_1 = #292b20
|
|
mod.theme.color_bevel_inset_2 = #292b20
|
|
mod.theme.color_bevel_outset_1 = #292b20
|
|
mod.theme.color_bevel_outset_2 = #292b20
|
|
mod.theme.beveling = 0.34
|
|
|
|
// Inks. Text on the glass is the ink; a disabled word sinks toward the
|
|
// light middle; letters on an inverted cell are drawn by the faces.
|
|
mod.theme.color_text = #292b20
|
|
mod.theme.color_text_hover = #292b20
|
|
mod.theme.color_text_focus = #292b20
|
|
mod.theme.color_text_active = #292b20
|
|
mod.theme.color_text_down = #292b20
|
|
mod.theme.color_text_disabled = #6c725c
|
|
mod.theme.color_text_placeholder = #5d624d
|
|
mod.theme.color_text_placeholder_hover = #535843
|
|
mod.theme.color_text_val = #292b20
|
|
mod.theme.color_text_meta = #45493a
|
|
mod.theme.color_text_on_accent = #f2f4ea
|
|
mod.theme.color_label = #292b20
|
|
mod.theme.color_label_hover = #292b20
|
|
mod.theme.color_label_focus = #292b20
|
|
mod.theme.color_label_active = #292b20
|
|
mod.theme.color_label_down = #292b20
|
|
mod.theme.color_label_disabled = #6c725c
|
|
mod.theme.color_label_inner = #292b20
|
|
mod.theme.color_label_inner_hover = #292b20
|
|
mod.theme.color_label_inner_focus = #292b20
|
|
mod.theme.color_label_inner_active = #292b20
|
|
mod.theme.color_label_inner_down = #292b20
|
|
mod.theme.color_label_inner_disabled = #6c725c
|
|
mod.theme.color_label_outer = #292b20
|
|
mod.theme.color_label_outer_hover = #292b20
|
|
mod.theme.color_label_outer_focus = #292b20
|
|
mod.theme.color_label_outer_active = #292b20
|
|
mod.theme.color_label_outer_down = #292b20
|
|
mod.theme.color_label_outer_disabled = #6c725c
|
|
mod.theme.color_icon = #292b20
|
|
mod.theme.color_icon_hover = #292b20
|
|
mod.theme.color_icon_focus = #292b20
|
|
mod.theme.color_icon_active = #292b20
|
|
mod.theme.color_icon_down = #292b20
|
|
mod.theme.color_icon_disabled = #6c725c
|
|
|
|
// Marks, values and handles are segments: the ink.
|
|
mod.theme.color_mark = #292b20
|
|
mod.theme.color_mark_active = #292b20
|
|
mod.theme.color_mark_active_hover = #292b20
|
|
mod.theme.color_mark_hover = #292b20
|
|
mod.theme.color_mark_focus = #292b20
|
|
mod.theme.color_mark_down = #292b20
|
|
mod.theme.color_mark_disabled = #7d846b
|
|
mod.theme.color_val = #292b20
|
|
mod.theme.color_val_hover = #292b20
|
|
mod.theme.color_val_focus = #292b20
|
|
mod.theme.color_val_drag = #292b20
|
|
mod.theme.color_val_disabled = #7d846b
|
|
mod.theme.color_handle = #292b20
|
|
mod.theme.color_handle_hover = #292b20
|
|
mod.theme.color_handle_focus = #292b20
|
|
mod.theme.color_handle_drag = #292b20
|
|
mod.theme.color_handle_disabled = #7d846b
|
|
|
|
// Selection darkens the glass the way a driven cell does; the caret is an
|
|
// ink block.
|
|
mod.theme.color_selection_focus = #292b2059
|
|
mod.theme.color_bg_highlight = #292b2033
|
|
mod.theme.color_bg_highlight_inline = #292b2040
|
|
mod.theme.color_cursor = #292b20
|
|
mod.theme.color_text_cursor = #292b20
|
|
|
|
// The accent seed: the primary, secondary and tertiary families are grown
|
|
// from `color_ctrl_selected`. A deep printed blue, the one colour such
|
|
// panels carry besides the red day marker; the faces themselves draw in
|
|
// ink, and red only where it means a warning.
|
|
mod.theme.color_ctrl_selected = #245a8d
|
|
mod.theme.color_focus = #292b20
|
|
mod.theme.color_ctrl_active = #292b20
|
|
|
|
mod.theme.color_terminal_bg = #292b20
|
|
mod.theme.color_terminal_text = #b6bda2
|
|
|
|
// Slim metrics: rows of 24 points, gaps of 6 inside a group and 8 between.
|
|
mod.theme.space_factor = 6.0
|
|
mod.theme.space_1 = 3.0
|
|
mod.theme.space_2 = 6.0
|
|
mod.theme.space_3 = 8.0
|
|
mod.theme.space_4 = 12.0
|
|
mod.theme.space_5 = 16.0
|
|
mod.theme.space_6 = 24.0
|
|
mod.theme.mspace_1 = mod.turtle.Inset{top: 3.0 right: 3.0 bottom: 3.0 left: 3.0}
|
|
mod.theme.mspace_h_1 = mod.turtle.Inset{top: 0.0 right: 3.0 bottom: 0.0 left: 3.0}
|
|
mod.theme.mspace_v_1 = mod.turtle.Inset{top: 3.0 right: 0.0 bottom: 3.0 left: 0.0}
|
|
mod.theme.mspace_2 = mod.turtle.Inset{top: 6.0 right: 6.0 bottom: 6.0 left: 6.0}
|
|
mod.theme.mspace_h_2 = mod.turtle.Inset{top: 0.0 right: 6.0 bottom: 0.0 left: 6.0}
|
|
mod.theme.mspace_v_2 = mod.turtle.Inset{top: 6.0 right: 0.0 bottom: 6.0 left: 0.0}
|
|
mod.theme.mspace_3 = mod.turtle.Inset{top: 8.0 right: 8.0 bottom: 8.0 left: 8.0}
|
|
mod.theme.mspace_h_3 = mod.turtle.Inset{top: 0.0 right: 8.0 bottom: 0.0 left: 8.0}
|
|
mod.theme.mspace_v_3 = mod.turtle.Inset{top: 8.0 right: 0.0 bottom: 8.0 left: 0.0}
|
|
// The rungs the base froze at its own space factor, restated at ours.
|
|
mod.theme.size_control_s = 20.0
|
|
mod.theme.size_control_m = 24.0
|
|
mod.theme.size_control_l = 28.0
|
|
mod.theme.tab_height = 22.0
|
|
// Glass corners 1.5, cells 1, windows 3 inside a frame of 5, 6 at most.
|
|
mod.theme.corner_radius = 1.5
|
|
mod.theme.container_corner_radius = 3.0
|
|
mod.theme.textselection_corner_radius = 0.0
|
|
mod.theme.radius_xs = 0.5
|
|
mod.theme.radius_s = 1.5
|
|
mod.theme.radius_m = 3.0
|
|
mod.theme.radius_l = 6.0
|
|
|
|
// A grotesque, semibold for the words on keys and cells, regular for what
|
|
// is typed. A font size draws 1.333 layout points per unit, so 7.75 is the
|
|
// brief's 10 point label: a cap of 7.5 points, 0.31 of a 24 point row.
|
|
mod.theme.font_size_p = 7.75
|
|
mod.theme.type_title_l_size = 11.25
|
|
mod.theme.type_title_m_size = 9.75
|
|
mod.theme.type_title_s_size = 8.5
|
|
mod.theme.type_body_l_size = 8.5
|
|
mod.theme.type_body_m_size = 7.75
|
|
mod.theme.type_body_s_size = 7.0
|
|
mod.theme.type_label_l_size = 7.75
|
|
mod.theme.type_label_m_size = 7.0
|
|
mod.theme.type_label_s_size = 6.5
|
|
mod.theme.font_regular = mod.theme.font_regular{font_size: 7.75 font_family: mod.theme.font_regular.font_family{ibm_plex_text := FontMember{res: crate_resource("makepad_widgets:resources/jetbrains_mono_variable.ttf") weight: 500.0 asc: 0.0 desc: 0.0}}}
|
|
mod.theme.font_label = mod.theme.font_label{font_size: 7.75 font_family: mod.theme.font_label.font_family{ibm_plex_text := FontMember{res: crate_resource("makepad_widgets:resources/jetbrains_mono_variable.ttf") weight: 600.0 asc: 0.0 desc: 0.0}}}
|
|
mod.theme.font_bold = mod.theme.font_bold{font_size: 7.75 font_family: mod.theme.font_bold.font_family{ibm_plex_semibold := FontMember{res: crate_resource("makepad_widgets:resources/jetbrains_mono_variable.ttf") weight: 700.0 asc: 0.0 desc: 0.0}}}
|
|
true
|