The hour lines in week and day view become a per-hour grid, in the same visual language as the month grid: each hour is a rounded cell on `surfaceContainer`, separated by a 2dp gap that reveals `surface` behind it, so the boundary is negative space rather than a stroke drawn across the column. The column's Card takes `surface` and the container colour moves onto the cells. ### What changed - `HourLines.kt` → `HourGrid.kt`. `hourGridCells` draws 24 rounded rects in the same `drawBehind` the 23 lines used — still a background layer, so blocks keep their continuous coordinate space and keep spanning cells. - The cell corner is the event chip's 4dp rather than the month grid's 12dp: on a cell this size the 12dp out-rounds its own content. It is clamped to half the shorter side, so neither a fit-the-day sliver nor a narrow week column rounds into a lozenge. - The hour gutter's label lift is derived from the label's own line height instead of a hardcoded `-6.dp`, so the label straddles the seam at any font scale. This was the third defect the issue listed; the other two (a pixel-width stroke, and a "line" broken into seven segments by `COLUMN_GAP`) go away with the lines themselves. - The preference keeps its stored key and its string keys — only the English source text and the Kotlin names change (`showHourLines` → `showHourGrid`), as the issue asked. ### Deviation The issue expected block placement to be untouched. It isn't: a block gives up the same half-gap at each end that the cells do, otherwise an on-the-hour event overhangs the seam into its neighbours' cells and the grid reads as broken wherever there is an event. That inset follows through to the drag — the floating copy takes the same gap off so it stays exactly the size of the block it lifted off (or it has room for a time label the block had to drop, and the label appears on long-press and goes again on drop, #267), and the grab is measured off the block's placement rather than off where the grid seats it. An end cut at midnight keeps none of the inset and stays against the column edge, where `timedBlockCuts` already squares it off. ### Note for translators `settings_hour_lines` and its summary keep their keys but changed meaning, so the 12 `values-*` files still describe a separator line until Weblate re-syncs. Renaming the keys is not an option — stale keys in the translations are fatal. Closes #113 Supersedes #279, which was opened against `main` by mistake and has been undone there. Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/280
This commit is contained in:
@@ -431,8 +431,12 @@
|
||||
<string name="settings_time_format_24h">24-hour (14:00)</string>
|
||||
<!-- %1$s is a sample time written the way the system currently writes it. -->
|
||||
<string name="settings_time_format_auto_summary">Following the system: %1$s</string>
|
||||
<string name="settings_hour_lines">Hour lines</string>
|
||||
<string name="settings_hour_lines_summary">Show a separator line at each hour in week and day view</string>
|
||||
<!-- Reworded in v2.20 (#113): this setting no longer draws a separator line
|
||||
at each hour, it seats each hour in its own cell. The key is kept, so any
|
||||
translation of the old wording ("Hour lines" / "show a separator line at
|
||||
each hour") describes a feature that no longer exists and needs redoing. -->
|
||||
<string name="settings_hour_lines">Hour grid</string>
|
||||
<string name="settings_hour_lines_summary">Seat each hour in its own cell in week and day view</string>
|
||||
<string name="settings_timeline_scale">Hour height</string>
|
||||
<string name="settings_timeline_scale_hint">How much vertical space one hour takes in week and day view. Both views share this setting. You can also pinch the timeline with two fingers to set any height in between.</string>
|
||||
<string name="timeline_scale_fit_day">Fit whole day</string>
|
||||
|
||||
Reference in New Issue
Block a user