aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-01-26 22:41:04 +0530
committerGitHub <noreply@github.com>2022-01-26 17:11:04 +0000
commitd89d5003192cf11bd9701dddce63d5782b40a071 (patch)
treefcd8a59b49d07b033755adc7f9c7b3f240cb5518 /app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt
parent9dd05543c8b3ad9bad2456bdffa54a56d2b95d3b (diff)
downloadHardenedPass-d89d5003192cf11bd9701dddce63d5782b40a071.tar.gz
HardenedPass-d89d5003192cf11bd9701dddce63d5782b40a071.zip
Move Compose code to ui-compose module (#1687)
Diffstat (limited to 'app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt76
1 files changed, 0 insertions, 76 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt b/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt
deleted file mode 100644
index 55fb600d..00000000
--- a/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt
+++ /dev/null
@@ -1,76 +0,0 @@
-package dev.msfjarvis.aps.ui.theme
-
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.lightColorScheme
-import androidx.compose.runtime.Composable
-
-private val LightThemeColors =
- lightColorScheme(
- primary = md_theme_light_primary,
- onPrimary = md_theme_light_onPrimary,
- primaryContainer = md_theme_light_primaryContainer,
- onPrimaryContainer = md_theme_light_onPrimaryContainer,
- secondary = md_theme_light_secondary,
- onSecondary = md_theme_light_onSecondary,
- secondaryContainer = md_theme_light_secondaryContainer,
- onSecondaryContainer = md_theme_light_onSecondaryContainer,
- tertiary = md_theme_light_tertiary,
- onTertiary = md_theme_light_onTertiary,
- tertiaryContainer = md_theme_light_tertiaryContainer,
- onTertiaryContainer = md_theme_light_onTertiaryContainer,
- error = md_theme_light_error,
- errorContainer = md_theme_light_errorContainer,
- onError = md_theme_light_onError,
- onErrorContainer = md_theme_light_onErrorContainer,
- background = md_theme_light_background,
- onBackground = md_theme_light_onBackground,
- surface = md_theme_light_surface,
- onSurface = md_theme_light_onSurface,
- surfaceVariant = md_theme_light_surfaceVariant,
- onSurfaceVariant = md_theme_light_onSurfaceVariant,
- outline = md_theme_light_outline,
- inverseOnSurface = md_theme_light_inverseOnSurface,
- inverseSurface = md_theme_light_inverseSurface,
- )
-private val DarkThemeColors =
- darkColorScheme(
- primary = md_theme_dark_primary,
- onPrimary = md_theme_dark_onPrimary,
- primaryContainer = md_theme_dark_primaryContainer,
- onPrimaryContainer = md_theme_dark_onPrimaryContainer,
- secondary = md_theme_dark_secondary,
- onSecondary = md_theme_dark_onSecondary,
- secondaryContainer = md_theme_dark_secondaryContainer,
- onSecondaryContainer = md_theme_dark_onSecondaryContainer,
- tertiary = md_theme_dark_tertiary,
- onTertiary = md_theme_dark_onTertiary,
- tertiaryContainer = md_theme_dark_tertiaryContainer,
- onTertiaryContainer = md_theme_dark_onTertiaryContainer,
- error = md_theme_dark_error,
- errorContainer = md_theme_dark_errorContainer,
- onError = md_theme_dark_onError,
- onErrorContainer = md_theme_dark_onErrorContainer,
- background = md_theme_dark_background,
- onBackground = md_theme_dark_onBackground,
- surface = md_theme_dark_surface,
- onSurface = md_theme_dark_onSurface,
- surfaceVariant = md_theme_dark_surfaceVariant,
- onSurfaceVariant = md_theme_dark_onSurfaceVariant,
- outline = md_theme_dark_outline,
- inverseOnSurface = md_theme_dark_inverseOnSurface,
- inverseSurface = md_theme_dark_inverseSurface,
- )
-
-@Composable
-fun APSTheme(useDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
- val colors =
- if (!useDarkTheme) {
- LightThemeColors
- } else {
- DarkThemeColors
- }
-
- MaterialTheme(colorScheme = colors, typography = AppTypography, content = content)
-}