Improve FeedTab global behaviour and looking

This commit is contained in:
Shinokuni 2024-01-12 21:23:20 +01:00
parent 7d17740713
commit 76cff80e68
3 changed files with 17 additions and 6 deletions

View File

@ -22,6 +22,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextOverflow
import coil.compose.AsyncImage
import com.readrops.app.compose.R
import com.readrops.app.compose.util.theme.LargeSpacer
@ -65,6 +66,8 @@ fun FeedModalBottomSheet(
Text(
text = feed.name!!,
style = MaterialTheme.typography.headlineSmall,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
if (folder != null) {
@ -72,7 +75,7 @@ fun FeedModalBottomSheet(
Text(
text = folder.name!!,
style = MaterialTheme.typography.labelSmall
style = MaterialTheme.typography.labelLarge
)
}
}
@ -127,6 +130,7 @@ fun BottomSheetOption(
modifier = Modifier.clickable { onClick() }
) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.padding(

View File

@ -12,9 +12,10 @@ import androidx.compose.material3.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.text.style.TextOverflow
import coil.compose.AsyncImage
import com.readrops.app.compose.util.theme.ShortSpacer
import com.readrops.app.compose.util.theme.spacing
import com.readrops.app.compose.util.toDp
import com.readrops.db.entities.Feed
@ -35,7 +36,7 @@ fun FeedItem(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.padding(8.dp)
.padding(MaterialTheme.spacing.shortSpacing)
) {
AsyncImage(
model = feed.iconUrl,
@ -47,7 +48,9 @@ fun FeedItem(
Text(
text = feed.name!!,
style = MaterialTheme.typography.bodyLarge
style = MaterialTheme.typography.bodyLarge,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
}
}

View File

@ -24,6 +24,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.rotate
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextOverflow
import com.readrops.app.compose.R
import com.readrops.app.compose.util.theme.MediumSpacer
import com.readrops.app.compose.util.theme.spacing
@ -67,6 +68,7 @@ fun FolderExpandableItem(
) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.weight(1f)
) {
Icon(
painter = painterResource(R.drawable.ic_folder_grey),
@ -77,7 +79,9 @@ fun FolderExpandableItem(
Text(
text = folder.name!!,
style = MaterialTheme.typography.headlineSmall
style = MaterialTheme.typography.headlineSmall,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
}
@ -86,7 +90,7 @@ fun FolderExpandableItem(
imageVector = Icons.Default.ArrowDropDown,
contentDescription = null,
modifier = Modifier
.rotate(rotationState),
.rotate(rotationState)
)
}
}