Make changes to application.go to account for new API
This commit is contained in:
parent
593a74924d
commit
880904d5fa
|
@ -5,6 +5,7 @@ import "image"
|
||||||
import "strings"
|
import "strings"
|
||||||
import "net/url"
|
import "net/url"
|
||||||
import "git.tebibyte.media/tomo/tomo"
|
import "git.tebibyte.media/tomo/tomo"
|
||||||
|
import "git.tebibyte.media/tomo/tomo/canvas"
|
||||||
import "git.tebibyte.media/tomo/nasin/internal/registrar"
|
import "git.tebibyte.media/tomo/nasin/internal/registrar"
|
||||||
|
|
||||||
// Application represents an application object.
|
// Application represents an application object.
|
||||||
|
@ -118,7 +119,7 @@ func RunApplication (application Application) {
|
||||||
// owned by the application. The window's icon will be automatically set by
|
// owned by the application. The window's icon will be automatically set by
|
||||||
// looking for an icon with the name of the application's ID. If that is not
|
// looking for an icon with the name of the application's ID. If that is not
|
||||||
// found, the default icon for the application's ApplicationRole will used.
|
// found, the default icon for the application's ApplicationRole will used.
|
||||||
func NewApplicationWindow (application Application, bounds image.Rectangle) (tomo.MainWindow, error) {
|
func NewApplicationWindow (application Application, bounds image.Rectangle) (tomo.Window, error) {
|
||||||
window, err := tomo.NewWindow(bounds)
|
window, err := tomo.NewWindow(bounds)
|
||||||
if err != nil { return nil, err }
|
if err != nil { return nil, err }
|
||||||
description := application.Describe()
|
description := application.Describe()
|
||||||
|
@ -128,7 +129,7 @@ func NewApplicationWindow (application Application, bounds image.Rectangle) (tom
|
||||||
}
|
}
|
||||||
|
|
||||||
func setApplicationWindowIcon (window tomo.Window, description ApplicationDescription) {
|
func setApplicationWindowIcon (window tomo.Window, description ApplicationDescription) {
|
||||||
allSizes := func (icon tomo.Icon) (sizes []image.Image) {
|
allSizes := func (icon tomo.Icon) (sizes []canvas.Texture) {
|
||||||
small := icon.Texture(tomo.IconSizeSmall)
|
small := icon.Texture(tomo.IconSizeSmall)
|
||||||
medium := icon.Texture(tomo.IconSizeMedium)
|
medium := icon.Texture(tomo.IconSizeMedium)
|
||||||
large := icon.Texture(tomo.IconSizeLarge)
|
large := icon.Texture(tomo.IconSizeLarge)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user