Skip to content

Commit

Permalink
correctly set placeholder default width
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 committed Jun 24, 2024
1 parent d0983e6 commit 3b30864
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ sealed interface KeyData : AbstractKeyData {

/** this expects that codes and labels are already converted from FlorisBoard values, usually through compute */
fun toKeyParams(params: KeyboardParams, additionalLabelFlags: Int = 0): Key.KeyParams {
if (type == KeyType.PLACEHOLDER) return Key.KeyParams.newSpacer(params, width)

val newWidth = if (width == 0f) getDefaultWidth(params) else width
if (type == KeyType.PLACEHOLDER) return Key.KeyParams.newSpacer(params, newWidth)

val newCode: Int
val newLabel: String
if (code in KeyCode.Spec.CURRENCY) {
Expand Down

0 comments on commit 3b30864

Please sign in to comment.