fix: ui issues at contributors and faq
This commit is contained in:
parent
c6938771bd
commit
90effcab89
3 changed files with 12 additions and 9 deletions
|
@ -14,6 +14,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.simplemobiletools.commons.R
|
||||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.settings.SettingsGroupTitle
|
||||
|
@ -55,7 +56,8 @@ internal fun ContributorsScreen(
|
|||
SettingsListItem(
|
||||
text = stringResource(id = R.string.contributors_developers),
|
||||
icon = R.drawable.ic_code_vector,
|
||||
tint = MaterialTheme.colorScheme.onSurface
|
||||
tint = MaterialTheme.colorScheme.onSurface,
|
||||
fontSize = 14.sp
|
||||
)
|
||||
}
|
||||
item {
|
||||
|
|
|
@ -16,7 +16,6 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.graphics.toArgb
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.TextUnit
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
@ -40,10 +39,10 @@ internal fun FAQScreen(
|
|||
SettingsLazyScaffold(
|
||||
title = stringResource(id = R.string.frequently_asked_questions),
|
||||
goBack = goBack,
|
||||
contentPadding = PaddingValues(bottom = 8.dp, start = 38.dp, end = 16.dp),
|
||||
contentPadding = PaddingValues(bottom = 8.dp),
|
||||
) {
|
||||
itemsIndexed(faqItems) { index, faqItem ->
|
||||
Column {
|
||||
Column(modifier = Modifier.fillMaxWidth()) {
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
val text = if (faqItem.title is Int) stringResource(faqItem.title) else faqItem.title as String
|
||||
|
@ -54,8 +53,6 @@ internal fun FAQScreen(
|
|||
.padding(bottom = 6.dp),
|
||||
color = MaterialTheme.colorScheme.primary,
|
||||
lineHeight = 16.sp,
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
)
|
||||
},
|
||||
supportingContent = {
|
||||
|
@ -74,11 +71,12 @@ internal fun FAQScreen(
|
|||
)
|
||||
}
|
||||
},
|
||||
modifier = Modifier.padding(horizontal = 4.dp)
|
||||
)
|
||||
Spacer(modifier = Modifier.padding(bottom = 8.dp))
|
||||
if (index != faqItems.lastIndex) {
|
||||
SettingsHorizontalDivider(modifier = Modifier.padding(bottom = 4.dp))
|
||||
SettingsHorizontalDivider(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = 4.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import androidx.compose.ui.graphics.Color
|
|||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import androidx.compose.ui.unit.TextUnit
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.simplemobiletools.commons.R
|
||||
import com.simplemobiletools.commons.compose.extensions.BooleanPreviewParameterProvider
|
||||
|
@ -26,6 +27,7 @@ import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
|||
fun SettingsListItem(
|
||||
modifier: Modifier = Modifier,
|
||||
text: String,
|
||||
fontSize: TextUnit = TextUnit.Unspecified,
|
||||
@DrawableRes icon: Int? = null,
|
||||
isImage: Boolean = false,
|
||||
click: (() -> Unit)? = null,
|
||||
|
@ -37,7 +39,8 @@ fun SettingsListItem(
|
|||
text = text,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.then(modifier)
|
||||
.then(modifier),
|
||||
fontSize = fontSize
|
||||
)
|
||||
},
|
||||
leadingContent = {
|
||||
|
|
Loading…
Reference in a new issue