From 7230d82be36cf577e2616707f5b1c6c0a25aae7d Mon Sep 17 00:00:00 2001 From: piotr Date: Mon, 16 May 2022 01:16:02 +0200 Subject: [PATCH] fix trimming names as well #62 --- main.go | 2 +- uicomponents.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 7488b20..29be04b 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ import ( "github.com/gotk3/gotk3/gtk" ) -const version = "0.3.0" +const version = "0.3.1" var ( appDirs []string diff --git a/uicomponents.go b/uicomponents.go index 5b8a567..f5bcb24 100644 --- a/uicomponents.go +++ b/uicomponents.go @@ -248,8 +248,8 @@ func flowBoxButton(entry desktopEntry) *gtk.Button { button.SetImagePosition(gtk.POS_TOP) name := entry.NameLoc if len(name) > 20 { - r := []rune(name) - name = string(r[:17]) + r := []rune(name[:17]) + name = string(r) name = fmt.Sprintf("%s…", name) } button.SetLabel(name)