Added more tweaks to screens and dependencies

This commit is contained in:
Arty Bishop committed 2025-12-27 15:01:47 +00:00
1 parent ad89830c51
commit 5a0ff019e9
10 files changed
+238 -153

No files matched your search

@@ -86,7 +86,7 @@ private val darkScheme = darkColorScheme(
// inversePrimary = Color(0xFF121212),
secondary = Color(0xFFE0E0E0),
onSecondary = Color(0xFF000000),
secondaryContainer = Color(0xFF484848), // navBar indicator,
secondaryContainer = Color(0xFF404040), // navBar indicator,
onSecondaryContainer = Color(0xFFE0E0E0), // navBar active icon
// tertiary = Color(0xFF121212),
// onTertiary = Color(0xFF121212),
@@ -94,9 +94,9 @@ private val darkScheme = darkColorScheme(
// onTertiaryContainer = Color(0xFF121212),
background = Color(0xFF121212),
onBackground = Color(0xFFE0E0E0),
surface = Color(0xFF242424), // card background
surface = Color(0xFF202020), // card background
onSurface = Color(0xFFE0E0E0), // on card background
surfaceVariant = Color(0xFF484848), // buttons background
surfaceVariant = Color(0xFF404040), // buttons background
onSurfaceVariant = Color(0xFFE0E0E0), // navBar inactive icon
surfaceTint = Color(0x00000000),
// inverseSurface = Color(0xFF121212),
@@ -112,7 +112,7 @@ private val darkScheme = darkColorScheme(
surfaceContainer = Color(0xFF121212), // navBar background
// surfaceContainerHigh = Color(0xFF121212),
surfaceContainerHighest = Color(0xFF242424), // filled card background
surfaceContainerLow = Color(0xFF242424), // elevated card background
surfaceContainerLow = Color(0xFF202020), // elevated card background
// surfaceContainerLowest = Color(0xFF121212),
// surfaceDim = Color(0xFF121212),
)
@@ -121,6 +121,7 @@ private fun PassesList(
navigateToRadar: (Int, Long) -> Unit,
refreshPasses: () -> Unit
) {
val isVerticalLayout = isVerticalLayout()
val refreshState = rememberPullToRefreshState()
ElevatedCard(modifier = Modifier.fillMaxSize()) {
PullToRefreshBox(
@@ -145,7 +146,8 @@ private fun PassesList(
NearEarthPass(
pass = pass,
navigateToRadar = navigateToRadar,
modifier = Modifier.animateItem()
modifier = Modifier.animateItem(),
isVerticalLayout = isVerticalLayout
)
}
}
@@ -175,18 +177,20 @@ private fun NearEarthPassPreview() {
private fun NearEarthPass(
pass: OrbitalPass,
navigateToRadar: (Int, Long) -> Unit,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
isVerticalLayout: Boolean = true
) {
val passSatId = stringResource(id = R.string.pass_satId, pass.catNum)
val horizontalPadding = if (isVerticalLayout) 6.dp else 10.dp
Surface(color = MaterialTheme.colorScheme.background, modifier = modifier) {
Surface(modifier = Modifier
.padding(bottom = 2.dp, start = 1.dp, end = 1.dp)
.padding(bottom = 2.dp)
.clickable { navigateToRadar(pass.catNum, pass.aosTime) }) {
Column(
verticalArrangement = Arrangement.spacedBy(1.dp),
modifier = Modifier
.background(color = MaterialTheme.colorScheme.surface)
.padding(horizontal = 6.dp, vertical = 4.dp)
.padding(horizontal = horizontalPadding, vertical = 4.dp)
) {
Row(verticalAlignment = Alignment.CenterVertically) {
Text(
@@ -136,13 +136,19 @@ fun RadarViewCompose(
trackCreated.value = true
}
rotate(if (shouldUseCompass) -azimElev.first else 0f) {
if (shouldShowSweep) drawSweep(center, sweepDegrees.floatValue, radius, trackColor)
if (shouldShowSweep) {
drawSweep(center, sweepDegrees.floatValue, radius, trackColor)
}
drawRadar(radius, radarColor, strokeWidth, 3)
drawInfo(radius, trackColor, measurer, 3)
translate(center.x, center.y) {
drawTrack(trackPath.value, trackEffect.value, aimColor, trackColor)
if (item.elevation > 0) drawPosition(item, radius, animScale.value, trackColor)
drawAim(azimElev.first, azimElev.second, radius, strokeWidth, aimColor)
if (item.elevation > 0) {
drawPosition(item, radius, animScale.value, trackColor)
}
if (shouldUseCompass) {
drawAim(azimElev.first, azimElev.second, radius, strokeWidth, aimColor)
}
}
sweepDegrees.floatValue = (sweepDegrees.floatValue + 360 / 12.0f / 60) % 360
}
@@ -139,6 +139,7 @@ private fun SearchBar(setQuery: (String) -> Unit, modifier: Modifier = Modifier)
modifier = modifier.padding(start = 12.dp),
textStyle = TextStyle(
fontSize = 16.sp,
lineHeight = 20.sp,
fontWeight = FontWeight.Medium,
color = MaterialTheme.colorScheme.onSurface
),
@@ -147,8 +148,9 @@ private fun SearchBar(setQuery: (String) -> Unit, modifier: Modifier = Modifier)
Text(
text = stringResource(id = R.string.entries_search_hint),
fontSize = 16.sp,
fontWeight = FontWeight.Normal,
color = MaterialTheme.colorScheme.onSurfaceVariant
lineHeight = 20.sp,
fontWeight = FontWeight.Medium,
color = MaterialTheme.colorScheme.onSurface
)
}
innerTextField()
@@ -54,6 +54,7 @@ class SatellitesViewModel(
init {
viewModelScope.launch {
delay(1000)
selectionRepo.setQuery(String())
selectionRepo.setTypes(defaultTypes)
selectionRepo.getEntriesFlow().collectLatest { items ->
_uiState.update { it.copy(isLoading = false, itemsList = items) }