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
|
@ -43,3 +43,4 @@
|
|||
- Refactor backup code
|
||||
- Migrate backup flags to not use bitwise
|
||||
- Split it to several smaller classes
|
||||
- Update androidx.compose.material3:material3 to v1.3.0-beta02
|
||||
|
|
|
@ -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,
|
||||
)
|
|
@ -5,7 +5,7 @@ compose-compiler = "1.5.14"
|
|||
[libraries]
|
||||
animation = { module = "androidx.compose.animation:animation", version.ref = "compose" }
|
||||
foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
|
||||
material3 = { module = "androidx.compose.material3:material3", version = "1.2.1" }
|
||||
material3 = { module = "androidx.compose.material3:material3", version = "1.3.0-beta02" }
|
||||
material-motion = { module = "io.github.fornewid:material-motion-compose-core", version = "1.0.7" }
|
||||
ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
|
||||
ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue