fix trimming names as well #62

This commit is contained in:
piotr
2022-05-16 01:16:02 +02:00
parent 02b3930ef9
commit 7230d82be3
2 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ import (
"github.com/gotk3/gotk3/gtk" "github.com/gotk3/gotk3/gtk"
) )
const version = "0.3.0" const version = "0.3.1"
var ( var (
appDirs []string appDirs []string

View File

@@ -248,8 +248,8 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
button.SetImagePosition(gtk.POS_TOP) button.SetImagePosition(gtk.POS_TOP)
name := entry.NameLoc name := entry.NameLoc
if len(name) > 20 { if len(name) > 20 {
r := []rune(name) r := []rune(name[:17])
name = string(r[:17]) name = string(r)
name = fmt.Sprintf("%s…", name) name = fmt.Sprintf("%s…", name)
} }
button.SetLabel(name) button.SetLabel(name)