diff --git a/src/main/kotlin/view/pages/devices/DevicesPage.kt b/src/main/kotlin/view/pages/devices/DevicesPage.kt index 523c478..96557db 100644 --- a/src/main/kotlin/view/pages/devices/DevicesPage.kt +++ b/src/main/kotlin/view/pages/devices/DevicesPage.kt @@ -67,7 +67,8 @@ fun DevicesPage( DevicesPageState.Error -> { Box(modifier = Modifier.fillMaxSize()) { Texts.Subtitle1( - DEVICES_PAGE_ERROR_STARTING_ADB_SERVER, + text = DEVICES_PAGE_ERROR_STARTING_ADB_SERVER, + color = MaterialTheme.colors.onBackground, modifier = Modifier.align(Alignment.Center), ) } @@ -87,7 +88,11 @@ fun DevicesPage( DevicesPageState.DeviceIsEmpty -> { Box(modifier = Modifier.fillMaxSize()) { - Texts.Subtitle1(DEVICES_PAGE_NOT_FOUND_DEVICES, modifier = Modifier.align(Alignment.Center)) + Texts.Subtitle1( + text = DEVICES_PAGE_NOT_FOUND_DEVICES, + color = MaterialTheme.colors.onBackground, + modifier = Modifier.align(Alignment.Center) + ) } } } diff --git a/src/main/kotlin/view/pages/devices/DevicesPageForMini.kt b/src/main/kotlin/view/pages/devices/DevicesPageForMini.kt index 515e69a..2632112 100644 --- a/src/main/kotlin/view/pages/devices/DevicesPageForMini.kt +++ b/src/main/kotlin/view/pages/devices/DevicesPageForMini.kt @@ -3,6 +3,7 @@ package view.pages.devices import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material.CircularProgressIndicator +import androidx.compose.material.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.collectAsState @@ -53,7 +54,8 @@ fun DevicesPageForMini( DevicesPageState.Error -> { Box(modifier = Modifier.fillMaxSize()) { Texts.Subtitle1( - DEVICES_PAGE_ERROR_STARTING_ADB_SERVER, + text = DEVICES_PAGE_ERROR_STARTING_ADB_SERVER, + color = MaterialTheme.colors.onBackground, modifier = Modifier.align(Alignment.Center), ) } @@ -73,7 +75,11 @@ fun DevicesPageForMini( DevicesPageState.DeviceIsEmpty -> { Box(modifier = Modifier.fillMaxSize()) { - Texts.Subtitle1(DEVICES_PAGE_NOT_FOUND_DEVICES, modifier = Modifier.align(Alignment.Center)) + Texts.Subtitle1( + text = DEVICES_PAGE_NOT_FOUND_DEVICES, + color = MaterialTheme.colors.onBackground, + modifier = Modifier.align(Alignment.Center) + ) } } } diff --git a/src/main/kotlin/view/parts/Texts.kt b/src/main/kotlin/view/parts/Texts.kt index 7897809..a54c398 100644 --- a/src/main/kotlin/view/parts/Texts.kt +++ b/src/main/kotlin/view/parts/Texts.kt @@ -6,17 +6,20 @@ import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.style.TextOverflow object Texts { @Composable fun H1( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -27,11 +30,13 @@ object Texts { @Composable fun H2( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -42,11 +47,13 @@ object Texts { @Composable fun H3( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -57,11 +64,13 @@ object Texts { @Composable fun H4( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -72,11 +81,13 @@ object Texts { @Composable fun H5( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -87,11 +98,13 @@ object Texts { @Composable fun H6( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -102,11 +115,13 @@ object Texts { @Composable fun Subtitle1( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -117,11 +132,13 @@ object Texts { @Composable fun Subtitle2( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -132,11 +149,13 @@ object Texts { @Composable fun Body1( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -147,11 +166,13 @@ object Texts { @Composable fun Body2( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -162,11 +183,13 @@ object Texts { @Composable fun Button( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, @@ -177,11 +200,13 @@ object Texts { @Composable fun Caption( text: String, + color: Color = Color.Unspecified, maxLines: Int = Int.MAX_VALUE, modifier: Modifier = Modifier, ) { Text( text = text, + color = color, maxLines = maxLines, modifier = modifier, overflow = TextOverflow.Ellipsis, diff --git a/src/main/kotlin/view/templates/HeaderAndContent.kt b/src/main/kotlin/view/templates/HeaderAndContent.kt index 897b655..299f188 100644 --- a/src/main/kotlin/view/templates/HeaderAndContent.kt +++ b/src/main/kotlin/view/templates/HeaderAndContent.kt @@ -23,11 +23,11 @@ fun MainLayout( ) { Box( modifier = - Modifier - .fillMaxSize() - .background(MaterialTheme.colors.background) - .clip(RoundedCornerShape(8.dp)) - .border(BorderStroke(1.dp, Colors.WINDOW_BORDER)), + Modifier + .fillMaxSize() + .background(MaterialTheme.colors.background) + .clip(RoundedCornerShape(8.dp)) + .border(BorderStroke(1.dp, Colors.WINDOW_BORDER)), ) { Column(modifier = Modifier.fillMaxSize()) { header()