scoop:scoop.ui.component:0.1.0
src/text_field/style.scoop
Selected production source · src/text_field/style.scoop
1
package scoop.ui.component3
import scoop.graphics.*4
import scoop.graphics.text.SpanStyle5
import scoop.ui.style.*7
public class TextFieldStyle internal constructor(8
public val surface: SurfaceOptions = surfaceOptions(),9
public val text: SpanStyle? = None,10
public val placeholder: SpanStyle? = None,11
public val description: SpanStyle? = None,12
public val states: InteractionStyles = interactionStyles(),13
public val selectionColor: Color? = None,14
public val inactiveSelectionColor: Color? = None,15
public val caretColor: Color? = None,16
public val markedColor: Color? = None,17
public val caretWidth: Double? = None,18
public val scrollbar: ScrollbarOptions = scrollbarOptions(),19
/** Uses the theme pair by default; a local selection background keeps original glyph colors. */20
public val selectionTextColor: Color? = None,21
public val inactiveSelectionTextColor: Color? = None,22
public val label: SpanStyle? = None23
) {24
public fun copy(configure: TextFieldStyleBuilder.() -> Unit = {}): TextFieldStyle =25
configureTextFieldStyle(this, configure)27
internal fun options(visual: InteractionVisual): SurfaceOptions {28
val localStyle = states.apply(surface.style, visual)29
return surface.copy { this.style = localStyle }30
}31
}