Well I think thats all of the examples

There are too many examples.
This commit is contained in:
2023-04-10 02:58:52 -04:00
parent 6db5901247
commit aed448671b
29 changed files with 54 additions and 44 deletions

View File

@@ -24,7 +24,7 @@ var validImageTypes = []data.Mime {
}
func run () {
window, _ := tomo.NewWindow(256, 2)
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 256, 0))
window.SetTitle("Clipboard")
container := containers.NewContainer(layouts.Vertical { true, true })
@@ -74,7 +74,7 @@ func run () {
"Cannot decode image:\n" + err.Error())
return
}
imageWindow(img)
imageWindow(window, img)
}
clipboardCallback := func (clipboard data.Data, err error) {
if err != nil {
@@ -120,8 +120,8 @@ func run () {
window.Show()
}
func imageWindow (image image.Image) {
window, _ := tomo.NewWindow(2, 2)
func imageWindow (parent tomo.Window, image image.Image) {
window, _ := parent.NewModal(tomo.Bounds(0, 0, 0, 0))
window.SetTitle("Clipboard Image")
container := containers.NewContainer(layouts.Vertical { true, true })
closeButton := elements.NewButton("Ok")