Class JewelThemeKt

  • All Implemented Interfaces:

    
    public final class JewelThemeKt
    
                        
    • Constructor Detail

    • Method Detail

      • getLocalThemeInstanceUuid

         final <Error class: unknown class><UUID> getLocalThemeInstanceUuid()

        A UUID that's unique to any instance of the ThemeDefinition, and can be used as a signal to invalidate any remembered value that needs to be refreshed when the theme changes. Note that this can change even if the rest of the theme does not change, so you should only use this when you can't key the remembers to anything else in the theme (e.g., you need to re-read values from the environment whose changes can't be listened to).

        The provided value should be random, and must change every time the theme definition is changed, and be different from all previous values.

      • getLocalContentColor

         final <Error class: unknown class><<Error class: unknown class>> getLocalContentColor()
      • getLocalTextStyle

         final <Error class: unknown class><<Error class: unknown class>> getLocalTextStyle()
      • getLocalEditorTextStyle

         final <Error class: unknown class><<Error class: unknown class>> getLocalEditorTextStyle()
      • OverrideDarkMode

         final static Unit OverrideDarkMode(Boolean isDark, Function0<Unit> content)

        Overrides the isDark value for the content. It is used to inject a different dark mode style in a sub-tree.

        Note: this does not change the theme. If you want to change the theme, you need to do it by yourself. For example, in standalone:

        IntUiTheme(isDark = false) {
          Text("I am light")
        
          IntUiTheme(isDark = true) {
            Text("I am dark")
          }
        }