mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
The Photos grid laid every photo out as a centre-cropped square. That is why portraits showed black bars and why a panorama was unrecognisable at tile size: the tile's shape had nothing to do with the photo's. Rows are now justified. Photos are taken in capture order until they no longer fit the target height, and the row is then scaled to land exactly on the right margin, so each tile is its own photo's shape and nothing is cropped or letterboxed. The last row of a day stays at the target height rather than being stretched — a day holding two photos should look like a short day, not like a layout bug. Ratios come from the daemon where it has one; where it has not, the tile is laid out square and the day re-flows once a decoded thumbnail proves the real shape, on the existing debounce so a screenful of decodes costs one re-flow. Extreme ratios are clamped, so one strip of film cannot decide what a row looks like. Ctrl+scroll and Ctrl+± now move the target row height, and the grid is tighter to match: 2 px gaps, smaller heading margins, a 6 px radius and no card behind each tile, so the page reads as photographs rather than as a deck of cards. Thumbnails also stopped disappearing on scroll. The texture cache was evicting in insertion order — which is precisely what a scroll back up asks for again — so it is now least-recently-used and holds 1500 rather than 600, which at the new density is several screens instead of under two. A batch tops itself up with the photos just past the rows on screen, in the direction of travel, and once the queue is short the near-miss tiles are fetched rather than dropped.