UI adjustments
This commit is contained in:
parent
a2a4057ac6
commit
c84807d723
|
@ -10,6 +10,7 @@ import androidx.compose.ui.window.Dialog
|
|||
import com.vanced.manager.ui.component.card.ManagerCard
|
||||
import com.vanced.manager.ui.component.text.ManagerText
|
||||
import com.vanced.manager.ui.util.defaultContentPaddingHorizontal
|
||||
import com.vanced.manager.ui.util.defaultContentPaddingVertical
|
||||
|
||||
@Composable
|
||||
fun ManagerDialog(
|
||||
|
@ -47,7 +48,7 @@ fun ManagerDialog(
|
|||
ManagerCard {
|
||||
Column(
|
||||
modifier = Modifier.padding(defaultContentPaddingHorizontal),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
verticalArrangement = Arrangement.spacedBy(defaultContentPaddingVertical)
|
||||
) {
|
||||
title()
|
||||
content()
|
||||
|
|
|
@ -1,2 +1,39 @@
|
|||
package com.vanced.manager.ui.component.list
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
@Composable
|
||||
fun ManagerSelectableListItem(
|
||||
modifier: Modifier = Modifier,
|
||||
title: @Composable () -> Unit,
|
||||
trailing: @Composable (() -> Unit)
|
||||
) {
|
||||
Row(
|
||||
modifier = modifier
|
||||
.padding(vertical = 8.dp, horizontal = 6.dp)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.padding(horizontal = 6.dp)
|
||||
.align(Alignment.CenterVertically),
|
||||
) {
|
||||
title()
|
||||
}
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(30.dp)
|
||||
.align(Alignment.CenterVertically),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
trailing()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@ import com.vanced.manager.R
|
|||
import com.vanced.manager.preferences.CheckboxPreference
|
||||
import com.vanced.manager.preferences.ManagerPreference
|
||||
import com.vanced.manager.ui.component.button.ManagerThemedTextButton
|
||||
import com.vanced.manager.ui.component.list.CheckboxItem
|
||||
import com.vanced.manager.ui.widget.list.CheckboxItem
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
|
|
|
@ -8,7 +8,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.unit.dp
|
||||
import com.vanced.manager.preferences.ManagerPreference
|
||||
import com.vanced.manager.preferences.RadioButtonPreference
|
||||
import com.vanced.manager.ui.component.list.RadiobuttonItem
|
||||
import com.vanced.manager.ui.widget.list.RadiobuttonItem
|
||||
import com.vanced.manager.ui.widget.button.ManagerSaveButton
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ val typography = Typography(
|
|||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 12.sp,
|
||||
),
|
||||
subtitle2 = TextStyle(
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 14.sp
|
||||
),
|
||||
button = TextStyle(
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Medium
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package com.vanced.manager.ui.component.list
|
||||
package com.vanced.manager.ui.widget.list
|
||||
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.vanced.manager.ui.component.checkbox.ManagerCheckbox
|
||||
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.widget.checkbox.ManagerAnimatedCheckbox
|
||||
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package com.vanced.manager.ui.component.list
|
||||
package com.vanced.manager.ui.widget.list
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
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.radiobutton.ManagerRadiobutton
|
||||
import com.vanced.manager.ui.widget.radiobutton.ManagerAnimatedRadiobutton
|
||||
|
||||
@Composable
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
package com.vanced.manager.ui.widget.screens.home.apps.dialog
|
||||
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.downloader.base.AppDownloader
|
||||
import com.vanced.manager.ui.component.dialog.ManagerDialog
|
||||
import com.vanced.manager.ui.component.text.ManagerText
|
||||
import com.vanced.manager.ui.widget.button.ManagerCancelButton
|
||||
import com.vanced.manager.ui.widget.screens.home.download.AppDownloadDialogProgress
|
||||
|
||||
|
@ -19,6 +26,12 @@ fun AppDownloadDialog(
|
|||
ManagerCancelButton(onClick = onCancelClick)
|
||||
}
|
||||
) {
|
||||
ManagerText(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
text = stringResource(id = R.string.app_download_dialog_subtitle),
|
||||
textStyle = MaterialTheme.typography.subtitle2,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
AppDownloadDialogProgress(
|
||||
progress = downloader.downloadProgress,
|
||||
file = downloader.downloadFile,
|
||||
|
|
Loading…
Reference in New Issue