Upgrade to v2.5
Fyne API v2.5
app
canvas
container
data/binding
data/validation
dialog
driver
driver/desktop
driver/mobile
driver/software
lang
layout
storage
storage/repository
test
theme
widget
package widget
Accordion
AccordionItem
Activity
BaseWidget
Button
ButtonAlign
ButtonIconPlacement
ButtonImportance
ButtonStyle
Card
Check
CheckGroup
CustomTextGridStyle
DisableableWidget
Entry
FileIcon
Form
FormItem
GridWrap
GridWrapItemID
Hyperlink
HyperlinkSegment
Icon
ImageSegment
Importance
Label
List
ListItemID
ListSegment
Menu
Orientation
ParagraphSegment
PopUp
PopUpMenu
ProgressBar
ProgressBarInfinite
RadioGroup
RichText
RichTextBlock
RichTextSegment
RichTextStyle
Select
SelectEntry
Separator
SeparatorSegment
Slider
Table
TableCellID
TextGrid
TextGridCell
TextGridRow
TextGridStyle
TextSegment
Toolbar
ToolbarAction
ToolbarItem
ToolbarSeparator
ToolbarSpacer
Tree
TreeNodeID
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