Show today's date in the toolbar today button (#282)
The jump-to-today action in the app bar drew `Icons.Default.Today`, a generic calendar glyph. It now draws the current day number inside an outlined rounded box, so the bar tells you what day it is as well as taking you there. Shared by all four calendar views, so it changes everywhere at once. - The box fills the same 24dp icon slot `AppBarSpacing` measures its trailing insets from (`IconSize` went from private to internal so the glyph and the spacing math cannot drift apart). No spacing value changed. - Outlined rather than the month grid's filled circle: that circle means "this cell is today", and a filled accent here would sit heavier than the stroke icons beside it. - The day comes from `rememberCurrentMinute()` through a `derivedStateOf`, so the button rolls over at midnight — and across a timezone change — while recomposing only when the number actually changes, not on every minute tick. - The content description is unchanged, still the sentence "Go to today". ### Also here A review of the branch turned up a loose end in #113, which this branch is merged on top of: the day and week **loading skeletons** still painted one solid `surfaceContainer` column. With the hour grid on that is no longer what a loaded column looks like — the column recedes to `surface` and the container colour moves onto the cells — so the skeleton flashed a solid block into a gapped grid on arrival, the exact resize its own comment promises not to do. Both skeletons now read `LocalShowHourGrid` and draw the same cells. ### Deviation from the issue The issue asked to watch the width at large font scales. Rather than measuring and adapting, the number is held at a fixed size — `12.dp` converted to sp at draw time, so it ignores the font scale. It is an icon glyph sharing a bar with stroke icons, a growing two-digit day is exactly the width pressure #165 measured, and screen readers get the meaning from the content description either way. A small number is also strictly more than the old icon said, never less. Closes #220 Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/282
This commit is contained in:
@@ -32,6 +32,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
three-letter form and the day view drops the weekday, rather than trailing off
|
||||
mid-word at large font sizes. The view switcher, the title and the agenda's
|
||||
range bar also line up with the grid underneath them ([#165]).
|
||||
- The jump-to-today button in the toolbar now shows today's date. It drew a
|
||||
generic calendar icon, which told you nothing you didn't already know from
|
||||
tapping it; it now carries the current day number in an outlined box, so the
|
||||
bar says what day it is as well as taking you there. It rolls over at midnight
|
||||
on its own ([#220]).
|
||||
|
||||
### Fixed
|
||||
- **A long location no longer runs off the edge of its field.** The location on
|
||||
@@ -1611,3 +1616,4 @@ automatically, with zero telemetry and no internet permission.
|
||||
[#253]: https://codeberg.org/jlmakiola/calendula/issues/253
|
||||
[#273]: https://codeberg.org/jlmakiola/calendula/issues/273
|
||||
[#113]: https://codeberg.org/jlmakiola/calendula/issues/113
|
||||
[#220]: https://codeberg.org/jlmakiola/calendula/issues/220
|
||||
|
||||
Reference in New Issue
Block a user