Make changes to application.go to account for new API

This commit is contained in:
Sasha Koshka 2024-06-07 02:01:00 -04:00
parent 593a74924d
commit 880904d5fa
1 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import "image"
import "strings"
import "net/url"
import "git.tebibyte.media/tomo/tomo"
import "git.tebibyte.media/tomo/tomo/canvas"
import "git.tebibyte.media/tomo/nasin/internal/registrar"
// 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
// 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.
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)
if err != nil { return nil, err }
description := application.Describe()
@ -128,7 +129,7 @@ func NewApplicationWindow (application Application, bounds image.Rectangle) (tom
}
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)
medium := icon.Texture(tomo.IconSizeMedium)
large := icon.Texture(tomo.IconSizeLarge)