mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add colours to resources
This commit is contained in:
parent
2ff12a70ad
commit
7e1eefb4e7
2 changed files with 9 additions and 2 deletions
|
|
@ -13,10 +13,12 @@ import androidx.compose.ui.Alignment
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.colorResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.*
|
||||
import app.omnivore.omnivore.R
|
||||
import app.omnivore.omnivore.persistence.entities.SavedItemCardData
|
||||
import app.omnivore.omnivore.persistence.entities.SavedItemLabel
|
||||
import app.omnivore.omnivore.ui.components.LabelChipColors
|
||||
|
|
@ -210,7 +212,9 @@ fun readingProgress(item: SavedItemCardData): String {
|
|||
@Composable
|
||||
fun readInfo(item: SavedItemCardData) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().defaultMinSize(minHeight = 15.dp)
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.defaultMinSize(minHeight = 15.dp)
|
||||
) {
|
||||
Text(
|
||||
text = estimatedReadingTime(item),
|
||||
|
|
@ -228,7 +232,7 @@ fun readInfo(item: SavedItemCardData) {
|
|||
style = TextStyle(
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
color = if (item.readingProgress > 1) Color(red = 85, green = 185, blue = 56) else Color(red = 137, green = 137, blue = 137)
|
||||
color = if (item.readingProgress > 1) colorResource(R.color.green_55B938) else colorResource(R.color.gray_898989)
|
||||
),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
|
|
|
|||
|
|
@ -4,4 +4,7 @@
|
|||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="cloud">#F7F7F7</color>
|
||||
<color name="gray_B7B7B7">#B7B7B7</color>
|
||||
|
||||
<color name="gray_898989">#898989</color>
|
||||
<color name="green_55B938">#55B938</color>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in a new issue