fix trimming names as well #62
This commit is contained in:
2
main.go
2
main.go
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user