Fyne API "container.ThemeOverride"

container.ThemeOverride


import "fyne.io/fyne/v2/container"

Usage

type ThemeOverride

type ThemeOverride struct {
	widget.BaseWidget

	Content fyne.CanvasObject
	Theme   fyne.Theme
}

ThemeOverride is a container where the child widgets are themed by the specified theme. Containers will be traversed and all child widgets will reflect the theme in this container. This should be used sparingly to avoid a jarring user experience.

Since: 2.5

func NewThemeOverride

func NewThemeOverride(obj fyne.CanvasObject, th fyne.Theme) *ThemeOverride

NewThemeOverride provides a container where the child widgets are themed by the specified theme. Containers will be traversed and all child widgets will reflect the theme in this container. This should be used sparingly to avoid a jarring user experience.

If the content obj of this theme override is a container and items are later added to the container or any sub-containers ensure that you call Refresh() on this ThemeOverride to ensure the new items match the theme.

Since: 2.5

func (*ThemeOverride) CreateRenderer

func (t *ThemeOverride) CreateRenderer() fyne.WidgetRenderer

func (*ThemeOverride) Refresh

func (t *ThemeOverride) Refresh()