Revert "Rename global property Dimens
to dimens
"
This reverts commit c920a989f3
.
This commit is contained in:
parent
c920a989f3
commit
fb517bd963
12 changed files with 47 additions and 47 deletions
|
@ -14,7 +14,7 @@ import androidx.compose.ui.unit.dp
|
|||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.extensions.rememberMutableInteractionSource
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
import com.simplemobiletools.commons.dialogs.dialogTextColor
|
||||
|
||||
@Composable
|
||||
|
@ -47,7 +47,7 @@ fun RadioButtonDialogComponent(
|
|||
)
|
||||
Text(
|
||||
text = item,
|
||||
modifier = Modifier.padding(start = dimens.margin.medium),
|
||||
modifier = Modifier.padding(start = Dimens.margin.medium),
|
||||
color = dialogTextColor
|
||||
)
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.simplemobiletools.commons.compose.components.SimpleDropDownMenuItem
|
|||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.extensions.rememberMutableInteractionSource
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Shapes
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
|
@ -96,7 +96,7 @@ fun ActionMenu(
|
|||
Text(
|
||||
text = name,
|
||||
fontSize = 14.sp,
|
||||
modifier = Modifier.padding(dimens.margin.medium),
|
||||
modifier = Modifier.padding(Dimens.margin.medium),
|
||||
)
|
||||
}
|
||||
},
|
||||
|
@ -125,7 +125,7 @@ fun ActionMenu(
|
|||
Text(
|
||||
text = stringResource(id = R.string.more_options),
|
||||
fontSize = 14.sp,
|
||||
modifier = Modifier.padding(dimens.margin.medium),
|
||||
modifier = Modifier.padding(Dimens.margin.medium),
|
||||
)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -24,7 +24,7 @@ import com.simplemobiletools.commons.compose.settings.SettingsListItem
|
|||
import com.simplemobiletools.commons.compose.settings.SettingsTitleTextComponent
|
||||
import com.simplemobiletools.commons.compose.settings.scaffold.SettingsLazyScaffold
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
import com.simplemobiletools.commons.models.LanguageContributor
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
|
@ -65,7 +65,7 @@ internal fun ContributorsScreen(
|
|||
)
|
||||
}
|
||||
item {
|
||||
Spacer(modifier = Modifier.padding(vertical = dimens.margin.medium))
|
||||
Spacer(modifier = Modifier.padding(vertical = Dimens.margin.medium))
|
||||
}
|
||||
item {
|
||||
SettingsHorizontalDivider()
|
||||
|
@ -94,7 +94,7 @@ internal fun ContributorsScreen(
|
|||
)
|
||||
}
|
||||
item {
|
||||
Spacer(modifier = Modifier.padding(bottom = dimens.margin.medium))
|
||||
Spacer(modifier = Modifier.padding(bottom = Dimens.margin.medium))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,8 @@ private fun ContributorItem(
|
|||
},
|
||||
leadingContent = {
|
||||
val imageSize = Modifier
|
||||
.size(dimens.icon.medium)
|
||||
.padding(dimens.margin.medium)
|
||||
.size(Dimens.icon.medium)
|
||||
.padding(Dimens.margin.medium)
|
||||
Image(
|
||||
modifier = imageSize,
|
||||
painter = painterResource(id = languageContributor.iconId),
|
||||
|
|
|
@ -25,7 +25,7 @@ import com.simplemobiletools.commons.compose.extensions.MyDevices
|
|||
import com.simplemobiletools.commons.compose.settings.SettingsHorizontalDivider
|
||||
import com.simplemobiletools.commons.compose.settings.scaffold.SettingsLazyScaffold
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
import com.simplemobiletools.commons.extensions.removeUnderlines
|
||||
import com.simplemobiletools.commons.models.FAQItem
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
@ -39,7 +39,7 @@ internal fun FAQScreen(
|
|||
SettingsLazyScaffold(
|
||||
title = stringResource(id = R.string.frequently_asked_questions),
|
||||
goBack = goBack,
|
||||
contentPadding = PaddingValues(bottom = dimens.margin.medium)
|
||||
contentPadding = PaddingValues(bottom = Dimens.margin.medium)
|
||||
) {
|
||||
itemsIndexed(faqItems) { index, faqItem ->
|
||||
Column(modifier = Modifier.fillMaxWidth()) {
|
||||
|
@ -72,12 +72,12 @@ internal fun FAQScreen(
|
|||
}
|
||||
},
|
||||
)
|
||||
Spacer(modifier = Modifier.padding(bottom = dimens.margin.medium))
|
||||
Spacer(modifier = Modifier.padding(bottom = Dimens.margin.medium))
|
||||
if (index != faqItems.lastIndex) {
|
||||
SettingsHorizontalDivider(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = dimens.margin.small)
|
||||
.padding(bottom = Dimens.margin.small)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import com.simplemobiletools.commons.compose.extensions.MyDevices
|
|||
import com.simplemobiletools.commons.compose.settings.SettingsHorizontalDivider
|
||||
import com.simplemobiletools.commons.compose.settings.scaffold.SettingsLazyScaffold
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.models.License
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
@ -36,7 +36,7 @@ internal fun LicenseScreen(
|
|||
Column {
|
||||
LicenseItem(license, onLicenseClick)
|
||||
if (index != thirdPartyLicenses.lastIndex) {
|
||||
SettingsHorizontalDivider(modifier = Modifier.padding(bottom = dimens.margin.small))
|
||||
SettingsHorizontalDivider(modifier = Modifier.padding(bottom = Dimens.margin.small))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ private fun LicenseItem(
|
|||
}, supportingContent = {
|
||||
Text(
|
||||
text = stringResource(id = license.textId),
|
||||
modifier = Modifier.padding(top = dimens.margin.extraSmall),
|
||||
modifier = Modifier.padding(top = Dimens.margin.extraSmall),
|
||||
)
|
||||
}, colors = ListItemDefaults.colors(headlineColor = MaterialTheme.colorScheme.primary, supportingColor = MaterialTheme.colorScheme.onSurface))
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ internal fun ManageBlockedNumbersScreen(
|
|||
onEdit: (BlockedNumber) -> Unit,
|
||||
onCopy: (BlockedNumber) -> Unit,
|
||||
) {
|
||||
val dimens = dimens
|
||||
val dimens = Dimens
|
||||
val startingPadding = remember { Modifier.padding(horizontal = dimens.margin.small) }
|
||||
val selectedIds: MutableState<Set<Long>> = rememberSaveable { mutableStateOf(emptySet()) }
|
||||
val hapticFeedback = LocalHapticFeedback.current
|
||||
|
@ -193,7 +193,7 @@ internal fun ManageBlockedNumbersScreen(
|
|||
ids = blockedNumbers?.map { blockedNumber -> blockedNumber.id }.orEmpty()
|
||||
)
|
||||
},
|
||||
verticalArrangement = Arrangement.spacedBy(com.simplemobiletools.commons.compose.theme.dimens.margin.extraSmall),
|
||||
verticalArrangement = Arrangement.spacedBy(Dimens.margin.extraSmall),
|
||||
contentPadding = PaddingValues(bottom = paddingValues.calculateBottomPadding())
|
||||
) {
|
||||
when {
|
||||
|
@ -323,7 +323,7 @@ private fun BlockedNumber(
|
|||
movableContentOf {
|
||||
Text(
|
||||
text = blockedNumber.contactName.toString(),
|
||||
modifier = modifier.padding(horizontal = dimens.margin.medium, vertical = dimens.margin.extraSmall)
|
||||
modifier = modifier.padding(horizontal = Dimens.margin.medium, vertical = Dimens.margin.extraSmall)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ private fun blockedNumberListItemColors(
|
|||
private fun BlockedNumberHeadlineContent(modifier: Modifier = Modifier, blockedNumber: BlockedNumber, hasContactName: Boolean) {
|
||||
Text(
|
||||
text = blockedNumber.number,
|
||||
modifier = modifier.padding(horizontal = dimens.margin.medium),
|
||||
modifier = modifier.padding(horizontal = Dimens.margin.medium),
|
||||
color = if (hasContactName) LocalContentColor.current.copy(alpha = 0.7f) else LocalContentColor.current
|
||||
)
|
||||
}
|
||||
|
@ -547,7 +547,7 @@ private fun NonActionModeToolbar(
|
|||
title = { scrolledTextColor ->
|
||||
Text(
|
||||
text = stringResource(id = R.string.manage_blocked_numbers),
|
||||
modifier = Modifier.padding(start = dimens.margin.extraLarge),
|
||||
modifier = Modifier.padding(start = Dimens.margin.extraLarge),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
color = scrolledTextColor
|
||||
|
@ -583,8 +583,8 @@ private fun LazyListScope.emptyBlockedNumbers(
|
|||
style = TextStyle(fontStyle = FontStyle.Italic, textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.onSurface),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(top = dimens.margin.extraLarge, bottom = dimens.margin.small)
|
||||
.padding(horizontal = dimens.margin.extraLarge)
|
||||
.padding(top = Dimens.margin.extraLarge, bottom = Dimens.margin.small)
|
||||
.padding(horizontal = Dimens.margin.extraLarge)
|
||||
)
|
||||
}
|
||||
item {
|
||||
|
@ -605,7 +605,7 @@ private fun LazyListScope.emptyBlockedNumbers(
|
|||
color = MaterialTheme.colorScheme.primary,
|
||||
fontSize = 18.sp
|
||||
),
|
||||
modifier = Modifier.padding(dimens.margin.medium)
|
||||
modifier = Modifier.padding(Dimens.margin.medium)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -621,8 +621,8 @@ private fun LazyListScope.noPermissionToBlock(
|
|||
style = TextStyle(fontStyle = FontStyle.Italic, textAlign = TextAlign.Center),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(top = dimens.margin.extraLarge)
|
||||
.padding(horizontal = dimens.margin.extraLarge)
|
||||
.padding(top = Dimens.margin.extraLarge)
|
||||
.padding(horizontal = Dimens.margin.extraLarge)
|
||||
)
|
||||
}
|
||||
item {
|
||||
|
@ -643,7 +643,7 @@ private fun LazyListScope.noPermissionToBlock(
|
|||
color = MaterialTheme.colorScheme.primary,
|
||||
fontSize = 18.sp
|
||||
),
|
||||
modifier = Modifier.padding(dimens.margin.extraLarge)
|
||||
modifier = Modifier.padding(Dimens.margin.extraLarge)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import com.simplemobiletools.commons.compose.extensions.MyDevices
|
|||
import com.simplemobiletools.commons.compose.extensions.NoRippleTheme
|
||||
import com.simplemobiletools.commons.compose.extensions.rememberMutableInteractionSource
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
import com.simplemobiletools.commons.compose.theme.preferenceLabelColor
|
||||
import com.simplemobiletools.commons.compose.theme.preferenceValueColor
|
||||
|
||||
|
@ -54,7 +54,7 @@ fun SettingsCheckBoxComponent(
|
|||
Text(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(end = dimens.margin.extraLarge),
|
||||
.padding(end = Dimens.margin.extraLarge),
|
||||
text = label,
|
||||
color = preferenceLabelColor(isEnabled = isPreferenceEnabled),
|
||||
fontSize = 14.sp
|
||||
|
@ -64,7 +64,7 @@ fun SettingsCheckBoxComponent(
|
|||
text = value.toString(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(end = dimens.margin.extraLarge),
|
||||
.padding(end = Dimens.margin.extraLarge),
|
||||
color = preferenceValueColor(isEnabled = isPreferenceEnabled),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import androidx.compose.ui.Alignment
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
|
||||
@Composable
|
||||
fun SettingsGroup(
|
||||
|
@ -35,7 +35,7 @@ fun SettingsGroupTitle(
|
|||
Box(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = dimens.margin.extraLarge),
|
||||
.padding(horizontal = Dimens.margin.extraLarge),
|
||||
contentAlignment = Alignment.CenterStart
|
||||
) {
|
||||
val primary = MaterialTheme.colorScheme.primary
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.simplemobiletools.commons.R
|
|||
import com.simplemobiletools.commons.compose.extensions.BooleanPreviewParameterProvider
|
||||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
|
||||
@Composable
|
||||
fun SettingsListItem(
|
||||
|
@ -50,8 +50,8 @@ fun SettingsListItem(
|
|||
},
|
||||
leadingContent = {
|
||||
val imageSize = Modifier
|
||||
.size(dimens.icon.medium)
|
||||
.padding(dimens.margin.medium)
|
||||
.size(Dimens.icon.medium)
|
||||
.padding(Dimens.margin.medium)
|
||||
when {
|
||||
icon != null && isImage && tint != null -> Image(
|
||||
modifier = imageSize,
|
||||
|
@ -106,8 +106,8 @@ fun SettingsListItem(
|
|||
},
|
||||
leadingContent = {
|
||||
val imageSize = Modifier
|
||||
.size(dimens.icon.medium)
|
||||
.padding(dimens.margin.medium)
|
||||
.size(Dimens.icon.medium)
|
||||
.padding(Dimens.margin.medium)
|
||||
when {
|
||||
icon != null && isImage && tint != null -> Image(
|
||||
modifier = imageSize,
|
||||
|
|
|
@ -11,7 +11,7 @@ import androidx.compose.ui.text.style.TextOverflow
|
|||
import androidx.compose.ui.unit.sp
|
||||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
|
||||
@Composable
|
||||
fun SettingsTitleTextComponent(
|
||||
|
@ -21,11 +21,11 @@ fun SettingsTitleTextComponent(
|
|||
maxLines: Int = 1,
|
||||
overflow: TextOverflow = TextOverflow.Ellipsis
|
||||
) {
|
||||
Box(modifier = Modifier.padding(top = dimens.margin.extraLarge)) {
|
||||
Box(modifier = Modifier.padding(top = Dimens.margin.extraLarge)) {
|
||||
Text(
|
||||
text = text.uppercase(),
|
||||
modifier = modifier
|
||||
.padding(horizontal = dimens.margin.small),
|
||||
.padding(horizontal = Dimens.margin.small),
|
||||
color = color,
|
||||
fontSize = 14.sp,
|
||||
maxLines = maxLines,
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.simplemobiletools.commons.R
|
|||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.extensions.rememberMutableInteractionSource
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.dimens
|
||||
import com.simplemobiletools.commons.compose.theme.Dimens
|
||||
|
||||
@Composable
|
||||
fun SettingsScaffoldTopBar(
|
||||
|
@ -39,7 +39,7 @@ fun SettingsScaffoldTopBar(
|
|||
Text(
|
||||
text = title,
|
||||
modifier = Modifier
|
||||
.padding(start = dimens.margin.medium)
|
||||
.padding(start = Dimens.margin.medium)
|
||||
.fillMaxWidth(),
|
||||
color = scrolledColor,
|
||||
maxLines = 1,
|
||||
|
@ -157,7 +157,7 @@ fun SettingsNavigationIcon(
|
|||
) {
|
||||
Box(
|
||||
modifier
|
||||
.padding(start = dimens.margin.medium)
|
||||
.padding(start = Dimens.margin.medium)
|
||||
.clip(RoundedCornerShape(50))
|
||||
.clickable(
|
||||
navigationIconInteractionSource, rememberRipple(
|
||||
|
@ -175,13 +175,13 @@ fun BackIcon(iconColor: Color?) {
|
|||
if (iconColor == null) {
|
||||
Icon(
|
||||
imageVector = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(id = R.string.back),
|
||||
modifier = Modifier.padding(dimens.margin.small)
|
||||
modifier = Modifier.padding(Dimens.margin.small)
|
||||
)
|
||||
} else {
|
||||
Icon(
|
||||
imageVector = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(id = R.string.back),
|
||||
tint = iconColor,
|
||||
modifier = Modifier.padding(dimens.margin.small)
|
||||
modifier = Modifier.padding(Dimens.margin.small)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import androidx.compose.runtime.staticCompositionLocalOf
|
|||
import androidx.compose.ui.unit.dp
|
||||
import com.simplemobiletools.commons.compose.theme.model.Dimensions
|
||||
|
||||
val dimens: Dimensions
|
||||
val Dimens: Dimensions
|
||||
@Composable
|
||||
@ReadOnlyComposable
|
||||
get() = LocalDimensions.current
|
||||
|
|
Loading…
Reference in a new issue