Various improvements to Icon, MimeIcon

This commit is contained in:
2024-08-11 22:36:10 -04:00
parent fe50f5783b
commit 5a32b06cef
2 changed files with 23 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ func NewMimeIcon (mime data.Mime, size tomo.IconSize) *MimeIcon {
this := &MimeIcon {
Box: tomo.NewBox(),
}
this.SetRole(tomo.R("objects", "Icon"))
this.SetRole(tomo.R("objects", "MimeIcon"))
this.SetIcon(mime, size)
this.OnIconSetChange(this.handleIconSetChange)
return this
@@ -27,7 +27,6 @@ func (this *MimeIcon) SetIcon (mime data.Mime, size tomo.IconSize) {
if this.mime == mime && this.size == size { return }
this.mime = mime
this.size = size
this.SetTag(iconSizeString(size), true)
this.setTexture(tomo.MimeIconTexture(mime, size))
}