Skip to content

Commit

Permalink
Use KP_Separator/KP_Equal for comma/dot in NumberKeyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka committed Mar 22, 2024
1 parent a8661f8 commit ab4cc96
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ class NumberKeyboard(
theme: Theme,
) : BaseKeyboard(context, theme, Layout) {

class PunctuationKey(p: String, percentWidth: Float, variant: Appearance.Variant) : KeyDef(
Appearance.Text(
displayText = p,
textSize = 23f,
percentWidth = percentWidth,
variant = variant
),
setOf(
Behavior.Press(KeyAction.CommitAction(p))
)
)

companion object {
const val Name = "Number"

Expand Down Expand Up @@ -57,10 +45,10 @@ class NumberKeyboard(
),
listOf(
LayoutSwitchKey("ABC", TextKeyboard.Name),
PunctuationKey(",", 0.1f, KeyDef.Appearance.Variant.Alternative),
NumPadKey(",", 0xffac, 23f, 0.1f, KeyDef.Appearance.Variant.Alternative),
LayoutSwitchKey("!?#", PickerWindow.Key.Symbol.name, 0.13333f, KeyDef.Appearance.Variant.AltForeground),
NumPadKey("0", 0xffb0, 30f, 0.23334f),
PunctuationKey("=", 0.13333f, KeyDef.Appearance.Variant.AltForeground),
NumPadKey("=", 0xffbd, 23f, 0.13333f, KeyDef.Appearance.Variant.AltForeground),
NumPadKey(".", 0xffae, 23f, 0.1f, KeyDef.Appearance.Variant.Alternative),
ReturnKey()
)
Expand Down

0 comments on commit ab4cc96

Please sign in to comment.