mirror of
https://github.com/YTVanced/VancedManager
synced 2024-12-01 07:23:02 +00:00
improve installation preferences UI
This commit is contained in:
parent
4717c8da4a
commit
ea8b359e9e
4 changed files with 20 additions and 10 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.vanced.manager.ui.component.layout
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.LazyListScope
|
||||
import androidx.compose.runtime.Composable
|
||||
|
@ -8,10 +9,12 @@ import androidx.compose.ui.Modifier
|
|||
@Composable
|
||||
fun ManagerLazyColumn(
|
||||
modifier: Modifier = Modifier,
|
||||
contentPadding: PaddingValues = PaddingValues(),
|
||||
content: LazyListScope.() -> Unit
|
||||
) {
|
||||
LazyColumn(
|
||||
modifier = modifier,
|
||||
contentPadding = contentPadding,
|
||||
content = content
|
||||
)
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import androidx.compose.runtime.saveable.rememberSaveable
|
|||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.domain.model.InstallationOption
|
||||
import com.vanced.manager.ui.component.card.ManagerTonalCard
|
||||
|
@ -102,7 +103,13 @@ fun InstallPreferencesScreen(
|
|||
text = managerString(installationOption.itemTitleId),
|
||||
textStyle = MaterialTheme.typography.titleLarge,
|
||||
)
|
||||
ManagerLazyColumn {
|
||||
ManagerLazyColumn(
|
||||
contentPadding = PaddingValues(
|
||||
start = 4.dp,
|
||||
end = 4.dp,
|
||||
bottom = DefaultContentPaddingVertical
|
||||
)
|
||||
) {
|
||||
when (installationOption) {
|
||||
is InstallationOption.MultiSelect -> {
|
||||
items(installationOption.items) { item ->
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package com.vanced.manager.ui.widget.list
|
||||
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.vanced.manager.ui.component.color.managerTextColor
|
||||
import com.vanced.manager.ui.component.list.ManagerSelectableListItem
|
||||
import com.vanced.manager.ui.component.modifier.managerClickable
|
||||
import com.vanced.manager.ui.component.text.ManagerText
|
||||
import com.vanced.manager.ui.widget.checkbox.ManagerAnimatedCheckbox
|
||||
|
||||
@Composable
|
||||
|
@ -24,10 +24,10 @@ fun CheckboxItem(
|
|||
modifier = modifier
|
||||
.managerClickable(onClick = toggle),
|
||||
title = {
|
||||
Text(
|
||||
ManagerText(
|
||||
text = text,
|
||||
color = managerTextColor(),
|
||||
fontSize = 18.sp
|
||||
textStyle = MaterialTheme.typography.titleSmall
|
||||
)
|
||||
},
|
||||
trailing = {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package com.vanced.manager.ui.widget.list
|
||||
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.vanced.manager.ui.component.color.managerTextColor
|
||||
import com.vanced.manager.ui.component.list.ManagerSelectableListItem
|
||||
import com.vanced.manager.ui.component.modifier.managerClickable
|
||||
import com.vanced.manager.ui.component.text.ManagerText
|
||||
import com.vanced.manager.ui.widget.radiobutton.ManagerAnimatedRadiobutton
|
||||
|
||||
@Composable
|
||||
|
@ -21,13 +21,13 @@ fun <T> RadiobuttonItem(
|
|||
) {
|
||||
val onClick = { onSelect(tag) }
|
||||
ManagerSelectableListItem(
|
||||
modifier = Modifier
|
||||
modifier = modifier
|
||||
.managerClickable(onClick = onClick),
|
||||
title = {
|
||||
Text(
|
||||
ManagerText(
|
||||
text = text,
|
||||
color = managerTextColor(),
|
||||
fontSize = 18.sp
|
||||
textStyle = MaterialTheme.typography.titleSmall
|
||||
)
|
||||
},
|
||||
trailing = {
|
||||
|
|
Loading…
Reference in a new issue