Clean up display of keys

pull/1/head
minizbot2012 4 years ago
parent 48d832516e
commit 09041fd381

@ -61,7 +61,12 @@ func (bp *Page) createGrid() *fyne.Container {
//Create the binding page popup
func (bp *Page) Create(bid string) fyne.CanvasObject {
bp.dev = make(map[string]fyne.CanvasObject)
bp.dev["BL"] = widget.NewLabel(keys.ASCIIToCommon[bp.Bind.Bound])
cmn := len(keys.ASCIIToCommon[bp.Bind.Bound])
if cmn == 5 {
bp.dev["BL"] = widget.NewLabel(string(keys.ASCIIToCommon[bp.Bind.Bound][cmn-1]))
} else {
bp.dev["BL"] = widget.NewLabel(string(keys.ASCIIToCommon[bp.Bind.Bound]))
}
pop := widget.NewVBox(bp.dev["BL"], bp.createGrid())
bp.window.Canvas().SetOnTypedKey(bp.TypeKey)
return pop

Loading…
Cancel
Save