Skip to content

Commit

Permalink
💄 More UI changes
Browse files Browse the repository at this point in the history
Let's make it prettier!
  • Loading branch information
igorescodro committed Sep 27, 2022
1 parent 2df2c6a commit ffff11c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/com/escodro/alkaa/presentation/home/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ private fun AlkaaTopBar(currentSection: HomeSection) {
CenterAlignedTopAppBar(
title = {
Text(
style = MaterialTheme.typography.headlineSmall.copy(fontWeight = FontWeight.Thin),
text = stringResource(currentSection.title)
style = MaterialTheme.typography.headlineMedium.copy(fontWeight = FontWeight.Light),
text = stringResource(currentSection.title),
color = MaterialTheme.colorScheme.tertiary
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ private fun CategorySheetContent(
modifier = Modifier
.fillMaxWidth()
.height(256.dp)
.background(MaterialTheme.colorScheme.surface) // Accompanist does not support M3 yet
.padding(16.dp),
verticalArrangement = Arrangement.SpaceAround
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private fun CategoryItemChip(
onCategoryChange(newCategory?.id)
}
)
.padding(horizontal = 8.dp)
) {
Text(
modifier = Modifier.padding(8.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private fun TaskDescriptionTextField(text: String?, onDescriptionChange: (String
onDescriptionChange(it.text)
textState.value = it
},
textStyle = MaterialTheme.typography.bodyMedium,
textStyle = MaterialTheme.typography.bodyLarge,
colors = TextFieldDefaults.textFieldColors(
containerColor = MaterialTheme.colorScheme.surface
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.escodro.tracker.presentation
import androidx.compose.animation.Crossfade
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
Expand Down Expand Up @@ -47,8 +48,8 @@ internal fun TrackerLoader(viewModel: TrackerViewModel = getViewModel(), onUpPre
viewModel.loadTracker()
}.collectAsState(initial = TrackerViewState.Loading)

Scaffold(topBar = { AlkaaToolbar(onUpPress = onUpPress) }) {
Crossfade(data) { state ->
Scaffold(topBar = { AlkaaToolbar(onUpPress = onUpPress) }) { paddingValues ->
Crossfade(targetState = data, modifier = Modifier.padding(paddingValues)) { state ->
when (state) {
TrackerViewState.Empty -> TrackerEmpty()
is TrackerViewState.Error -> TrackerError()
Expand Down Expand Up @@ -115,7 +116,7 @@ private fun TaskTrackerInfoCard(list: List<Tracker.CategoryInfo>, modifier: Modi
.getQuantityString(R.plurals.tracker_message_title, taskCount, taskCount)

ElevatedCard(modifier = modifier.fillMaxWidth()) {
Row(verticalAlignment = Alignment.CenterVertically) {
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxSize()) {
Icon(
imageVector = Icons.Default.DynamicFeed,
contentDescription = stringResource(id = R.string.tracker_cp_info_icon),
Expand Down

0 comments on commit ffff11c

Please sign in to comment.