widget,widget/material: move Image and Icon to widget package

There is nothing theme-specific about displaying images and icons,
so move the types from the material package to the generic widget
package.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-05-03 12:22:32 +02:00
parent fa7f9d3ba8
commit e460e4f4bf
5 changed files with 29 additions and 27 deletions
+3 -4
View File
@@ -22,13 +22,12 @@ type checkable struct {
IconColor color.RGBA
Size unit.Value
shaper text.Shaper
checkedStateIcon *Icon
uncheckedStateIcon *Icon
checkedStateIcon *widget.Icon
uncheckedStateIcon *widget.Icon
}
func (c *checkable) layout(gtx *layout.Context, checked bool) {
var icon *Icon
var icon *widget.Icon
if checked {
icon = c.checkedStateIcon
} else {