Example #1
0
func NewRenderedSVG(app *dock.CDApplet, typ string) RendererMail {
	size := strings.Split(string(typ), " ")[0]

	source, err := ioutil.ReadFile(app.FileLocation("img", size+".svg"))
	if err != nil {
		return NewRenderedNone()
	}

	rs := &RenderedSVG{
		CDApplet:    app,
		pathDefault: app.FileLocation("img", "gmail-icon.svg"),
		pathTemp:    app.FileLocation("img", "temp.svg"),
		pathError:   app.FileLocation("img", "gmail-error-"+size+".svg"),
		iconSource:  string(source),
	}

	return rs
}
Example #2
0
func NewRenderedQuick(app *dock.CDApplet) *RenderedQuick {
	return &RenderedQuick{
		CDApplet:    app,
		pathDefault: app.FileLocation("img", "gmail-icon.svg"),
	}
}