|
@@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.Column
|
|
|
import androidx.compose.foundation.layout.ColumnScope
|
|
|
import androidx.compose.foundation.layout.Row
|
|
|
import androidx.compose.foundation.layout.Spacer
|
|
|
+import androidx.compose.foundation.layout.fillMaxHeight
|
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
|
import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
import androidx.compose.foundation.layout.height
|
|
@@ -107,6 +108,7 @@ import com.vpn.fastestvpnservice.navigation.isSecondItemFocused
|
|
|
import com.vpn.fastestvpnservice.navigation.isSecondItemPressed
|
|
|
import com.vpn.fastestvpnservice.navigation.isSettingsScreenPressed
|
|
|
import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.AddTextSettings
|
|
|
+import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.AddTextSettingsLanguage
|
|
|
import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.getAvailableProtocols
|
|
|
import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.navHostController1
|
|
|
import com.vpn.fastestvpnservice.screens.isSearchModelInitialized
|
|
@@ -395,7 +397,8 @@ fun ColumnScope.AddTextSettingsTV(
|
|
|
text = text,
|
|
|
style = style,
|
|
|
color = color,
|
|
|
- modifier = Modifier.padding(bottom = bottomPadding, start = startPadding)
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(bottom = bottomPadding, start = startPadding)
|
|
|
.focusable(isfocusable)
|
|
|
)
|
|
|
}
|
|
@@ -1491,9 +1494,9 @@ fun AddLanguageTV(
|
|
|
onDismissRequest = { isLanguageSheetOpen = false
|
|
|
},
|
|
|
dragHandle = {
|
|
|
- BottomSheetDefaults.DragHandle(
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- )
|
|
|
+// BottomSheetDefaults.DragHandle(
|
|
|
+// color = MaterialTheme.colorScheme.primary,
|
|
|
+// )
|
|
|
},
|
|
|
sheetState = sheetState,
|
|
|
containerColor = MaterialTheme.colorScheme.onBackground,
|
|
@@ -1501,38 +1504,39 @@ fun AddLanguageTV(
|
|
|
.padding(top = 15.dp)
|
|
|
.fillMaxSize()
|
|
|
) {
|
|
|
- Box(
|
|
|
+ Column(
|
|
|
modifier = Modifier
|
|
|
.background(Color.Transparent)
|
|
|
.fillMaxSize()
|
|
|
- .padding(start = 0.dp, top = 10.dp, bottom = 20.dp),
|
|
|
+ .padding(start = 0.dp, top = 15.dp, bottom = 25.dp),
|
|
|
) {
|
|
|
+ AddTextSettingsLanguage(
|
|
|
+ text = context.getString(R.string.select_language),
|
|
|
+ size = 18.sp,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ topPadding = 15.dp,
|
|
|
+ style = MaterialTheme.typography.titleSmall,
|
|
|
+ )
|
|
|
+ Spacer(modifier = Modifier.height(25.dp))
|
|
|
Column(
|
|
|
verticalArrangement = Arrangement.Top,
|
|
|
horizontalAlignment = Alignment.Start,
|
|
|
modifier = Modifier
|
|
|
.verticalScroll(rememberScrollState())
|
|
|
- .padding(bottom = 10.dp)
|
|
|
+ .padding(top = 10.dp, bottom = 10.dp)
|
|
|
) {
|
|
|
- AddTextSettings(
|
|
|
- text = context.getString(R.string.language),
|
|
|
- size = 18.sp,
|
|
|
- color = MaterialTheme.colorScheme.primary,
|
|
|
- bottomPadding = 20.dp,
|
|
|
- startPadding = 16.dp,
|
|
|
- style = MaterialTheme.typography.titleSmall,
|
|
|
- isFocusable = true
|
|
|
- )
|
|
|
+
|
|
|
languages.forEach { language ->
|
|
|
isButtonFocused = isSelectedLanguage == language
|
|
|
Row(
|
|
|
modifier = Modifier
|
|
|
.fillMaxWidth()
|
|
|
+ .height(80.dp)
|
|
|
.background(
|
|
|
if (isButtonFocused && isAnyItemFocused) MaterialTheme.colorScheme.inverseOnSurface
|
|
|
else Color.Transparent
|
|
|
)
|
|
|
- .padding(start = 2.dp)
|
|
|
+ .padding(start = 2.dp, top = 15.dp)
|
|
|
.onFocusChanged {
|
|
|
if (it.isFocused) {
|
|
|
isSelectedLanguage = language
|
|
@@ -1611,12 +1615,38 @@ fun AddLanguageTV(
|
|
|
unselectedColor = colorResource(id = R.color.gray_icon),
|
|
|
)
|
|
|
)
|
|
|
- Text(text = language.title,
|
|
|
- modifier = Modifier.padding(start = 12.dp),
|
|
|
- style = MaterialTheme.typography.bodySmall,
|
|
|
- color = MaterialTheme.colorScheme.primary
|
|
|
- )
|
|
|
+ Column(
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .fillMaxHeight()
|
|
|
+ .padding(start = 5.dp)
|
|
|
+ .background(
|
|
|
+ Color.Transparent
|
|
|
+ ),
|
|
|
+ verticalArrangement = Arrangement.Center
|
|
|
+ ) {
|
|
|
+ Text(text = language.title,
|
|
|
+ modifier = Modifier.padding(start = 0.dp),
|
|
|
+ style = MaterialTheme.typography.bodySmall,
|
|
|
+ color = MaterialTheme.colorScheme.primary
|
|
|
+ )
|
|
|
+ Text(text = language.subTitle,
|
|
|
+ style = MaterialTheme.typography.bodySmall,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(top = 2.dp)
|
|
|
+ .alpha(0.4f),
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
+ Surface(
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(start = 55.dp)
|
|
|
+ .height(1.dp)
|
|
|
+ .fillMaxWidth()
|
|
|
+ .alpha(0.4F),
|
|
|
+ color = colorResource(id = R.color.gray_icon)
|
|
|
+ ) {}
|
|
|
}
|
|
|
}
|
|
|
}
|