|
@@ -416,8 +416,8 @@ fun HomeTV(
|
|
|
.fillMaxHeight()
|
|
|
.padding(top = 0.dp),
|
|
|
// painter = if (isConnect == App.CONNECTED) blueBackgroundTV() else pinkBackgroundTV(),
|
|
|
- painter = if (isConnect == App.CONNECTED) painterResource(id = R.drawable.bluebackground3x)
|
|
|
- else painterResource(id = R.drawable.pinkbackground3x),
|
|
|
+ painter = if (isConnect == App.CONNECTED) blueBackgroundTV()
|
|
|
+ else pinkBackgroundTV(),
|
|
|
contentDescription = "Background Color",
|
|
|
contentScale = ContentScale.FillBounds,
|
|
|
)
|
|
@@ -426,8 +426,8 @@ fun HomeTV(
|
|
|
.fillMaxWidth()
|
|
|
.fillMaxHeight()
|
|
|
.padding(bottom = 0.dp)
|
|
|
-// .alpha(if (isDarkTheme.value) 0.1F else 0.6F),
|
|
|
- .alpha(0.6F),
|
|
|
+ .alpha(if (isDarkTheme.value) 0.1F else 0.6F),
|
|
|
+// .alpha(0.6F),
|
|
|
painter = painterResource(id = R.drawable.map_home3x),
|
|
|
contentDescription = "Home Map",
|
|
|
contentScale = ContentScale.FillWidth,
|
|
@@ -451,7 +451,7 @@ fun HomeTV(
|
|
|
text = "IP ${ipInfo ?: ""}",
|
|
|
size = 18.sp,
|
|
|
// color = MaterialTheme.colorScheme.primary,
|
|
|
- color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
style = MaterialTheme.typography.customTypography.headlineLarge.copy(
|
|
|
fontSize = 18.sp
|
|
|
)
|
|
@@ -481,7 +481,7 @@ fun HomeTV(
|
|
|
AddText(
|
|
|
text = "${serverObj?.server_name ?: ""}, ${serverObj?.country ?: ""}",
|
|
|
size = 16.sp,
|
|
|
- color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
isTablet()
|
|
|
)
|
|
|
} else {
|
|
@@ -504,7 +504,7 @@ fun HomeTV(
|
|
|
AddText(
|
|
|
text = "${serverDis?.city ?: ""}, ${serverDis?.country ?: ""}",
|
|
|
size = 16.sp,
|
|
|
- color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
isTablet()
|
|
|
)
|
|
|
}
|
|
@@ -514,8 +514,8 @@ fun HomeTV(
|
|
|
AddText(
|
|
|
text = "Connected",
|
|
|
size = 18.sp,
|
|
|
- // color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
|
|
- color = colorResource(id = R.color.light_blue_2),
|
|
|
+ color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
|
|
+// color = colorResource(id = R.color.light_blue_2),
|
|
|
style = MaterialTheme.typography.customTypography.displaySmall.copy(
|
|
|
fontSize = 18.sp
|
|
|
)
|
|
@@ -525,8 +525,8 @@ fun HomeTV(
|
|
|
AddText(
|
|
|
text = "Disconnected",
|
|
|
size = 18.sp,
|
|
|
- // color = MaterialTheme.colorScheme.surfaceTint,
|
|
|
- color = colorResource(id = R.color.maroon_text),
|
|
|
+ color = MaterialTheme.colorScheme.surfaceTint,
|
|
|
+// color = colorResource(id = R.color.maroon_text),
|
|
|
style = MaterialTheme.typography.customTypography.displaySmall.copy(
|
|
|
fontSize = 18.sp
|
|
|
)
|
|
@@ -536,8 +536,8 @@ fun HomeTV(
|
|
|
AddText(
|
|
|
text = "Connecting...",
|
|
|
size = 18.sp,
|
|
|
- // color = MaterialTheme.colorScheme.surfaceTint,
|
|
|
- color = colorResource(id = R.color.maroon_text),
|
|
|
+ color = MaterialTheme.colorScheme.surfaceTint,
|
|
|
+// color = colorResource(id = R.color.maroon_text),
|
|
|
style = MaterialTheme.typography.customTypography.displaySmall.copy(
|
|
|
fontSize = 18.sp
|
|
|
)
|
|
@@ -699,18 +699,18 @@ fun HomeTV(
|
|
|
{
|
|
|
if (isConnect == App.CONNECTED) {
|
|
|
Image(
|
|
|
-// painter = if (isDarkTheme.value) painterResource(id = R.drawable.iv_connect_dark)
|
|
|
-// else painterResource(id = R.drawable.iv_connect),
|
|
|
- painter = painterResource(id = R.drawable.iv_connect),
|
|
|
+ painter = if (isDarkTheme.value) painterResource(id = R.drawable.iv_connect_dark)
|
|
|
+ else painterResource(id = R.drawable.iv_connect),
|
|
|
+// painter = painterResource(id = R.drawable.iv_connect),
|
|
|
contentDescription = "Home Map",
|
|
|
contentScale = ContentScale.FillBounds,
|
|
|
modifier = Modifier.fillMaxSize()
|
|
|
)
|
|
|
} else {
|
|
|
Image(
|
|
|
-// painter = if (isDarkTheme.value) painterResource(id = R.drawable.iv_disconnect_dark)
|
|
|
-// else painterResource(id = R.drawable.iv_disconnect),
|
|
|
- painter = painterResource(id = R.drawable.iv_disconnect),
|
|
|
+ painter = if (isDarkTheme.value) painterResource(id = R.drawable.iv_disconnect_dark)
|
|
|
+ else painterResource(id = R.drawable.iv_disconnect),
|
|
|
+// painter = painterResource(id = R.drawable.iv_disconnect),
|
|
|
contentDescription = "Home Map",
|
|
|
contentScale = ContentScale.FillBounds,
|
|
|
modifier = Modifier.fillMaxSize()
|
|
@@ -723,7 +723,7 @@ fun HomeTV(
|
|
|
// 2nd box
|
|
|
Box(
|
|
|
modifier = Modifier
|
|
|
- .background(colorResource(id = R.color.background_color_gray))
|
|
|
+ .background(MaterialTheme.colorScheme.background)
|
|
|
.fillMaxSize()
|
|
|
.weight(0.4f)
|
|
|
// .background(Color.Transparent),
|
|
@@ -740,12 +740,12 @@ fun HomeTV(
|
|
|
.padding(vertical = 2.dp)
|
|
|
.height(90.dp)
|
|
|
.border(
|
|
|
- border = BorderStroke(2.dp, colorResource(id = R.color.white)),
|
|
|
+ border = BorderStroke(2.dp, MaterialTheme.colorScheme.onBackground),
|
|
|
shape = RoundedCornerShape(28.dp)
|
|
|
)
|
|
|
.background(
|
|
|
shape = RoundedCornerShape(28.dp),
|
|
|
- color = colorResource(id = R.color.white)
|
|
|
+ color = MaterialTheme.colorScheme.onBackground
|
|
|
)
|
|
|
.align(Alignment.CenterHorizontally),
|
|
|
) {
|
|
@@ -889,10 +889,9 @@ fun HomeTV(
|
|
|
// Spacer(modifier = Modifier.weight(1f))
|
|
|
|
|
|
var isLayoutFocused by remember { mutableStateOf(false) }
|
|
|
-
|
|
|
- val color = if (isLayoutFocused && isConnect == App.CONNECTED) colorResource(id = R.color.dark_blue_gray_text)
|
|
|
+ val color = if (isLayoutFocused && isConnect == App.CONNECTED) MaterialTheme.colorScheme.primary
|
|
|
else if (isLayoutFocused) colorResource(id = R.color.maroon_text)
|
|
|
- else colorResource(id = R.color.white)
|
|
|
+ else MaterialTheme.colorScheme.onBackground
|
|
|
Box(
|
|
|
modifier = Modifier
|
|
|
.fillMaxWidth(fraction = 0.4f)
|
|
@@ -934,8 +933,7 @@ fun HomeTV(
|
|
|
)
|
|
|
.background(
|
|
|
shape = RoundedCornerShape(28.dp),
|
|
|
-// color = MaterialTheme.colorScheme.onBackground
|
|
|
- color = colorResource(id = R.color.white)
|
|
|
+ color = MaterialTheme.colorScheme.onBackground
|
|
|
)
|
|
|
.align(Alignment.CenterHorizontally),
|
|
|
contentAlignment = Alignment.CenterStart,
|
|
@@ -1331,8 +1329,8 @@ fun BoxScope.AddRowSmartTV(
|
|
|
) {
|
|
|
ColumnText(
|
|
|
text = selectedSmartList,
|
|
|
-// color = MaterialTheme.colorScheme.surfaceContainerLow,
|
|
|
- color = colorResource(id = R.color.blue_text),
|
|
|
+ color = MaterialTheme.colorScheme.surfaceContainerLow,
|
|
|
+// color = colorResource(id = R.color.blue_text),
|
|
|
size = 12.sp,
|
|
|
style = MaterialTheme.typography.customTypography.headlineSmall.copy(
|
|
|
fontSize = 16.sp
|
|
@@ -1340,8 +1338,8 @@ fun BoxScope.AddRowSmartTV(
|
|
|
)
|
|
|
ColumnText(
|
|
|
text = "${selectedServer?.server_name}",
|
|
|
-// color = MaterialTheme.colorScheme.primary,
|
|
|
- color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+// color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
size = 16.sp,
|
|
|
style = MaterialTheme.typography.labelMedium.copy(
|
|
|
fontSize = 16.sp
|
|
@@ -1389,8 +1387,8 @@ fun BoxScope.AddRowSmartTV(
|
|
|
.focusable(),
|
|
|
text = AnnotatedString("Change"),
|
|
|
style = MaterialTheme.typography.customTypography.headlineMedium.copy(
|
|
|
-// MaterialTheme.colorScheme.surfaceContainerLow,
|
|
|
- color = color,
|
|
|
+ color = MaterialTheme.colorScheme.surfaceContainerLow,
|
|
|
+// color = color,
|
|
|
fontSize = 18.sp
|
|
|
),
|
|
|
onClick = {},
|
|
@@ -1446,8 +1444,8 @@ fun BoxScope.AddRowSelectServerTV(navHostController: NavHostController, isTablet
|
|
|
style = MaterialTheme.typography.labelMedium.copy(
|
|
|
fontSize = if (isTablet()) 20.sp else 16.sp
|
|
|
),
|
|
|
-// color = MaterialTheme.colorScheme.primary,
|
|
|
- color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+// color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
maxLines = 2,
|
|
|
modifier = Modifier
|
|
|
.padding(start = 12.dp, end = 0.dp)
|