Commit 95f5d00
refactor: ImagePreviewPage (#1316)
* feat: img preview load err details print
* style: tap image to toggle top bar visibility
- toggle top/bottom bars via tap using detectTapGestures
- animate bars with fade + slide transitions
- replace magic bottom padding with navigationBars insets
- rename showTopBar → showBars for clearer semantics
- improve error retry tap handling
* refactor: img preview UI
- Box background: pure black
- Top bar with semi-transparent background, icons and text use white color on this page
- Pill-style page indicator
perf
Removed WindowInsets.navigationBars calculation at the bottom, centralized all UI control elements at the top to reduce visual clutter.
Used fontWeight = FontWeight.Bold to enhance number readability
* feat: add zoom, pan and double-tap support to image preview Implement pinch zoom and pan gestures for images in ImagePreviewPage. Add double-tap zoom centered on the tap position and clamp offsets to image bounds. When the image is zoomed in, HorizontalPager scrolling is temporarily disabled to avoid gesture conflicts. Pager scrolling is restored when scale returns to 1f. Also allow tapping the image to toggle the top bar visibility.
- Implement pinch zoom and pan gestures for images in ImagePreviewPage.
Add double-tap zoom centered on the tap position and clamp offsets
to image bounds.
- When the image is zoomed in, HorizontalPager scrolling is temporarily
disabled to avoid gesture conflicts. Pager scrolling is restored when
scale returns to 1f.
* refactor: Telephoto for enhanced zoom gestures
- deps: add me.saket.telephoto:zoomable (0.18.0) to version catalog and app module.
- refactor(ImagePreviewPage):
- Normalize single/multiple URI inputs into a unified `previewUris` list.
- Implement immersive system bar handling using WindowInsetsController (hide on enter, restore on dispose).
- Replace manual scale/offset logic with `Modifier.zoomable()` for smoother pinch-to-zoom and double-tap gestures.
- Retain `AsyncImagePainter.State` branching to maintain existing Loading/Error UI feedback.
- Integrate `ZoomableContentLocation` with `intrinsicSize` to ensure precise content boundary detection and pager gesture co-operation.
* fix: black background (not global)
* feat: show loading img preview info
* feat: preload all rule group preview images
* feat: view rules-name with h2
* perf: limit preview prefetch concurrency/merge rule titles
- 预加载改成最多 2 个并发,整组图片会分批预取,不再一次性全冲出去。
- 去掉了 `newBuilder().build()` 的临时 loader,图片显示和预取都改成走 `LocalContext.current.imageLoader`,阶段监听挂到 `ImageRequest` 上。
- 规则组图片标题改成 `uri -> List<title>` 聚合,同一张图被多个子规则复用时,副标题会合并展示,不再只保留第一个命中的归属。
- 清除preKeys标题生成的多余强转
* fix: improve status bar visibility handling, background color, contentScale
---------
Co-authored-by: 二刺螈 <i@songe.li>1 parent 6ca5853 commit 95f5d00
File tree
4 files changed
+443
-157
lines changed- app
- src/main/kotlin/li/songe/gkd/ui
- component
- gradle
4 files changed
+443
-157
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
0 commit comments