From 776c5f07091dd02172712c73812bffccdcebbd0c Mon Sep 17 00:00:00 2001 From: Minizbot2012 Date: Wed, 3 Jun 2020 11:28:15 -0400 Subject: [PATCH] Clean up display of keys --- ui/bind/popup.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/bind/popup.go b/ui/bind/popup.go index eca5f6c..4af7d13 100644 --- a/ui/bind/popup.go +++ b/ui/bind/popup.go @@ -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