Skip to content

Commit

Permalink
Add JvmName to conflicting declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Sep 13, 2023
1 parent 47d0250 commit 7ea39b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/src/main/kotlin/extensions/elements/CellExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,22 @@ fun <T : Element> Cell<T>.scaleImage(scaling: Scaling) = this.also { cell ->
}

/** Creates a copy of the wrapped label's style and changes its font. */
fun <T : Label> Cell<T>.setFont(font: Font) = also {
@JvmName("setFontLabel")
fun <T : Label> Cell<T>.font(font: Font) = also {
get().setFont(font)
}

/** Creates a copy of the wrapped field's style and changes its font. */
fun <T : TextField> Cell<T>.setFont(font: Font) = also {
@JvmName("setFontField")
fun <T : TextField> Cell<T>.font(font: Font) = also {
get().style = TextField.TextFieldStyle(get().style).also {
it.font = font
it.messageFont = font
}
}

/** Creates a copy of the wrapped button's label's style and changes its font. */
@JvmName("setFontButton")
fun <T : TextButton> Cell<T>.font(font: Font) = also {
get().setFont(font)
}
Expand Down

0 comments on commit 7ea39b7

Please sign in to comment.