Skip to content

Commit

Permalink
Merge branch 'information-dialogs-not-scrollable-droid-302'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Oct 24, 2023
2 parents fa72d73 + ece9057 commit 089c55e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
Expand All @@ -20,9 +22,11 @@ import androidx.compose.ui.window.DialogProperties
import androidx.core.text.HtmlCompat
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.button.PrimaryButton
import net.mullvad.mullvadvpn.compose.component.drawVerticalScrollbar
import net.mullvad.mullvadvpn.compose.extensions.toAnnotatedString
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.color.AlphaScrollbar

@Preview
@Composable
Expand Down Expand Up @@ -50,7 +54,13 @@ fun InfoDialog(message: String, additionalInfo: String? = null, onDismiss: () ->
)
},
text = {
val scrollState = rememberScrollState()
Column(
Modifier.drawVerticalScrollbar(
scrollState,
MaterialTheme.colorScheme.onPrimary.copy(alpha = AlphaScrollbar)
)
.verticalScroll(scrollState),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
Expand Down

0 comments on commit 089c55e

Please sign in to comment.