Fyne API "widget.FileIcon"
widget.FileIcon
import "fyne.io/fyne/v2/widget"
Usage
type FileIcon
type FileIcon struct {
BaseWidget
// Deprecated: Selection is now handled externally.
Selected bool
URI fyne.URI
}
FileIcon is an adaption of widget.Icon for showing files and folders
Since:
1.4
func NewFileIcon
func NewFileIcon(uri fyne.URI) *FileIcon
NewFileIcon takes a filepath and creates an icon with an overlaid label using the detected mimetype and extension
Since:
1.4
func (*FileIcon) CreateRenderer
func (i *FileIcon) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*FileIcon) MinSize
func (i *FileIcon) MinSize() fyne.Size
MinSize returns the size that this widget should not shrink below
func (*FileIcon) SetSelected
func (i *FileIcon) SetSelected(selected bool)
SetSelected makes the file look like it is selected.
Deprecated: Selection is now handled externally.
func (*FileIcon) SetURI
func (i *FileIcon) SetURI(uri fyne.URI)
SetURI changes the URI and makes the icon reflect a different file