Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Auto connect lockdown mode title #6630

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LargeTopAppBar
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.MediumTopAppBar
import androidx.compose.material3.Surface
Expand All @@ -38,6 +39,7 @@ import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.LineBreak
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -276,7 +278,14 @@ fun MullvadLargeTopBar(
scrollBehavior: TopAppBarScrollBehavior? = null
) {
LargeTopAppBar(
title = { Text(text = title, maxLines = 2, overflow = TextOverflow.Ellipsis) },
title = {
Text(
text = title,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
style = LocalTextStyle.current.copy(lineBreak = LineBreak.Heading)
)
},
navigationIcon = navigationIcon,
scrollBehavior = scrollBehavior,
colors =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fun AutoConnectAndLockdownMode(navigator: DestinationsNavigator) {
fun AutoConnectAndLockdownModeScreen(onBackClick: () -> Unit = {}) {
val context = LocalContext.current
ScaffoldWithLargeTopBarAndButton(
appBarTitle = stringResource(id = R.string.auto_connect_and_lockdown_mode_two_lines),
appBarTitle = stringResource(id = R.string.auto_connect_and_lockdown_mode),
navigationIcon = { NavigateBackIconButton(onNavigateBack = onBackClick) },
buttonTitle = stringResource(id = R.string.go_to_vpn_settings),
onButtonClick = { context.openVpnSettings() },
Expand Down
1 change: 0 additions & 1 deletion android/lib/resource/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<string name="allow_lan_footer">Allows access to other devices on the same network for sharing, printing etc.</string>
<string name="auto_connect">Auto-connect</string>
<string name="auto_connect_and_lockdown_mode">Auto-connect &amp; Lockdown mode</string>
<string name="auto_connect_and_lockdown_mode_two_lines">Auto-connect &amp; \nLockdown mode</string>
<string name="auto_connect_and_lockdown_mode_footer">Makes sure the device is always on the VPN tunnel.</string>
<string name="go_to_vpn_settings">Go to VPN settings</string>
<string name="vpn_settings_not_found">There is no VPN settings on your device</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ import net.mullvad.mullvadvpn.lib.theme.typeface.TypeScale
private val MullvadTypography =
Typography(
headlineLarge = TextStyle(fontSize = TypeScale.TextHuge, fontWeight = FontWeight.Bold),
headlineMedium =
TextStyle(
fontWeight = FontWeight.Bold,
fontSize = TypeScale.TextHeadline,
lineHeight = TypeScale.HeadlineMediumLineHeight,
),
headlineSmall = TextStyle(fontSize = TypeScale.TextBig, fontWeight = FontWeight.Bold),
bodySmall = TextStyle(fontSize = TypeScale.TextSmall),
titleSmall = TextStyle(fontSize = TypeScale.TextMedium, fontWeight = FontWeight.SemiBold),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ import androidx.compose.ui.unit.sp
*/
internal object TypeScale {
val TextHuge = 30.sp
val TextHeadline = 28.sp
val TextBig = 24.sp
val TextMediumPlus = 18.sp
val TextMedium = 16.sp
val TextSmall = 13.sp
val TitleLarge = 22.sp

val HeadlineMediumLineHeight = 36.0.sp
}
3 changes: 0 additions & 3 deletions gui/locales/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2192,9 +2192,6 @@ msgstr ""
msgid "Auto-connect & Lockdown mode"
msgstr ""

msgid "Auto-connect & \\nLockdown mode"
msgstr ""

msgid "Auto-connect (legacy)"
msgstr ""

Expand Down
Loading