redirect_to | layout | tags | title | |
---|---|---|---|---|
page |
|
Fyne API "theme.ThemedResource" |
import "fyne.io/fyne/v2/theme"
type ThemedResource struct {
// ColorName specifies which theme colour should be used to theme the resource
//
// Since: 2.3
ColorName fyne.ThemeColorName
}
ThemedResource is a resource wrapper that will return a version of the resource with the main color changed for the currently selected theme.
func NewThemedResource(src fyne.Resource) *ThemedResource
NewThemedResource creates a resource that adapts to the current theme setting.
func (res *ThemedResource) Content() []byte
Content returns the underlying content of the resource adapted to the current text color.
func (res *ThemedResource) Error() *ErrorThemedResource
Error returns a different resource for indicating an error.
func (res *ThemedResource) Name() string
Name returns the underlying resource name (used for caching).