Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.cornellappdev.android.eatery.R
import com.cornellappdev.android.eatery.ui.components.general.MealFilter
import com.cornellappdev.android.eatery.ui.theme.EateryBlue
import com.cornellappdev.android.eatery.ui.theme.EateryBlueTypography
import com.cornellappdev.android.eatery.ui.theme.GrayZero
import com.cornellappdev.android.eatery.util.EateryPreview

/**
* The pop-up that shows up when users want to pick a different meal as the filter in the upcoming
Expand Down Expand Up @@ -118,11 +120,13 @@ fun MealBottomSheet(
Icon(
painter = painterResource(id = R.drawable.ic_selected),
contentDescription = stringResource(R.string.a11y_meal_selected_breakfast),
tint = Color.Unspecified
)
} else {
Icon(
painter = painterResource(id = R.drawable.ic_unselected),
contentDescription = stringResource(R.string.a11y_meal_select_breakfast),
tint = Color.Unspecified
)
}
}
Expand Down Expand Up @@ -168,11 +172,13 @@ fun MealBottomSheet(
Icon(
painter = painterResource(id = R.drawable.ic_selected),
contentDescription = stringResource(R.string.a11y_meal_selected_lunch),
tint = Color.Unspecified
)
} else {
Icon(
painter = painterResource(id = R.drawable.ic_unselected),
contentDescription = stringResource(R.string.a11y_meal_select_lunch),
tint = Color.Unspecified
)
}
}
Expand Down Expand Up @@ -218,11 +224,13 @@ fun MealBottomSheet(
Icon(
painter = painterResource(id = R.drawable.ic_selected),
contentDescription = stringResource(R.string.a11y_meal_selected_dinner),
tint = Color.Unspecified
)
} else {
Icon(
painter = painterResource(id = R.drawable.ic_unselected),
contentDescription = stringResource(R.string.a11y_meal_select_dinner),
tint = Color.Unspecified
)
}
}
Expand Down Expand Up @@ -267,11 +275,13 @@ fun MealBottomSheet(
Icon(
painter = painterResource(id = R.drawable.ic_selected),
contentDescription = stringResource(R.string.a11y_meal_selected_late_dinner),
tint = Color.Unspecified
)
} else {
Icon(
painter = painterResource(id = R.drawable.ic_unselected),
contentDescription = stringResource(R.string.a11y_meal_select_late_dinner),
tint = Color.Unspecified
)
}
}
Expand Down Expand Up @@ -313,3 +323,14 @@ fun MealBottomSheet(
)
}
}

@Preview(showBackground = true)
@Composable
private fun MealBottomSheetPreview() = EateryPreview {
MealBottomSheet(
isVisible = true,
selectedMeal = MealFilter.LUNCH,
onSubmit = {},
hide = {}
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fun EateryBlueTheme(
dynamicColor: Boolean = false,
content: @Composable () -> Unit
) {
val colorScheme = when {
val baseColorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
dynamicLightColorScheme(context)
Expand All @@ -59,6 +59,15 @@ fun EateryBlueTheme(
else -> LightColorScheme
}

// For bottom sheet background colors
val colorScheme = baseColorScheme.copy(
surfaceContainerLowest = Color.White,
surfaceContainerLow = Color.White,
surfaceContainer = Color.White,
surfaceContainerHigh = Color.White,
surfaceContainerHighest = Color.White
)

MaterialTheme(
colorScheme = colorScheme,
typography = EateryBlueMaterial3Typography,
Expand Down
Loading