Repo created
This commit is contained in:
parent
75dc487a7a
commit
39c29d175b
6317 changed files with 388324 additions and 2 deletions
7
core/ui/theme/api/build.gradle.kts
Normal file
7
core/ui/theme/api/build.gradle.kts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
plugins {
|
||||
id(ThunderbirdPlugins.Library.kmpCompose)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "net.thunderbird.core.ui.theme.api"
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package net.thunderbird.core.ui.theme.api
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
/**
|
||||
* Provides the compose theme for a feature.
|
||||
*/
|
||||
interface FeatureThemeProvider {
|
||||
@Composable
|
||||
fun WithTheme(
|
||||
content: @Composable () -> Unit,
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun WithTheme(
|
||||
darkTheme: Boolean,
|
||||
content: @Composable () -> Unit,
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package net.thunderbird.core.ui.theme.api
|
||||
|
||||
enum class Theme {
|
||||
LIGHT,
|
||||
DARK,
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package net.thunderbird.core.ui.theme.api
|
||||
|
||||
import androidx.annotation.StyleRes
|
||||
|
||||
interface ThemeManager {
|
||||
|
||||
val appTheme: Theme
|
||||
val messageViewTheme: Theme
|
||||
val messageComposeTheme: Theme
|
||||
|
||||
@get:StyleRes
|
||||
val appThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val messageViewThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val messageComposeThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val dialogThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val translucentDialogThemeResourceId: Int
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package net.thunderbird.core.ui.theme.api
|
||||
|
||||
import androidx.annotation.StyleRes
|
||||
|
||||
interface ThemeProvider {
|
||||
@get:StyleRes
|
||||
val appThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val appLightThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val appDarkThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val dialogThemeResourceId: Int
|
||||
|
||||
@get:StyleRes
|
||||
val translucentDialogThemeResourceId: Int
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue