Refine UI
This commit is contained in:
@@ -3,6 +3,7 @@ package app.lawnchair.ui.preferences
|
||||
import androidx.compose.animation.ExperimentalAnimationApi
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.ContentAlpha
|
||||
import androidx.compose.material.DropdownMenu
|
||||
import androidx.compose.material.DropdownMenuItem
|
||||
import androidx.compose.material.RadioButton
|
||||
@@ -72,7 +73,12 @@ fun FontSelection(fontPref: BasePreferenceManager.FontPref) {
|
||||
onValueChange = { searchQuery = it },
|
||||
modifier = Modifier
|
||||
.fillMaxSize(),
|
||||
placeholder = { Text(text = stringResource(id = R.string.label_search)) },
|
||||
placeholder = {
|
||||
Text(
|
||||
text = stringResource(id = R.string.label_search),
|
||||
color = MaterialTheme.colorScheme.onSurface.copy(alpha = ContentAlpha.medium),
|
||||
)
|
||||
},
|
||||
singleLine = true
|
||||
)
|
||||
},
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.ContentAlpha
|
||||
import androidx.compose.material.DropdownMenuItem
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
@@ -94,7 +95,12 @@ fun IconPickerPreference(packageName: String) {
|
||||
value = searchQuery,
|
||||
onValueChange = { searchQuery = it },
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
placeholder = { Text(iconPack.label) },
|
||||
placeholder = {
|
||||
Text(
|
||||
text = iconPack.label,
|
||||
color = MaterialTheme.colorScheme.onSurface.copy(alpha = ContentAlpha.medium),
|
||||
)
|
||||
},
|
||||
singleLine = true
|
||||
)
|
||||
},
|
||||
|
||||
@@ -18,6 +18,7 @@ package app.lawnchair.ui.util
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.shape.CornerSize
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.ModalBottomSheetLayout
|
||||
import androidx.compose.material.ModalBottomSheetState
|
||||
@@ -33,6 +34,7 @@ import androidx.compose.ui.unit.dp
|
||||
import com.google.accompanist.insets.LocalWindowInsets
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.math.max
|
||||
import androidx.compose.material.MaterialTheme as Material2Theme
|
||||
|
||||
internal val LocalBottomSheetHandler = staticCompositionLocalOf { BottomSheetHandler() }
|
||||
|
||||
@@ -73,7 +75,11 @@ fun ProvideBottomSheetHandler(
|
||||
}
|
||||
}
|
||||
},
|
||||
sheetState = bottomSheetState
|
||||
sheetState = bottomSheetState,
|
||||
sheetShape = Material2Theme.shapes.large.copy(
|
||||
bottomStart = CornerSize(0.dp),
|
||||
bottomEnd = CornerSize(0.dp),
|
||||
),
|
||||
) {
|
||||
CompositionLocalProvider(LocalBottomSheetHandler provides bottomSheetHandler) {
|
||||
content()
|
||||
|
||||
Reference in New Issue
Block a user