Commit d08de58
committed
fix: improve scrollbar container layout and scrolling logic
- Wrap content in a `Box` using the provided modifier when the scrollbar is disabled to ensure consistent layout constraints.
- Refine scroll position calculation by using `maxScrollOffset` and coercing the scroll fraction between 0 and 1.
- Update grid scroll logic to calculate `targetIndex` based on `totalItemsCount - 1` to prevent index out-of-bounds and improve accuracy.
- Add validation to skip scroll updates if the maximum offset is non-positive.1 parent 00e5fa6 commit d08de58
1 file changed
Lines changed: 12 additions & 5 deletions
File tree
- core/presentation/src/jvmMain/kotlin/zed/rainxch/core/presentation/components
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
105 | | - | |
106 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | | - | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
0 commit comments