This commit is contained in:
Tibo De Peuter 2023-05-16 08:44:21 +02:00
parent cb3373fa29
commit 9eab533251
5 changed files with 50 additions and 45 deletions

View file

@ -32,7 +32,7 @@ fun Headline(
fun DateText(date: String) {
Text(
text = date,
fontWeight = FontWeight.Bold,
fontWeight = FontWeight.Medium,
fontSize = 20.sp,
modifier = Modifier.padding(horizontal = 10.dp)
)

View file

@ -81,7 +81,7 @@ fun FeedWithElements(
Text(
text = "${HoursMinutesSeconds(totalDayStudyTime)}",
fontSize = 15.sp,
fontWeight = FontWeight.Bold
fontWeight = FontWeight.Medium
)
}
feedEntries.forEach { feedEntry ->

View file

@ -56,7 +56,7 @@ fun FeedEntry(
) {
Text(
text = feedEntry.subJectName,
fontWeight = FontWeight.Bold,
fontWeight = FontWeight.Medium,
overflow = TextOverflow.Ellipsis,
maxLines = 1,
)

View file

@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Card
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.List
@ -65,16 +66,17 @@ fun SubjectEntry(
) {
Text(
text = subject.name,
fontWeight = FontWeight.Bold,
overflow = TextOverflow.Ellipsis,
maxLines = 1,
fontWeight = FontWeight.Medium
)
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp),
verticalAlignment = Alignment.CenterVertically,
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = HoursMinutesSeconds(studytime).toString(),
color = MaterialTheme.colors.onBackground.copy(alpha = 0.6f)
)
Row(
verticalAlignment = Alignment.CenterVertically,
@ -82,9 +84,13 @@ fun SubjectEntry(
) {
Icon(
imageVector = Icons.Default.List,
contentDescription = stringResource(id = AppText.tasks)
contentDescription = stringResource(id = AppText.tasks),
tint = MaterialTheme.colors.onBackground.copy(alpha = 0.6f)
)
Text(
text = "${completedTaskCount}/${taskCount}",
color = MaterialTheme.colors.onBackground.copy(alpha = 0.6f)
)
Text(text = "${completedTaskCount}/${taskCount}")
}
}
}

View file

@ -1,10 +1,8 @@
package be.ugent.sel.studeez.screens.friends.friends_overview
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
@ -15,7 +13,6 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.modifier.modifierLocalConsumer
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextOverflow
@ -25,7 +22,6 @@ import androidx.compose.ui.unit.sp
import be.ugent.sel.studeez.R
import be.ugent.sel.studeez.common.composable.BasicButton
import be.ugent.sel.studeez.common.composable.ProfilePicture
import be.ugent.sel.studeez.common.composable.SearchField
import be.ugent.sel.studeez.common.composable.drawer.DrawerEntry
import be.ugent.sel.studeez.common.ext.basicButton
import be.ugent.sel.studeez.data.local.models.Friendship
@ -183,49 +179,52 @@ fun FriendsEntry(
viewProfile: (String) -> Unit,
removeFriend: (Friendship) -> Unit
) {
Row (
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 15.dp, vertical = 7.dp),
) {
Box(
modifier = Modifier
.padding(vertical = 4.dp)
) {
ProfilePicture()
}
Box (
Card {
Row (
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 15.dp, vertical = 7.dp),
horizontalArrangement = Arrangement.spacedBy(15.dp)
) {
Column (
Box(
modifier = Modifier
.padding(vertical = 4.dp)
) {
Text(
text = user.username,
fontSize = 16.sp,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
Text(
text = "${resources().getString(AppText.app_name)} ${resources().getString(AppText.friend)}",
fontSize = 14.sp,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
ProfilePicture()
}
Box(
modifier = Modifier.fillMaxWidth(),
contentAlignment = Alignment.CenterEnd
Box (
modifier = Modifier
.fillMaxWidth()
) {
FriendsOverviewDropDown(
friendship = friendship,
viewProfile = viewProfile,
removeFriend = removeFriend
)
Column (
modifier = Modifier
.padding(vertical = 4.dp)
) {
Text(
text = user.username,
fontSize = 16.sp,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
Text(
text = "${resources().getString(AppText.app_name)} ${resources().getString(AppText.friend)}",
fontSize = 14.sp,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
}
Box(
modifier = Modifier.fillMaxWidth(),
contentAlignment = Alignment.CenterEnd
) {
FriendsOverviewDropDown(
friendship = friendship,
viewProfile = viewProfile,
removeFriend = removeFriend
)
}
}
}
}