Styling
This commit is contained in:
		
							parent
							
								
									cb3373fa29
								
							
						
					
					
						commit
						9eab533251
					
				
					 5 changed files with 50 additions and 45 deletions
				
			
		|  | @ -32,7 +32,7 @@ fun Headline( | ||||||
| fun DateText(date: String) { | fun DateText(date: String) { | ||||||
|     Text( |     Text( | ||||||
|         text = date, |         text = date, | ||||||
|         fontWeight = FontWeight.Bold, |         fontWeight = FontWeight.Medium, | ||||||
|         fontSize = 20.sp, |         fontSize = 20.sp, | ||||||
|         modifier = Modifier.padding(horizontal = 10.dp) |         modifier = Modifier.padding(horizontal = 10.dp) | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|  | @ -81,7 +81,7 @@ fun FeedWithElements( | ||||||
|                 Text( |                 Text( | ||||||
|                     text = "${HoursMinutesSeconds(totalDayStudyTime)}", |                     text = "${HoursMinutesSeconds(totalDayStudyTime)}", | ||||||
|                     fontSize = 15.sp, |                     fontSize = 15.sp, | ||||||
|                     fontWeight = FontWeight.Bold |                     fontWeight = FontWeight.Medium | ||||||
|                 ) |                 ) | ||||||
|             } |             } | ||||||
|             feedEntries.forEach { feedEntry -> |             feedEntries.forEach { feedEntry -> | ||||||
|  |  | ||||||
|  | @ -56,7 +56,7 @@ fun FeedEntry( | ||||||
|                     ) { |                     ) { | ||||||
|                         Text( |                         Text( | ||||||
|                             text = feedEntry.subJectName, |                             text = feedEntry.subJectName, | ||||||
|                             fontWeight = FontWeight.Bold, |                             fontWeight = FontWeight.Medium, | ||||||
|                             overflow = TextOverflow.Ellipsis, |                             overflow = TextOverflow.Ellipsis, | ||||||
|                             maxLines = 1, |                             maxLines = 1, | ||||||
|                         ) |                         ) | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ import androidx.compose.foundation.layout.* | ||||||
| import androidx.compose.foundation.shape.CircleShape | import androidx.compose.foundation.shape.CircleShape | ||||||
| import androidx.compose.material.Card | import androidx.compose.material.Card | ||||||
| import androidx.compose.material.Icon | import androidx.compose.material.Icon | ||||||
|  | import androidx.compose.material.MaterialTheme | ||||||
| import androidx.compose.material.Text | import androidx.compose.material.Text | ||||||
| import androidx.compose.material.icons.Icons | import androidx.compose.material.icons.Icons | ||||||
| import androidx.compose.material.icons.filled.List | import androidx.compose.material.icons.filled.List | ||||||
|  | @ -65,16 +66,17 @@ fun SubjectEntry( | ||||||
|                 ) { |                 ) { | ||||||
|                     Text( |                     Text( | ||||||
|                         text = subject.name, |                         text = subject.name, | ||||||
|                         fontWeight = FontWeight.Bold, |  | ||||||
|                         overflow = TextOverflow.Ellipsis, |                         overflow = TextOverflow.Ellipsis, | ||||||
|                         maxLines = 1, |                         maxLines = 1, | ||||||
|  |                         fontWeight = FontWeight.Medium | ||||||
|                     ) |                     ) | ||||||
|                     Row( |                     Row( | ||||||
|                         horizontalArrangement = Arrangement.spacedBy(10.dp), |                         horizontalArrangement = Arrangement.spacedBy(10.dp), | ||||||
|                         verticalAlignment = Alignment.CenterVertically, |                         verticalAlignment = Alignment.CenterVertically | ||||||
|                     ) { |                     ) { | ||||||
|                         Text( |                         Text( | ||||||
|                             text = HoursMinutesSeconds(studytime).toString(), |                             text = HoursMinutesSeconds(studytime).toString(), | ||||||
|  |                             color = MaterialTheme.colors.onBackground.copy(alpha = 0.6f) | ||||||
|                         ) |                         ) | ||||||
|                         Row( |                         Row( | ||||||
|                             verticalAlignment = Alignment.CenterVertically, |                             verticalAlignment = Alignment.CenterVertically, | ||||||
|  | @ -82,9 +84,13 @@ fun SubjectEntry( | ||||||
|                         ) { |                         ) { | ||||||
|                             Icon( |                             Icon( | ||||||
|                                 imageVector = Icons.Default.List, |                                 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}") |  | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  | @ -1,10 +1,8 @@ | ||||||
| package be.ugent.sel.studeez.screens.friends.friends_overview | package be.ugent.sel.studeez.screens.friends.friends_overview | ||||||
| 
 | 
 | ||||||
| import androidx.compose.foundation.background |  | ||||||
| import androidx.compose.foundation.layout.* | import androidx.compose.foundation.layout.* | ||||||
| import androidx.compose.foundation.lazy.LazyColumn | import androidx.compose.foundation.lazy.LazyColumn | ||||||
| import androidx.compose.foundation.lazy.items | import androidx.compose.foundation.lazy.items | ||||||
| import androidx.compose.foundation.shape.CircleShape |  | ||||||
| import androidx.compose.material.* | import androidx.compose.material.* | ||||||
| import androidx.compose.material.icons.Icons | import androidx.compose.material.icons.Icons | ||||||
| import androidx.compose.material.icons.filled.ArrowBack | import androidx.compose.material.icons.filled.ArrowBack | ||||||
|  | @ -15,7 +13,6 @@ import androidx.compose.runtime.* | ||||||
| import androidx.compose.ui.Alignment | import androidx.compose.ui.Alignment | ||||||
| import androidx.compose.ui.Modifier | import androidx.compose.ui.Modifier | ||||||
| import androidx.compose.ui.graphics.vector.ImageVector | import androidx.compose.ui.graphics.vector.ImageVector | ||||||
| import androidx.compose.ui.modifier.modifierLocalConsumer |  | ||||||
| import androidx.compose.ui.res.stringResource | import androidx.compose.ui.res.stringResource | ||||||
| import androidx.compose.ui.res.vectorResource | import androidx.compose.ui.res.vectorResource | ||||||
| import androidx.compose.ui.text.style.TextOverflow | 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.R | ||||||
| import be.ugent.sel.studeez.common.composable.BasicButton | import be.ugent.sel.studeez.common.composable.BasicButton | ||||||
| import be.ugent.sel.studeez.common.composable.ProfilePicture | 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.composable.drawer.DrawerEntry | ||||||
| import be.ugent.sel.studeez.common.ext.basicButton | import be.ugent.sel.studeez.common.ext.basicButton | ||||||
| import be.ugent.sel.studeez.data.local.models.Friendship | import be.ugent.sel.studeez.data.local.models.Friendship | ||||||
|  | @ -183,10 +179,12 @@ fun FriendsEntry( | ||||||
|     viewProfile: (String) -> Unit, |     viewProfile: (String) -> Unit, | ||||||
|     removeFriend: (Friendship) -> Unit |     removeFriend: (Friendship) -> Unit | ||||||
| ) { | ) { | ||||||
|  |     Card { | ||||||
|         Row ( |         Row ( | ||||||
|             modifier = Modifier |             modifier = Modifier | ||||||
|                 .fillMaxWidth() |                 .fillMaxWidth() | ||||||
|                 .padding(horizontal = 15.dp, vertical = 7.dp), |                 .padding(horizontal = 15.dp, vertical = 7.dp), | ||||||
|  |             horizontalArrangement = Arrangement.spacedBy(15.dp) | ||||||
|         ) { |         ) { | ||||||
|             Box( |             Box( | ||||||
|                 modifier = Modifier |                 modifier = Modifier | ||||||
|  | @ -229,6 +227,7 @@ fun FriendsEntry( | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @Preview | @Preview | ||||||
|  |  | ||||||
		Reference in a new issue