|
@@ -131,7 +131,8 @@ fun Settings(navHostController: NavHostController) {
|
|
|
AddTextSettings(
|
|
|
text = "Settings",
|
|
|
size = 28.sp,
|
|
|
- color = MaterialTheme.colorScheme.primary
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ style = MaterialTheme.typography.headlineLarge
|
|
|
)
|
|
|
AddRowSettingsColumn(
|
|
|
icon = R.drawable.vpn_protocols3x,
|
|
@@ -142,6 +143,11 @@ fun Settings(navHostController: NavHostController) {
|
|
|
// icon = R.drawable.autoconnect3x,
|
|
|
// text = "Auto Connect"
|
|
|
// )
|
|
|
+ AddRowSettings(
|
|
|
+ icon = R.drawable.autoconnect3x,
|
|
|
+ text = "Auto Connect",
|
|
|
+ onClick = {}
|
|
|
+ )
|
|
|
AddRowSettingsSmart(
|
|
|
icon = R.drawable.smart_connect3x,
|
|
|
text = "Smart Connect",
|
|
@@ -221,12 +227,8 @@ fun ColumnScope.AddRowSwitch(icon: Int, text: String) {
|
|
|
color = Color.Transparent
|
|
|
) {
|
|
|
Text(text = text,
|
|
|
- style = TextStyle(
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- fontSize = 16.sp,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
- fontWeight = FontWeight.Medium
|
|
|
- ),
|
|
|
+ style = MaterialTheme.typography.titleSmall,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
maxLines = 1,
|
|
|
modifier = Modifier
|
|
|
.padding(start = 20.dp, end = 0.dp)
|
|
@@ -304,12 +306,8 @@ fun ColumnScope.AddRowSettings(
|
|
|
color = Color.Transparent
|
|
|
) {
|
|
|
Text(text = text,
|
|
|
- style = TextStyle(
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- fontSize = 16.sp,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
- fontWeight = FontWeight.Medium
|
|
|
- ),
|
|
|
+ style = MaterialTheme.typography.titleSmall,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
maxLines = 1,
|
|
|
modifier = Modifier
|
|
|
.padding(start = 20.dp, end = 0.dp)
|
|
@@ -394,12 +392,8 @@ fun ColumnScope.AddRowSettingsColumn(
|
|
|
) {
|
|
|
Column {
|
|
|
Text(text = text,
|
|
|
- style = TextStyle(
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- fontSize = 16.sp,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
- fontWeight = FontWeight.Medium
|
|
|
- ),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ style = MaterialTheme.typography.titleSmall,
|
|
|
maxLines = 1,
|
|
|
modifier = Modifier
|
|
|
.padding(start = 20.dp, end = 0.dp)
|
|
@@ -407,12 +401,8 @@ fun ColumnScope.AddRowSettingsColumn(
|
|
|
)
|
|
|
Spacer(modifier = Modifier.height(2.dp))
|
|
|
Text(text = selectedProtocol,
|
|
|
- style = TextStyle(
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- fontSize = 12.sp,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
- fontWeight = FontWeight.Medium
|
|
|
- ),
|
|
|
+ style = MaterialTheme.typography.headlineSmall,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
maxLines = 1,
|
|
|
modifier = Modifier
|
|
|
.padding(start = 20.dp, end = 0.dp)
|
|
@@ -464,7 +454,8 @@ fun ColumnScope.AddRowSettingsColumn(
|
|
|
size = 18.sp,
|
|
|
color = MaterialTheme.colorScheme.primary,
|
|
|
bottomPadding = 15.dp,
|
|
|
- startPadding = 16.dp
|
|
|
+ startPadding = 16.dp,
|
|
|
+ style = MaterialTheme.typography.titleMedium
|
|
|
)
|
|
|
protocols.forEach { protocol ->
|
|
|
Row(
|
|
@@ -497,11 +488,9 @@ fun ColumnScope.AddRowSettingsColumn(
|
|
|
)
|
|
|
Text(text = protocol,
|
|
|
modifier = Modifier.padding(start = 12.dp),
|
|
|
- style = TextStyle(
|
|
|
- fontSize = 14.sp,
|
|
|
- color = MaterialTheme.colorScheme.primary
|
|
|
- )
|
|
|
- )
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ style = MaterialTheme.typography.bodySmall
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -560,12 +549,8 @@ fun AddRowDarkLightTheme(
|
|
|
color = Color.Transparent
|
|
|
) {
|
|
|
Text(text = text,
|
|
|
- style = TextStyle(
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- fontSize = 16.sp,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
- fontWeight = FontWeight.Medium
|
|
|
- ),
|
|
|
+ style = MaterialTheme.typography.titleMedium,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
maxLines = 1,
|
|
|
modifier = Modifier
|
|
|
.padding(start = 20.dp, end = 0.dp)
|
|
@@ -621,7 +606,8 @@ fun AddRowDarkLightTheme(
|
|
|
size = 18.sp,
|
|
|
color = MaterialTheme.colorScheme.primary,
|
|
|
bottomPadding = 20.dp,
|
|
|
- startPadding = 16.dp
|
|
|
+ startPadding = 16.dp,
|
|
|
+ style = MaterialTheme.typography.titleSmall
|
|
|
)
|
|
|
themesList.forEach { theme ->
|
|
|
|
|
@@ -643,6 +629,7 @@ fun AddRowDarkLightTheme(
|
|
|
Log.d("test_theme", "false: -> $systemTheme")
|
|
|
isDarkTheme.value = selectedtheme.value == themesList[2]
|
|
|
}
|
|
|
+ isThemeSheetOpen = false
|
|
|
},
|
|
|
)
|
|
|
// .indication(
|
|
@@ -670,7 +657,7 @@ fun AddRowDarkLightTheme(
|
|
|
Log.d("test_theme", "false: -> $systemTheme")
|
|
|
isDarkTheme.value = selectedtheme.value == themesList[2]
|
|
|
}
|
|
|
-
|
|
|
+ isThemeSheetOpen = false
|
|
|
},
|
|
|
colors = RadioButtonDefaults.colors(
|
|
|
selectedColor = colorResource(id = R.color.radio_button_blue),
|
|
@@ -678,10 +665,8 @@ fun AddRowDarkLightTheme(
|
|
|
)
|
|
|
Text(text = theme,
|
|
|
modifier = Modifier.padding(start = 12.dp),
|
|
|
- style = TextStyle(
|
|
|
- fontSize = 14.sp,
|
|
|
- color = MaterialTheme.colorScheme.primary
|
|
|
- )
|
|
|
+ style = MaterialTheme.typography.bodySmall,
|
|
|
+ color = MaterialTheme.colorScheme.primary
|
|
|
)
|
|
|
}
|
|
|
}
|
|
@@ -743,12 +728,8 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
color = Color.Transparent
|
|
|
) {
|
|
|
Text(text = text,
|
|
|
- style = TextStyle(
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- fontSize = 16.sp,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
- fontWeight = FontWeight.Medium
|
|
|
- ),
|
|
|
+ style = MaterialTheme.typography.titleSmall,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
maxLines = 1,
|
|
|
modifier = Modifier
|
|
|
.padding(start = 20.dp, end = 0.dp)
|
|
@@ -803,7 +784,8 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
size = 18.sp,
|
|
|
color = MaterialTheme.colorScheme.primary,
|
|
|
bottomPadding = 20.dp,
|
|
|
- startPadding = 16.dp
|
|
|
+ startPadding = 16.dp,
|
|
|
+ style = MaterialTheme.typography.titleMedium
|
|
|
)
|
|
|
smartConnect.forEach { smart ->
|
|
|
Row(
|
|
@@ -836,10 +818,8 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
)
|
|
|
Text(text = smart,
|
|
|
modifier = Modifier.padding(start = 12.dp),
|
|
|
- style = TextStyle(
|
|
|
- fontSize = 14.sp,
|
|
|
- color = MaterialTheme.colorScheme.primary
|
|
|
- )
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ style = MaterialTheme.typography.bodySmall
|
|
|
)
|
|
|
}
|
|
|
}
|
|
@@ -855,17 +835,13 @@ fun ColumnScope.AddTextSettings(
|
|
|
size: TextUnit,
|
|
|
color: Color,
|
|
|
bottomPadding: Dp = 0.dp,
|
|
|
- startPadding: Dp = 0.dp
|
|
|
+ startPadding: Dp = 0.dp,
|
|
|
+ style: TextStyle
|
|
|
) {
|
|
|
Text(
|
|
|
text = text,
|
|
|
- style = TextStyle(
|
|
|
- fontSize = size,
|
|
|
- color = color,
|
|
|
- textAlign = TextAlign.Center,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
- fontWeight = FontWeight.Medium,
|
|
|
- ),
|
|
|
+ style = style,
|
|
|
+ color = color,
|
|
|
modifier = Modifier.padding(bottom = bottomPadding, start = startPadding)
|
|
|
|
|
|
)
|