mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user