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
+2 -2
View File
@@ -39,7 +39,7 @@ type ButtonLayout struct {
type IconButton struct {
Background color.RGBA
Color color.RGBA
Icon *Icon
Icon *widget.Icon
Size unit.Value
Padding unit.Value
Inset layout.Inset
@@ -69,7 +69,7 @@ func (t *Theme) ButtonLayout() ButtonLayout {
}
}
func (t *Theme) IconButton(icon *Icon) IconButton {
func (t *Theme) IconButton(icon *widget.Icon) IconButton {
return IconButton{
Background: t.Color.Primary,
Color: t.Color.InvText,