-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No clue what the hell i was smoking when i wrote this
- Loading branch information
Showing
21 changed files
with
121 additions
and
377 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
ui/src/androidMain/kotlin/com/materiiapps/gloom/ui/theme/GloomTheme.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.materiiapps.gloom.ui.theme | ||
|
||
import androidx.compose.material3.ColorScheme | ||
import androidx.compose.material3.darkColorScheme | ||
import androidx.compose.material3.dynamicDarkColorScheme | ||
import androidx.compose.material3.dynamicLightColorScheme | ||
import androidx.compose.material3.lightColorScheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.platform.LocalContext | ||
import com.materiiapps.gloom.util.supportsMonet | ||
|
||
@Composable | ||
actual fun getColorSchemes(darkTheme: Boolean, dynamicColor: Boolean): Pair<ColorScheme, GloomColorScheme> { | ||
// We don't technically need to check for dynamic theming support | ||
// here because its locked behind a setting that itself is SDK restricted | ||
// but its good to be cautious anyways. | ||
return when { | ||
dynamicColor && darkTheme && supportsMonet -> dynamicDarkColorScheme(LocalContext.current) to darkGloomColorScheme() | ||
dynamicColor && !darkTheme && supportsMonet -> dynamicLightColorScheme(LocalContext.current) to lightGloomColorScheme() | ||
darkTheme -> darkColorScheme() to darkGloomColorScheme() | ||
else -> lightColorScheme() to lightGloomColorScheme() | ||
} | ||
} |
35 changes: 0 additions & 35 deletions
35
ui/src/androidMain/kotlin/com/materiiapps/gloom/ui/theme/GloomTheme.kt
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
ui/src/androidMain/kotlin/com/materiiapps/gloom/ui/theme/Themes.android.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.