Cherrio LLC
02/14/2023, 1:39 PMNick
02/15/2023, 5:10 AMbasicButtonBehavior()
module registers itself as a member of the BasicTheme. This lets it get included whenever that theme is injected. But you will also pick up any behavior registered using bindBehavior if you inject the generic Theme interface.
This lets you mix and match behaviors.
application (modules = listOf(
basicLabelBehavior (), nativeTextFieldBehavior(spellCheck = false),
nativeHyperLinkBehavior(),
nativeScrollPanelBehavior()) {
YourApp(
…
theme = instance(), // use generic Theme that selects all behaviors registered above
themeManager = instance()
…
)
}
class YourApp(
…
theme: Theme,
themeManager: ThemeManager,
…
): Application {
init {
themeManager.selected = theme
}
…
}