diff options
| author | David Göransson <david.goransson@mullvad.net> | 2024-04-16 11:29:17 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2024-04-16 14:05:38 +0200 |
| commit | 9b9a6a16cd382516b9af84f3626ad968d014baf8 (patch) | |
| tree | 0432527ed5c5d9f02cbda7f66c3e8144d08d7f2c /android | |
| parent | 486fd323066c8eaebdc9a023b70a69a88acc8f11 (diff) | |
| download | mullvadvpn-9b9a6a16cd382516b9af84f3626ad968d014baf8.tar.xz mullvadvpn-9b9a6a16cd382516b9af84f3626ad968d014baf8.zip | |
Fix overflow & max lines for custom list name
Diffstat (limited to 'android')
3 files changed, 15 insertions, 4 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt index 27b74227ca..7fbc4bdda3 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/NavigationComposeCell.kt @@ -15,6 +15,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import net.mullvad.mullvadvpn.R import net.mullvad.mullvadvpn.lib.theme.AppTheme @@ -99,7 +100,9 @@ internal fun NavigationTitleView( text = title, style = MaterialTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onPrimary, - modifier = modifier + modifier = modifier, + maxLines = 1, + overflow = TextOverflow.Ellipsis ) } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt index 032695be88..0342a0f5e7 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/RelayLocationCell.kt @@ -30,6 +30,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import net.mullvad.mullvadvpn.R @@ -296,7 +297,9 @@ private fun Name(modifier: Modifier = Modifier, relay: RelayItem) { AlphaInactive } ) - .padding(horizontal = Dimens.smallPadding, vertical = Dimens.mediumPadding) + .padding(horizontal = Dimens.smallPadding, vertical = Dimens.mediumPadding), + maxLines = 1, + overflow = TextOverflow.Ellipsis ) } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/TwoRowCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/TwoRowCell.kt index 0b1f36d21d..17eb5d315a 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/TwoRowCell.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/TwoRowCell.kt @@ -7,6 +7,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import net.mullvad.mullvadvpn.lib.theme.AppTheme import net.mullvad.mullvadvpn.lib.theme.Dimens @@ -33,13 +34,17 @@ fun TwoRowCell( modifier = Modifier.fillMaxWidth(), text = titleText, style = MaterialTheme.typography.labelLarge, - color = titleColor + color = titleColor, + maxLines = 1, + overflow = TextOverflow.Ellipsis ) Text( modifier = Modifier.fillMaxWidth(), text = subtitleText, style = MaterialTheme.typography.labelLarge, - color = subtitleColor + color = subtitleColor, + maxLines = 1, + overflow = TextOverflow.Ellipsis ) } }, |
