Fix package name errors in theme

This commit is contained in:
Sasha Koshka 2023-08-24 16:30:10 -04:00
parent fdea479ee7
commit 7510047ef3
2 changed files with 36 additions and 35 deletions

View File

@ -1,7 +1,7 @@
package theme package theme
import "git.tebibyte.media/tomo/tomo"
import "git.tebibyte.media/tomo/tomo/data" import "git.tebibyte.media/tomo/tomo/data"
import "git.tebibyte.media/tomo/tomo/canvas"
// IconSize represents the size of an icon. // IconSize represents the size of an icon.
type IconSize int; const ( type IconSize int; const (
@ -227,13 +227,13 @@ type Icon int; const (
) )
// Texture returns a texture of the corresponding icon ID. // Texture returns a texture of the corresponding icon ID.
func (id Icon) Texture (size IconSize) tomo.Texture { func (id Icon) Texture (size IconSize) canvas.Texture {
if current == nil { return nil } if current == nil { return nil }
return current.Icon(id, size) return current.Icon(id, size)
} }
// MimeIcon returns an icon corresponding to a MIME type. // MimeIcon returns an icon corresponding to a MIME type.
func MimeIcon (mime data.Mime, size IconSize) tomo.Texture { func MimeIcon (mime data.Mime, size IconSize) canvas.Texture {
if current == nil { return nil } if current == nil { return nil }
return current.MimeIcon(mime, size) return current.MimeIcon(mime, size)
} }
@ -251,7 +251,7 @@ type ApplicationIcon struct {
} }
// Texture returns a texture of the corresponding icon ID. // Texture returns a texture of the corresponding icon ID.
func (icon ApplicationIcon) Texture (size IconSize) tomo.Texture { func (icon ApplicationIcon) Texture (size IconSize) canvas.Texture {
if current == nil { return nil } if current == nil { return nil }
return current.ApplicationIcon(icon, size) return current.ApplicationIcon(icon, size)
} }

View File

@ -3,6 +3,7 @@ package theme
import "git.tebibyte.media/tomo/tomo" import "git.tebibyte.media/tomo/tomo"
import "git.tebibyte.media/tomo/tomo/data" import "git.tebibyte.media/tomo/tomo/data"
import "git.tebibyte.media/tomo/tomo/event" import "git.tebibyte.media/tomo/tomo/event"
import "git.tebibyte.media/tomo/tomo/canvas"
// Role describes the role of an object. // Role describes the role of an object.
type Role struct { type Role struct {
@ -57,17 +58,17 @@ type Theme interface {
// Icon returns a texture of the corresponding icon ID. This texture // Icon returns a texture of the corresponding icon ID. This texture
// should be protected, unless a new copy of it is returned with each // should be protected, unless a new copy of it is returned with each
// subsequent call. // subsequent call.
Icon (Icon, IconSize) tomo.Texture Icon (Icon, IconSize) canvas.Texture
// MimeIcon returns an icon corresponding to a MIME type. This texture // MimeIcon returns an icon corresponding to a MIME type. This texture
// should be protected, unless a new copy of it is returned with each // should be protected, unless a new copy of it is returned with each
// subsequent call. // subsequent call.
MimeIcon (data.Mime, IconSize) tomo.Texture MimeIcon (data.Mime, IconSize) canvas.Texture
// ApplicationIcon returns an icon corresponding to an application. This // ApplicationIcon returns an icon corresponding to an application. This
// texture should be protected, unless a new copy of it is returned with // texture should be protected, unless a new copy of it is returned with
// each subsequent call. // each subsequent call.
ApplicationIcon (ApplicationIcon, IconSize) tomo.Texture ApplicationIcon (ApplicationIcon, IconSize) canvas.Texture
} }
var current Theme var current Theme