Skip to content

Commit d0389a2

Browse files
committed
Identicon issues fixed.
1 parent d833f99 commit d0389a2

File tree

16 files changed

+50
-47
lines changed

16 files changed

+50
-47
lines changed

.editorconfig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[*.{kt,kts}]
2-
ktlint_function_naming_ignore_when_annotated_with=Composable
3-
indent_size = 4
2+
ktlint_function_naming_ignore_when_annotated_with = Composable
3+
indent_size = 4
4+
5+
[/sceneview-android/**.*]
6+
ktlint_standard = disabled

sceneview-android

-4.56 MB
Binary file not shown.
-5.2 MB
Binary file not shown.

subvt/src/main/assets/material/cube.mtl

Lines changed: 0 additions & 12 deletions
This file was deleted.
-3.6 MB
Binary file not shown.

subvt/src/main/java/io/helikon/subvt/ui/modifier/ScrollHeader.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ fun Modifier.scrollHeader(
3636
color =
3737
Color
3838
.headerSectionBg(isDark)
39-
.copy(alpha = min(0.97f, scrolledRatio)),
39+
// is slightly transparent
40+
.copy(alpha = min(0.93f, scrolledRatio)),
4041
shape = clipShape,
4142
)
4243
.fillMaxWidth()

subvt/src/main/java/io/helikon/subvt/ui/screen/network/selection/NetworkSelectionScreen.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ private fun NetworkSelectionScreenContent(
119119
Modifier
120120
.size(dimensionResource(id = R.dimen.common_progress_size))
121121
.align(Alignment.Center),
122+
strokeWidth = dimensionResource(id = R.dimen.common_progress_stroke_width),
122123
color = Color.lightGray(),
123124
trackColor = Color.transparent(),
124125
)

subvt/src/main/java/io/helikon/subvt/ui/screen/network/status/NetworkStatusScreen.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ import androidx.compose.runtime.DisposableEffect
2121
import androidx.compose.runtime.getValue
2222
import androidx.compose.runtime.livedata.observeAsState
2323
import androidx.compose.runtime.mutableStateOf
24+
import androidx.compose.runtime.remember
2425
import androidx.compose.runtime.rememberCoroutineScope
2526
import androidx.compose.runtime.saveable.rememberSaveable
2627
import androidx.compose.runtime.setValue
2728
import androidx.compose.ui.Alignment
2829
import androidx.compose.ui.Modifier
2930
import androidx.compose.ui.draw.alpha
3031
import androidx.compose.ui.draw.clipToBounds
32+
import androidx.compose.ui.platform.LocalContext
3133
import androidx.compose.ui.platform.LocalLifecycleOwner
3234
import androidx.compose.ui.res.dimensionResource
3335
import androidx.compose.ui.res.stringResource
@@ -131,8 +133,18 @@ fun NetworkStatusScreenContent(
131133
}
132134
val scrollState = rememberScrollState()
133135
val scope = rememberCoroutineScope()
134-
val scrolledRatio = scrollState.value.toFloat() / scrollState.maxValue.toFloat() * 4.0f
135-
Box(modifier = modifier.clipToBounds().fillMaxSize()) {
136+
val context = LocalContext.current
137+
val headerFullAlphaScrollAmount =
138+
remember {
139+
context.resources.getDimension(R.dimen.common_header_full_alpha_scroll_amount)
140+
}
141+
val scrolledRatio = scrollState.value.toFloat() / headerFullAlphaScrollAmount
142+
Box(
143+
modifier =
144+
modifier
145+
.clipToBounds()
146+
.fillMaxSize(),
147+
) {
136148
if (networkSwitcherIsVisible) {
137149
NetworkSwitcherView(
138150
modifier =

subvt/src/main/java/io/helikon/subvt/ui/screen/network/status/view/BlockWaveView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fun BlockWaveView(
4141
LaunchedEffect(blockNumber) {
4242
progress.snapTo(0.0f)
4343
frequency = (Math.random() * 0.5 + 0.85).toFloat()
44-
speed = (Math.random() * 130 + 200).toInt()
44+
speed = -(Math.random() * 130 + 200).toInt()
4545
progress.animateTo(
4646
1.0f,
4747
animationSpec =
@@ -55,7 +55,7 @@ fun BlockWaveView(
5555
val height = progress.value + heightFluctuation
5656
val offset = (progress.value * speed).toInt()
5757
val amplitude =
58-
sin(Math.PI * height).toFloat() * 0.035f / (frequency * frequency / 1.2f)
58+
sin(Math.PI * height).toFloat() * 0.04f / (frequency * frequency / 1.2f)
5959
val points = mutableListOf<Float>()
6060
for (i in offset..(120 + offset)) {
6161
points.add(sin(Math.PI * 2 * frequency / 120 * i).toFloat() * amplitude + height)

0 commit comments

Comments
 (0)