Documentation
¶
Index ¶
- type Image
- func (img *Image) SetFromAnimation(anim *gdkpixbuf.PixbufAnimation)
- func (im *Image) SetFromAnimationWithSurface(anim *gdkpixbuf.PixbufAnimation, s *cairo.Surface)
- func (img *Image) SetFromIconName(icon string, _ int)
- func (img *Image) SetFromPixbuf(pixbuf *gdkpixbuf.Pixbuf)
- func (img *Image) SetFromSurface(surface *cairo.Surface)
- func (img *Image) SetInitials(initials string)
- func (img *Image) SetPlayAnimation(play bool)
- func (img *Image) SetURL(url string)
- func (img *Image) Size() int
- type WithStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { gtk.Widget Image *roundimage.Image // contains filtered or unexported fields }
Image decribes a basic avatar image.
func NewUnwrapped ¶
NewUnwrapped creates a new image without wrapping it in an eventbox.
func (*Image) SetFromAnimation ¶
func (img *Image) SetFromAnimation(anim *gdkpixbuf.PixbufAnimation)
func (*Image) SetFromAnimationWithSurface ¶
SetFromAnimationWithSurface sets an animation with a supplemental Cairo surface of the static frame scaled up. This helps achieve a consistent look on HiDPI devices without sacrificing GIFs.
func (*Image) SetFromIconName ¶
SetFromIconName sets the icon name.
func (*Image) SetFromPixbuf ¶
func (img *Image) SetFromPixbuf(pixbuf *gdkpixbuf.Pixbuf)
SetFromPixbuf sets a pixbuf into the image.
func (*Image) SetFromSurface ¶
SetFromSurface sets
func (*Image) SetInitials ¶
func (*Image) SetPlayAnimation ¶
SetPlayAnimation sets whether or not the image should be playing the animation.
type WithStatus ¶
type WithStatus struct { *Image // contains filtered or unexported fields }
WithStatus is the user avatar with the activity status dot.
func NewFromImageWithStatus ¶
func NewFromImageWithStatus(image *Image, size int) *WithStatus
NewFromImageWithStatus creates a new image with status from a custom image.
func NewWithStatus ¶
func NewWithStatus(size int) *WithStatus
NewWithStatus creates a new image with status.
func (*WithStatus) SetStatus ¶
func (s *WithStatus) SetStatus(status gateway.Status)
SetStatus sets the status indicator.