File tree Expand file tree Collapse file tree
app/src/main/java/to/bitkit/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,10 +23,16 @@ import to.bitkit.ui.theme.Colors
2323 * HwWalletComponents - Reusable components and utilities for the Hardware Wallet UI.
2424 * */
2525
26- // Illustration proportions, taken from the Figma hardware wallet frames ( 256-wide Visual in a 375 frame).
26+ /* * Illustration width as a fraction of the sheet width — the 256-wide Visual in the 375-wide Figma frame. */
2727internal const val HW_ILLUSTRATION_SIZE_RATIO = 256f / 375f
28+
29+ /* * Trezor illustration left bleed past the frame, as a fraction of the sheet width (Figma device frames). */
2830private const val HW_DEVICE_TREZOR_BLEED_RATIO = 84f / 375f
31+
32+ /* * Ledger illustration right bleed past the frame, as a fraction of the sheet width (Figma device frames). */
2933private const val HW_DEVICE_LEDGER_BLEED_RATIO = 53f / 375f
34+
35+ /* * Vertical stagger between the two device illustrations, as a fraction of the sheet width. */
3036private const val HW_DEVICE_STAGGER_RATIO = 12f / 375f
3137
3238@Composable
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import to.bitkit.ui.shared.modifiers.sheetHeight
3737import to.bitkit.ui.utils.composableWithDefaultTransitions
3838import to.bitkit.viewmodels.AppViewModel
3939
40+ /* * Runtime nearby-devices permissions needed to BLE-scan: SCAN + CONNECT on Android 12+, else fine location. */
4041private val bluetoothPermissions: List <String >
4142 get() = if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ) {
4243 listOf (
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ class HwConnectViewModel @Inject constructor(
3232 private val hwWalletRepo : HwWalletRepo ,
3333) : ViewModel() {
3434 companion object {
35+ /* * Delay between scan attempts while searching for a nearby device. */
3536 private val SCAN_INTERVAL = 2 .seconds
3637 }
3738
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ import to.bitkit.ui.theme.AppThemeSurface
3737import to.bitkit.ui.theme.Colors
3838import to.bitkit.ui.utils.withAccent
3939
40- // Width reuses the shared 256-wide Figma Visual ratio; aspect is the coin_stack_3 asset's intrinsic 756x926.
40+ /* * Width reuses the shared 256-wide Figma Visual ratio; aspect is the coin_stack_3 asset's intrinsic 756x926. */
4141private const val COINS_ASPECT_RATIO = 756f / 926f
4242
4343@Composable
Original file line number Diff line number Diff line change @@ -37,16 +37,19 @@ import to.bitkit.ui.theme.AppThemeSurface
3737import to.bitkit.ui.theme.Colors
3838import to.bitkit.ui.utils.withAccent
3939
40+ /* * Diameter of the loading visual (outer dashed ring). */
4041private val ANIMATION_SIZE = 280 .dp
4142
42- // Relative sizes from the Figma "Loading Animation" HW frame ( 311 outer ring): arrows 256, inner ring 207.
43+ /* * Arrows width as a fraction of the loader — 256 in the 311-wide Figma "Loading Animation" HW ring. */
4344private const val ARROWS_SIZE_RATIO = 256f / 311f
45+
46+ /* * Inner dashed-ring width as a fraction of the loader — 207 in the 311-wide Figma HW ring. */
4447private const val INNER_RING_SIZE_RATIO = 207f / 311f
4548
46- // Figma "Loading Animation" HW variants Smart-Animate linearly through their keyframes:
47- // the arrows rotate 90° per 1s step (a counter-clockwise turn every 4s) while the two dashed
48- // rings counter-rotate ~180° per 1s step (a turn every ~2s).
49+ /* * Arrows rotation period: the Figma HW variants step 90° per 1s, a counter-clockwise turn every 4s. */
4950private const val ARROWS_SPIN_MS = 4000
51+
52+ /* * Dashed-ring rotation period: the two rings counter-rotate ~180° per 1s, a turn every ~2s. */
5053private const val RING_SPIN_MS = 2000
5154
5255@Composable
You can’t perform that action at this time.
0 commit comments