Replaces the binary 1.3× hover with a true gaussian bell curve — the hovered icon still peaks at ~1.35×, but the ±1 neighbours also bulge noticeably, ±2 a bit, and ±3+ relax to 1.0×. Footprint ~5 icons wide, matching the macOS Dock fisheye feel. Implementation in fn icon_scale_for(id): - Reads the hovered icon's and the current icon's bounds from self.rectangles (already populated by the existing RectangleTracker subscription — no new plumbing). - Distance = |this_center - hovered_center| along the panel's long axis (horizontal for Top/Bottom anchors, vertical for Left/Right). - sigma = hovered_extent * 1.4 so the bell's half-width matches one icon width (neighbors clearly pulled, far icons untouched). - scale = 1.0 + PEAK * exp(-(d/sigma)²) with PEAK = 0.35. - Falls back to binary 1.35×/1.0× when rectangle data isn't populated yet (first render / resize) — visibly responsive even before the tracker catches up. No widget signature changes vs v1, just a smarter formula. All five as_icon call sites already pass the result of icon_scale_for so this update propagates everywhere. Still on the TODO list: smooth animation (b). Right now icon→icon transitions snap instantly; a smoothed_hover_center + tick subscription would lerp it. Deferred to a follow-up commit. |
||
|---|---|---|
| .. | ||
| cosmic-app-list-config | ||
| data | ||
| i18n | ||
| src | ||
| Cargo.toml | ||
| i18n.toml | ||