S017: new tab page elements: clock, shortcuts, Now playing and Weather cards, search pill, three cards on a grid
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
56036dea3e
commit
6eb090632d
1 changed files with 1157 additions and 298 deletions
|
|
@ -179,7 +179,7 @@ pills `FULL`, small egui widgets `S` (`theme::corner`).
|
|||
|
||||
**Type.** Outfit (OFL, `assets/fonts/Outfit[wght].ttf`, one variable font) at `theme::Weight` Thin 200, Light 300,
|
||||
Regular 400 (egui's Proportional), Medium 500, SemiBold 600; `theme::font(size, weight)`. Sizes `SMALL` 12, `BODY` 14,
|
||||
`TITLE` 18, `HEADLINE` 24, `DISPLAY` 64 (clock: Thin, primary). egui text styles: Small/Body/Button/Heading(24
|
||||
`TITLE` 18, `HEADLINE` 24, `DISPLAY` 64, `DISPLAY_LARGE` 96 (new tab clock: Thin, primary), `DISPLAY_SMALL` 40 (figures in cards). egui text styles: Small/Body/Button/Heading(24
|
||||
Medium)/Monospace 13. Outfit is Latin only: every family falls back to Material Symbols, then egui's Ubuntu-Light
|
||||
(Cyrillic, Greek). No CJK font is bundled.
|
||||
|
||||
|
|
@ -232,6 +232,21 @@ history, bookmarks, downloads, qr, apps, devtools, pip, screenshot, adblock, med
|
|||
per the toolbar setting). Status on buttons: badges (blocked count, running downloads), a progress ring round
|
||||
downloads, a coloured dot on the VPN, a slash through the shield when off. All icons are Material Symbols (D-009).
|
||||
|
||||
**New tab page** (S017, `src/ui/pages/newtab.rs`). A column of at most 920 pt (24 pt side margins) centred in the
|
||||
page card, and centred vertically when it fits (measured the frame before; a `DEFAULT` spring moves it when elements
|
||||
change). Elements come in `Settings::ntp.elements` order; `blocks()` groups card elements that follow each other into
|
||||
rows on a 3-column grid (2 below 720 pt, 1 below 480 pt), Now playing spanning two columns; a short row is centred.
|
||||
Rows: Now playing/Weather 224 pt (Now playing below 440 pt wide puts its artwork above, +136 pt), other cards 176 pt;
|
||||
cards are `surface_container`, radius `L`, title = 18 pt icon + Body Medium in `primary`. Clock: `DISPLAY_LARGE` 96
|
||||
(`DISPLAY` 64 under 560 pt) Thin `primary`, every digit in a cell as wide as the widest digit (no shifting), AM/PM
|
||||
Headline Regular on the digits' baseline; date `util::format_long_date`. Shortcuts: 56 pt circles in 88 pt cells,
|
||||
favicon of an open tab on that site else the first letter; dashed `outline` circle for Add; right-click opens/removes.
|
||||
Search pill 640×56, `surface_container_high`, `primary` ring while focused, 40 pt `primary` go button. Media art,
|
||||
visualizer ring (72 dots following the cookie's scallops, `outline` when still), seek bar, play button and titles
|
||||
are shared with the media flyout: `menus::media_art`, `seek_bar`, `play_button`, `media_title`. Weather:
|
||||
`newtab::Weather` (Open-Meteo current + daily, `Shared::weather` = `Option<Result<Weather, String>>`), fetched when
|
||||
shown and missing, older than 30 min, or for another place/unit (after the place stays unchanged for 1 s).
|
||||
|
||||
**Floating surfaces** (`src/ui/menus.rs`). `menus::floating(ctx, id, pos, pivot, open, |ui| ..)` draws a
|
||||
`menus::surface` (surface_container_high, radius `L`, popup shadow) that grows from its pivot corner (scale 0.9 to
|
||||
1, `DEFAULT`) and fades in (`EFFECT`); with `open` false it shrinks and fades without input, then returns None.
|
||||
|
|
|
|||
Loading…
Reference in a new issue