mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
style: Fix styling
This commit is contained in:
parent
9d0cefa11f
commit
981c92043f
4 changed files with 25 additions and 12 deletions
|
@ -4,7 +4,6 @@ import android.text.format.Formatter
|
|||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.material3.LinearProgressIndicator
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
|
@ -14,9 +13,9 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import dev.yokai.presentation.core.util.secondaryItemAlpha
|
||||
import dev.yokai.presentation.theme.Size
|
||||
import dev.yokai.presentation.theme.header
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
||||
import java.io.File
|
||||
|
@ -54,15 +53,7 @@ private fun StorageInfo(
|
|||
) {
|
||||
Text(
|
||||
text = file.absolutePath,
|
||||
style = MaterialTheme.typography.headlineMedium,
|
||||
)
|
||||
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier
|
||||
.clip(MaterialTheme.shapes.small)
|
||||
.fillMaxWidth()
|
||||
.height(12.dp),
|
||||
progress = { (1 - (available / total.toFloat())) },
|
||||
style = MaterialTheme.typography.header,
|
||||
)
|
||||
|
||||
Text(
|
||||
|
@ -70,5 +61,12 @@ private fun StorageInfo(
|
|||
modifier = Modifier.secondaryItemAlpha(),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
)
|
||||
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier
|
||||
.clip(MaterialTheme.shapes.small)
|
||||
.fillMaxWidth(),
|
||||
progress = { (1 - (available / total.toFloat())) },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
14
app/src/main/java/dev/yokai/presentation/theme/Typography.kt
Normal file
14
app/src/main/java/dev/yokai/presentation/theme/Typography.kt
Normal file
|
@ -0,0 +1,14 @@
|
|||
package dev.yokai.presentation.theme
|
||||
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
|
||||
val Typography.header: TextStyle
|
||||
@Composable
|
||||
get() = bodyMedium.copy(
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue