mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 16:55:26 +02:00
Text appearance fixes
Fixed cursor not shown in placeholder in SearchBar.kt Fixed color usage for some texts
This commit is contained in:
parent
c11a97c6af
commit
98606259b5
@ -137,11 +137,12 @@ fun SearchBar(
|
|||||||
decorationBox = { innerTextField ->
|
decorationBox = { innerTextField ->
|
||||||
// Showing placeholder only when there is query is empty
|
// Showing placeholder only when there is query is empty
|
||||||
if (value.isEmpty()) {
|
if (value.isEmpty()) {
|
||||||
|
innerTextField()
|
||||||
Text(
|
Text(
|
||||||
modifier = Modifier.alpha(0.7f),
|
modifier = Modifier.alpha(0.7f),
|
||||||
text = stringResource(id = R.string.search_bar_placeholder),
|
text = stringResource(id = R.string.search_bar_placeholder),
|
||||||
style = MaterialTheme.typography.titleLarge,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = MaterialTheme.colorScheme.outline
|
color = MaterialTheme.colorScheme.onSurface
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
innerTextField()
|
innerTextField()
|
||||||
|
@ -52,7 +52,7 @@ fun UnitsList(
|
|||||||
.padding(vertical = 12.dp, horizontal = 8.dp),
|
.padding(vertical = 12.dp, horizontal = 8.dp),
|
||||||
text = stringResource(id = unitGroup.res),
|
text = stringResource(id = unitGroup.res),
|
||||||
style = MaterialTheme.typography.titleMedium,
|
style = MaterialTheme.typography.titleMedium,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = MaterialTheme.colorScheme.onPrimaryContainer
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
items(items = listOfUnits, key = { it.unitId }) { unit ->
|
items(items = listOfUnits, key = { it.unitId }) { unit ->
|
||||||
|
@ -9,10 +9,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.material.ripple.rememberRipple
|
import androidx.compose.material.ripple.rememberRipple
|
||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.material3.RadioButton
|
|
||||||
import androidx.compose.material3.Text
|
|
||||||
import androidx.compose.material3.TextButton
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@ -68,7 +65,7 @@ fun AlertDialogWithList(
|
|||||||
},
|
},
|
||||||
confirmButton = {
|
confirmButton = {
|
||||||
TextButton(onClick = dismissAction) {
|
TextButton(onClick = dismissAction) {
|
||||||
Text(text = dismissButtonLabel)
|
Text(text = dismissButtonLabel, color = MaterialTheme.colorScheme.onPrimaryContainer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -100,7 +97,11 @@ private fun CustomDialogContentListItem(
|
|||||||
) {
|
) {
|
||||||
RadioButton(
|
RadioButton(
|
||||||
selected = selected,
|
selected = selected,
|
||||||
onClick = onClick
|
onClick = onClick,
|
||||||
|
colors = RadioButtonDefaults.colors(
|
||||||
|
selectedColor = MaterialTheme.colorScheme.onPrimaryContainer,
|
||||||
|
unselectedColor = MaterialTheme.colorScheme.onPrimaryContainer
|
||||||
|
)
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = label
|
text = label
|
||||||
|
@ -76,7 +76,7 @@ fun SettingsScreen(
|
|||||||
.padding(start = 16.dp, end = 16.dp, top = 24.dp, bottom = 12.dp),
|
.padding(start = 16.dp, end = 16.dp, top = 24.dp, bottom = 12.dp),
|
||||||
text = stringResource(id = R.string.general_settings_group),
|
text = stringResource(id = R.string.general_settings_group),
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = MaterialTheme.colorScheme.onPrimaryContainer
|
||||||
)
|
)
|
||||||
SettingsListItem(
|
SettingsListItem(
|
||||||
label = stringResource(R.string.precision_setting),
|
label = stringResource(R.string.precision_setting),
|
||||||
@ -110,7 +110,7 @@ fun SettingsScreen(
|
|||||||
.padding(start = 16.dp, end = 16.dp, top = 24.dp, bottom = 12.dp),
|
.padding(start = 16.dp, end = 16.dp, top = 24.dp, bottom = 12.dp),
|
||||||
text = stringResource(id = R.string.additional_settings_group),
|
text = stringResource(id = R.string.additional_settings_group),
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = MaterialTheme.colorScheme.onPrimaryContainer
|
||||||
)
|
)
|
||||||
SettingsListItem(
|
SettingsListItem(
|
||||||
label = stringResource(R.string.terms_and_conditions),
|
label = stringResource(R.string.terms_and_conditions),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user