[RFC] Switch remaining keyboard icons to glyphs (#5639)

* Switch the last few remaining icons to true glyphs
(Del/Backspace & Enter).
Also, allow a glyph to be rendered in (fake) bold, and use it for Enter.
* Update fonts
Pickup the tweaked nerdfonts for the backspace symbol
reviewable/pr5644/r1
NiLuJe 4 years ago committed by GitHub
parent 0cbceca98a
commit 4778d3db3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -103,9 +103,9 @@ return {
{ _B_el, _b_el, ">", prd, "Ó", "ó", "", "", },
{ _N_el, _n_el, "", "", "Ú", "ú", "", "", },
{ _M_el, _m_el, "", "", "Ç", "ç", "", "¨", },
{ label = "Backspace",
icon = "resources/icons/appbar.clear.reflect.horizontal.png",
width = 1.5
{ label = "",
width = 1.5,
bold = false
},
},
-- fourth row
@ -119,10 +119,10 @@ return {
width = 3.0},
{ com, com, "", "", "Ũ", "ũ", com, com, },
{ prd, prd, "", "", "Ĩ", "ĩ", prd, prd, },
{ label = "Enter",
{ label = "",
"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n",
icon = "resources/icons/appbar.arrow.enter.png",
width = 1.5,
bold = true
},
},
},

@ -101,9 +101,9 @@ return {
{ _B_, _b_, ">", prd, "Ó", "ó", "", "", },
{ _N_, _n_, "", "", "Ú", "ú", "", "", },
{ _M_, _m_, "", "", "Ç", "ç", "", "¨", },
{ label = "Backspace",
icon = "resources/icons/appbar.clear.reflect.horizontal.png",
width = 1.5
{ label = "",
width = 1.5,
bold = false
},
},
-- fourth row
@ -117,10 +117,10 @@ return {
width = 3.0},
{ com, com, "", "", "Ũ", "ũ", com, com, },
{ prd, prd, "", "", "Ĩ", "ĩ", prd, prd, },
{ label = "Enter",
{ label = "",
"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n",
icon = "resources/icons/appbar.arrow.enter.png",
width = 1.5,
bold = true
},
},
},

@ -72,9 +72,9 @@ return {
{ "־", nun, ">", prd, },
{ "ֿ ", mem, "", "", },
{ "ֽ ", tzadik, "", "", },
{ label = "Backspace",
icon = "resources/icons/appbar.clear.reflect.horizontal.png",
width = 1.5
{ label = "",
width = 1.5,
bold = false
},
},
-- fourth row
@ -86,10 +86,10 @@ return {
width = 3.0},
{ com, taf, "", "", },
{ prd, "ץ", "", "", },
{ label = "Enter",
{ label = "",
"\n", "\n", "\n", "\n",
icon = "resources/icons/appbar.arrow.enter.png",
width = 1.5,
bold = true
},
},
},

@ -99,14 +99,14 @@ return {
{ label = "空白",
" ", " ", " ", " ",
width = 5.5},
{ label = "Enter",
{ label = "",
"\n", "\n", "\n", "\n",
icon = "resources/icons/appbar.arrow.enter.png",
width = 1.5,
bold = true
},
{ label = "Backspace",
icon = "resources/icons/appbar.clear.reflect.horizontal.png",
width = 1.5
{ label = "",
width = 1.5,
bold = false
},
},
},

@ -138,9 +138,9 @@ return {
{ "", "", "&", prd, },
{ "", "", "", "", },
{ "", "", "", "", },
{ label = "Backspace",
icon = "resources/icons/appbar.clear.reflect.horizontal.png",
width = 1.5
{ label = "",
width = 1.5,
bold = false
},
},
-- fourth row
@ -156,10 +156,10 @@ return {
width = 3.0},
{ com, com, "", "", },
{ prd, prd, "", "", },
{ label = "Enter",
{ label = "",
"\n", "\n", "\n", "\n",
icon = "resources/icons/appbar.arrow.enter.png",
width = 1.5,
bold = true
},
},
},

@ -43,9 +43,9 @@ return {
{ "B", "b", ">", ".", "B", "b", ">", ".", "Ó", "ó", "", "", },
{ "N", "n", "", "", "N", "n", "", "", "Ú", "ú", "", "", },
{ "M", "m", "", "", "M", "m", "", "", "Ç", "ç", "", "¨", },
{ label = "Backspace",
icon = "resources/icons/appbar.clear.reflect.horizontal.png",
width = 1.5
{ label = "",
width = 1.5,
bold = false
},
},
-- fourth row
@ -59,10 +59,10 @@ return {
width = 3.0},
{ ",", ",", "", "", ",", ",", "Ё", "Ё", ",", ",", ",", ",", },
{ ",", ".", "", "", ",", ".", "ё", "ё", ",", ".", ",", ".", },
{ label = "Enter",
{ label = "",
"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n",
icon = "resources/icons/appbar.arrow.enter.png",
width = 1.5,
bold = true
},
},
},

@ -49,9 +49,9 @@ return {
{ "И", "и", ">", prd, "Һ", "һ", "", "", },
{ "Т", "т", "", "", "Б", "б", "", "", },
{ "Ь", "ь", "", "", "Ю", "ю", "", "¨", },
{ label = "Backspace",
icon = "resources/icons/appbar.clear.reflect.horizontal.png",
width = 1.5
{ label = "",
width = 1.5,
bold = false
},
},
-- fourth row
@ -65,10 +65,10 @@ return {
width = 3.0},
{ com, com, "", "", "Ё", "ё", "Ũ", "ũ", com, com, },
{ prd, prd, "", "", prd, prd, "Ĩ", "ĩ", prd, prd, },
{ label = "Enter",
{ label = "",
"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n",
icon = "resources/icons/appbar.arrow.enter.png",
width = 1.5,
bold = true
},
},
},

@ -30,6 +30,7 @@ local VirtualKey = InputContainer:new{
key = nil,
icon = nil,
label = nil,
bold = nil,
keyboard = nil,
callback = nil,
@ -102,7 +103,7 @@ function VirtualKey:init()
elseif self.keyboard.umlautmode_keys[self.label] ~= nil then
self.callback = function () self.keyboard:setLayer("Äéß") end
self.skiptap = true
elseif self.label == "Backspace" then
elseif self.label == "" then
self.callback = function () self.keyboard:delChar() end
self.hold_callback = function ()
self.ignore_key_release = true -- don't have delChar called on release
@ -153,6 +154,7 @@ function VirtualKey:init()
label_widget = TextWidget:new{
text = self.label,
face = self.face,
bold = self.bold or false,
}
end
self[1] = FrameContainer:new{
@ -485,10 +487,12 @@ function VirtualKeyPopup:init()
local key = type(v) == "table" and v.key or v
local label = type(v) == "table" and v.label or key
local icon = type(v) == "table" and v.icon
local bold = type(v) == "table" and v.bold
local virtual_key = VirtualKey:new{
key = key,
label = label,
icon = icon,
bold = bold,
keyboard = parent_key.keyboard,
key_chars = key_chars,
width = parent_key.width,
@ -777,6 +781,7 @@ function VirtualKeyboard:addKeys()
key_chars = key_chars,
icon = self.KEYS[i][j].icon,
label = label,
bold = self.KEYS[i][j].bold,
keyboard = self,
width = key_width,
height = key_height,

@ -1 +1 @@
Subproject commit 63e7df0afe4df9804eb43a70def122814495cb7e
Subproject commit 016220d96629d4bea763a7df9ff4cc4b1b92185b
Loading…
Cancel
Save