Fixes tickmarks on dropdowns
This commit is contained in:
+72
-64
@@ -222,24 +222,26 @@ private fun TranslationMessage(
|
|||||||
) {
|
) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = {
|
text = {
|
||||||
if (source in accountViewModel.account.dontTranslateFrom) {
|
Row {
|
||||||
Icon(
|
if (source in accountViewModel.account.dontTranslateFrom) {
|
||||||
imageVector = Icons.Default.Check,
|
Icon(
|
||||||
contentDescription = null,
|
imageVector = Icons.Default.Check,
|
||||||
modifier = Modifier.size(24.dp),
|
contentDescription = null,
|
||||||
|
modifier = Modifier.size(24.dp),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Spacer(modifier = Modifier.size(24.dp))
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.size(10.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
stringResource(
|
||||||
|
R.string.translations_never_translate_from_lang,
|
||||||
|
Locale(source).displayName,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
Spacer(modifier = Modifier.size(24.dp))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.size(10.dp))
|
|
||||||
|
|
||||||
Text(
|
|
||||||
stringResource(
|
|
||||||
R.string.translations_never_translate_from_lang,
|
|
||||||
Locale(source).displayName,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
scope.launch(Dispatchers.IO) {
|
scope.launch(Dispatchers.IO) {
|
||||||
@@ -251,24 +253,26 @@ private fun TranslationMessage(
|
|||||||
HorizontalDivider(thickness = DividerThickness)
|
HorizontalDivider(thickness = DividerThickness)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = {
|
text = {
|
||||||
if (accountViewModel.account.preferenceBetween(source, target) == source) {
|
Row {
|
||||||
Icon(
|
if (accountViewModel.account.preferenceBetween(source, target) == source) {
|
||||||
imageVector = Icons.Default.Check,
|
Icon(
|
||||||
contentDescription = null,
|
imageVector = Icons.Default.Check,
|
||||||
modifier = Modifier.size(24.dp),
|
contentDescription = null,
|
||||||
|
modifier = Modifier.size(24.dp),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Spacer(modifier = Modifier.size(24.dp))
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.size(10.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
stringResource(
|
||||||
|
R.string.translations_show_in_lang_first,
|
||||||
|
Locale(source).displayName,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
Spacer(modifier = Modifier.size(24.dp))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.size(10.dp))
|
|
||||||
|
|
||||||
Text(
|
|
||||||
stringResource(
|
|
||||||
R.string.translations_show_in_lang_first,
|
|
||||||
Locale(source).displayName,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
scope.launch(Dispatchers.IO) {
|
scope.launch(Dispatchers.IO) {
|
||||||
@@ -279,24 +283,26 @@ private fun TranslationMessage(
|
|||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = {
|
text = {
|
||||||
if (accountViewModel.account.preferenceBetween(source, target) == target) {
|
Row {
|
||||||
Icon(
|
if (accountViewModel.account.preferenceBetween(source, target) == target) {
|
||||||
imageVector = Icons.Default.Check,
|
Icon(
|
||||||
contentDescription = null,
|
imageVector = Icons.Default.Check,
|
||||||
modifier = Modifier.size(24.dp),
|
contentDescription = null,
|
||||||
|
modifier = Modifier.size(24.dp),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Spacer(modifier = Modifier.size(24.dp))
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.size(10.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
stringResource(
|
||||||
|
R.string.translations_show_in_lang_first,
|
||||||
|
Locale(target).displayName,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
Spacer(modifier = Modifier.size(24.dp))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.size(10.dp))
|
|
||||||
|
|
||||||
Text(
|
|
||||||
stringResource(
|
|
||||||
R.string.translations_show_in_lang_first,
|
|
||||||
Locale(target).displayName,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
scope.launch(Dispatchers.IO) {
|
scope.launch(Dispatchers.IO) {
|
||||||
@@ -312,24 +318,26 @@ private fun TranslationMessage(
|
|||||||
languageList.get(i)?.let { lang ->
|
languageList.get(i)?.let { lang ->
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = {
|
text = {
|
||||||
if (lang.language in accountViewModel.account.translateTo) {
|
Row {
|
||||||
Icon(
|
if (lang.language in accountViewModel.account.translateTo) {
|
||||||
imageVector = Icons.Default.Check,
|
Icon(
|
||||||
contentDescription = null,
|
imageVector = Icons.Default.Check,
|
||||||
modifier = Modifier.size(24.dp),
|
contentDescription = null,
|
||||||
|
modifier = Modifier.size(24.dp),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Spacer(modifier = Modifier.size(24.dp))
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.size(10.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
stringResource(
|
||||||
|
R.string.translations_always_translate_to_lang,
|
||||||
|
lang.displayName,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
Spacer(modifier = Modifier.size(24.dp))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.size(10.dp))
|
|
||||||
|
|
||||||
Text(
|
|
||||||
stringResource(
|
|
||||||
R.string.translations_always_translate_to_lang,
|
|
||||||
lang.displayName,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
scope.launch(Dispatchers.IO) {
|
scope.launch(Dispatchers.IO) {
|
||||||
|
|||||||
Reference in New Issue
Block a user