Skip to content

Commit

Permalink
Add scrolling to changelog screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Dec 23, 2024
1 parent 77b95ae commit 669a269
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.OpenInNew
import androidx.compose.material3.Icon
Expand All @@ -28,11 +30,13 @@ import net.mullvad.mullvadvpn.compose.button.PrimaryButton
import net.mullvad.mullvadvpn.compose.component.NavigateBackIconButton
import net.mullvad.mullvadvpn.compose.component.NavigateCloseIconButton
import net.mullvad.mullvadvpn.compose.component.ScaffoldWithMediumTopBar
import net.mullvad.mullvadvpn.compose.component.drawVerticalScrollbar
import net.mullvad.mullvadvpn.compose.extensions.createOpenFullChangeLogHook
import net.mullvad.mullvadvpn.compose.transitions.SlideInFromRightTransition
import net.mullvad.mullvadvpn.compose.util.CollectSideEffectWithLifecycle
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.color.AlphaScrollbar
import net.mullvad.mullvadvpn.viewmodel.ChangeLogSideEffect
import net.mullvad.mullvadvpn.viewmodel.ChangelogUiState
import net.mullvad.mullvadvpn.viewmodel.ChangelogViewModel
Expand Down Expand Up @@ -83,8 +87,16 @@ fun ChangelogScreen(
},
) { modifier ->
Column(modifier = modifier.padding(horizontal = Dimens.mediumPadding)) {
val scrollState = rememberScrollState()
Column(
Modifier.weight(1f),
Modifier.weight(1f)
.fillMaxWidth()
.drawVerticalScrollbar(
scrollState,
MaterialTheme.colorScheme.onSurface.copy(alpha = AlphaScrollbar)
)
.verticalScroll(scrollState)
,
verticalArrangement = Arrangement.spacedBy(Dimens.mediumPadding),
) {
Text(
Expand Down

0 comments on commit 669a269

Please sign in to comment.