Update keyboard background color

This commit is contained in:
Gabriel Tofvesson 2024-10-26 00:13:59 +02:00
parent f533382022
commit cbb6f57daf

View File

@ -406,6 +406,8 @@ local PAGES = {
local KEY_BACKSPACE = "backspace"
local ID_FILTER_DISPLAY = "display_filter"
local KEYBOARD_BG_COLOR = colors.lightGray
local KEYBOARD_KEY_COLOR = colors.gray
local keyboardLines = {
lines = {
{ backspace = true, "1234567890" },
@ -421,10 +423,10 @@ local PAGES = {
for i=1,#chars do
local key = chars:sub(i, i)
-- ((not backspace) and i == #keys and 0) or 1
table.insert(keys, Padding:new{ bgColor = colors.cyan, right = 1, element = Text:new{
table.insert(keys, Padding:new{ bgColor = KEYBOARD_BG_COLOR, right = 1, element = Text:new{
id = key,
text = key,
bgColor = colors.gray,
bgColor = KEYBOARD_KEY_COLOR,
onClick = function()
pageState.filter = pageState.filter..key
pageState.reloadState()
@ -436,7 +438,7 @@ local PAGES = {
table.insert(keys, Text:new{
id = KEY_BACKSPACE,
text = "<--",
bgColor = colors.gray,
bgColor = KEYBOARD_KEY_COLOR,
onClick = function()
pageState.filter = fitText(pageState.filter, math.max(0, #pageState.filter - 1))
pageState.reloadState()
@ -463,8 +465,8 @@ local PAGES = {
table.insert(keyboardLines.elements, 1, Text:new{ id = ID_FILTER_DISPLAY })
local keyboardList = Padding:new{ bgColor = colors.gray, left = KEYBOARD_HPAD, right = KEYBOARD_HPAD, element = List:new{
bgColor = colors.cyan,
local keyboardList = Padding:new{ bgColor = KEYBOARD_BG_COLOR, left = KEYBOARD_HPAD, right = KEYBOARD_HPAD, element = List:new{
bgColor = KEYBOARD_BG_COLOR,
[Orientation:getId()] = Orientation.VERTICAL,
[Children:getId()] = keyboardLines.elements
}}