Clean up display of keys

pull/3/head
Minizbot2012 4 years ago
parent d5d9c7e35e
commit 776c5f0709
No known key found for this signature in database
GPG Key ID: 977C8ADE12361917

@ -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