Skip to content

Commit

Permalink
Update news, scroll bar always visible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Jul 24, 2024
1 parent 835c685 commit c375d3e
Show file tree
Hide file tree
Showing 5 changed files with 19,408 additions and 27,899 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/app/jerboa/spp/composable/mainMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ fun menu(
modifier = Modifier
.width(width75Percent.dp * 0.75f)
.verticalScroll(scroll)
.verticalScrollBar(scroll)
.verticalScrollBar(scroll, false)
) {
label(text = "Particles " + ceil(particleNumber * MAX_PARTICLES).toInt())
Slider(
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/app/jerboa/spp/composable/scrollBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ import androidx.compose.ui.unit.dp
@Composable
fun Modifier.verticalScrollBar(
scroll: ScrollState,
animated: Boolean,
color: Color = Color.White,
width: Dp = 8.dp,
fadeIn: Int = 100,
fadeOut: Int = 600
): Modifier {

val alpha by animateFloatAsState(
targetValue = if (scroll.isScrollInProgress) 1f else 0f,
targetValue = if (!animated) 1f else {if (scroll.isScrollInProgress) 1f else 0f},
animationSpec = tween(durationMillis = if (scroll.isScrollInProgress) fadeIn else fadeOut),
label = ""
)
Expand Down
Binary file modified app/src/main/res/drawable/news.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/news.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c375d3e

Please sign in to comment.