oops lmao
This commit is contained in:
@@ -6,6 +6,7 @@ import _ "embed"
|
||||
import _ "image/png"
|
||||
import "image/color"
|
||||
import "golang.org/x/image/font"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/data"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/artist"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/canvas"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/defaultfont"
|
||||
@@ -88,6 +89,13 @@ func (Default) Icon (string, IconSize, Case) canvas.Image {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MimeIcon returns an icon from the default set corresponding to the given mime.
|
||||
// type.
|
||||
func (Default) MimeIcon (data.Mime, IconSize, Case) canvas.Image {
|
||||
// TODO
|
||||
return nil
|
||||
}
|
||||
|
||||
// Pattern returns a pattern from the default theme corresponding to the given
|
||||
// pattern ID.
|
||||
func (Default) Pattern (id Pattern, state State, c Case) artist.Pattern {
|
||||
|
||||
@@ -3,6 +3,7 @@ package theme
|
||||
import "image"
|
||||
import "image/color"
|
||||
import "golang.org/x/image/font"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/data"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/artist"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/canvas"
|
||||
|
||||
@@ -83,6 +84,10 @@ type Theme interface {
|
||||
|
||||
// Icon returns an appropriate icon given an icon name, size, and case.
|
||||
Icon (string, IconSize, Case) canvas.Image
|
||||
|
||||
// Icon returns an appropriate icon given a file mime type, size, and,
|
||||
// case.
|
||||
MimeIcon (data.Mime, IconSize, Case) canvas.Image
|
||||
|
||||
// Pattern returns an appropriate pattern given a pattern name, case,
|
||||
// and state.
|
||||
|
||||
@@ -3,6 +3,7 @@ package theme
|
||||
import "image"
|
||||
import "image/color"
|
||||
import "golang.org/x/image/font"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/data"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/artist"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/canvas"
|
||||
|
||||
@@ -26,6 +27,12 @@ func (wrapped Wrapped) Icon (name string, size IconSize) canvas.Image {
|
||||
return real.Icon(name, size, wrapped.Case)
|
||||
}
|
||||
|
||||
// MimeIcon returns an appropriate icon given file mime type.
|
||||
func (wrapped Wrapped) MimeIcon (mime data.Mime, size IconSize) canvas.Image {
|
||||
real := wrapped.ensure()
|
||||
return real.MimeIcon(mime, size, wrapped.Case)
|
||||
}
|
||||
|
||||
// Pattern returns an appropriate pattern given a pattern name and state.
|
||||
func (wrapped Wrapped) Pattern (id Pattern, state State) artist.Pattern {
|
||||
real := wrapped.ensure()
|
||||
|
||||
Reference in New Issue
Block a user