avatar

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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 New

func New(size int) *Image

New creates a new Image instance.

func NewUnwrapped

func NewUnwrapped(size int) *Image

NewUnwrapped creates a new image without wrapping it in an eventbox.

func (*Image) SetFromAnimation

func (img *Image) SetFromAnimation(anim *gdkpixbuf.PixbufAnimation)

func (*Image) SetFromAnimationWithSurface

func (im *Image) SetFromAnimationWithSurface(anim *gdkpixbuf.PixbufAnimation, s *cairo.Surface)

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

func (img *Image) SetFromIconName(icon string, _ int)

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

func (img *Image) SetFromSurface(surface *cairo.Surface)

SetFromSurface sets

func (*Image) SetInitials

func (img *Image) SetInitials(initials string)

func (*Image) SetPlayAnimation

func (img *Image) SetPlayAnimation(play bool)

SetPlayAnimation sets whether or not the image should be playing the animation.

func (*Image) SetURL

func (img *Image) SetURL(url string)

SetURL makes the image display a URL.

func (*Image) Size

func (img *Image) Size() int

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL