fyne-io / fyne Goto Github PK
View Code? Open in Web Editor NEWCross platform GUI toolkit in Go inspired by Material Design
Home Page: https://fyne.io/
License: Other
Cross platform GUI toolkit in Go inspired by Material Design
Home Page: https://fyne.io/
License: Other
on ArchLinux/amd64: when I run the fyne_demo
example and move another window over the Examples
"main" canvas of the fyne_demo
, the content of that "main" window isn't redrawn.
it's refreshed only when e.g. resizing.
this bug doesn't happen for e.g. the Life
window, which is always refreshed/redrawn.
is there an OnFocus
or OnVisible
event to listen to? (there's an OnKeyPressed
, IIRC)
Probably in the bootstrap space, but linked or embedded in the fyne README
Probably alternating equation & answer (aligned differently?).
The history should be either above or to the side, depending on the aspect ratio of the window.
While investigating something else, I attempted to enter bidirectional text into the form input. When pasting Hebrew text into the form demo, I was shown a broken Unicode symbol. Additionally, when attempting to enter æ
, Fyne intercepted my compose key and caused the system to instead enter ae
.
So the main parts of this are:
Possible test inputs:
שרה
- Hebrew text, right to left
قرأ Wikipedia™ طوال اليوم.
- combination of Arabic and English text (RTL and LTR, respectively), with a Unicode character with weak directionality (™
)
שרה is Sarah in Hebrew
- combination of Hebrew and English text (RTL and LTR, respectively)
If you are confused, consider editing these text samples in a graphical editor or consulting these references:
https://en.wikipedia.org/wiki/Bi-directional_text
https://unicode.org/reports/tr9/
Toggling between multiple containers/objects
Goal is to have something that is close to a HTML flexbox - like an N column grid, with colspans, and each column shrinking in width to fit the largest element. Useful for forms management.
First step is to create a custom layout, will use the xkcd example as a proof of concept.
Im thinking the API would end up something like this, passing in an options object, so each CanvasObject is wrapped in a higher order struct that has metadata about layout options :
type gridOpts struct {
Span uint
OnChange func()
... all sorts of other options
}
type Account struct {
Name string
Address string
Comments string
}
func (m *Account) ChangeAddress(old, new string) error {
fmt.Println("Address was", old, "is now", new)
return nil
}
// model to bind to
myAccount := &Account{}
g := NewFliexGrid(6) // 6 column layout
g.Add(NewLabel("Name"), nil) // nil options == default 1 col
g.Add(NewInput(&myAccount.Name), nil)
g.Add(NewLabel("Address", nil)
g.Add(NewInput(&myAccount.Address), &gridOpts(Span: 2, OnChange: myAccount.ChangeAddress)) // uses up the 6th col - onto a new row
g.Add(NewLabel("Comments", nil)
g.Add(NewInput(&myAccount.Comments, &gridOpts(Span: 5)) // use the whole row
The underlying text implementation should probably respect newline - so MinSize() returns the correct value.
Parsing the text should be re-usable as each driver should not have to re-implement it!
The alternative is that the logic is in widget.* so it is reused by Label, Entry etc...
Add a Cassowary algorithm to create an AutoLayout setup. A slice of Constraints should likely exist within the CanvasObject to facilitate the layout.
I get these errors reported to the terminal when running the examples program of Fyne. Note, the program still runs just fine. No crashes. Perhaps clicking on the top-most icons have no effect, but other than that the application seems to run just fine.
u@x1 ~> examples
ERR<28049>:evas_main lib/evas/canvas/efl_input_pointer.c:123 _efl_input_pointer_efl_duplicate_duplicate() Object Efl.Input.Pointer@0x4000001f943c[2] has not parent during duplicate.
## Copy & Paste the below (until EOF) into a terminal, then hit Enter
eina_btlog << EOF
/usr/lib/libeina.so.1 0x7f58cf92d4de 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92e221 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92f663 0x7f58cf904000
/usr/lib/libevas.so.1 0x7f58cf646cce 0x7f58cf547000
/usr/lib/libefl.so.1 0x7f58cf82e6b8 0x7f58cf81a000
/usr/lib/libevas.so.1 0x7f58cf5a1176 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a19ee 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2395 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2d10 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a3413 0x7f58cf547000
/usr/lib/libeo.so.1 0x7f58cebf36c6 0x7f58cebdd000
/usr/lib/libeo.so.1 0x7f58cebee568 0x7f58cebdd000
/usr/lib/libecore_evas.so.1 0x7f58cf7fcc00 0x7f58cf7ef000
/usr/lib/libecore_evas.so.1 0x7f58cf7fd6cd 0x7f58cf7ef000
/usr/lib/libecore_input_evas.so.1 0x7f58cebd6383 0x7f58cebd4000
/usr/lib/ecore_evas/engines/x/v-1.21/module.so 0x7f58c81ae85b 0x7f58c81a1000
/usr/lib/libecore.so.1 0x7f58cf898579 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89f6e0 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89b64a 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a248 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89527e 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a328 0x7f58cf878000
/home/u/goget/bin/examples 0x4596c0 0x400000
EOF
Form submitted
Form submitted
ERR<28049>:evas_main lib/evas/canvas/efl_input_pointer.c:123 _efl_input_pointer_efl_duplicate_duplicate() Object Efl.Input.Pointer@0x400000172696[2] has not parent during duplicate.
## Copy & Paste the below (until EOF) into a terminal, then hit Enter
eina_btlog << EOF
/usr/lib/libeina.so.1 0x7f58cf92d4de 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92e221 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92f663 0x7f58cf904000
/usr/lib/libevas.so.1 0x7f58cf646cce 0x7f58cf547000
/usr/lib/libefl.so.1 0x7f58cf82e6b8 0x7f58cf81a000
/usr/lib/libevas.so.1 0x7f58cf5a1176 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a19ee 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2395 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2d10 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a3413 0x7f58cf547000
/usr/lib/libeo.so.1 0x7f58cebf36c6 0x7f58cebdd000
/usr/lib/libeo.so.1 0x7f58cebee568 0x7f58cebdd000
/usr/lib/libecore_evas.so.1 0x7f58cf7fcc00 0x7f58cf7ef000
/usr/lib/libecore_evas.so.1 0x7f58cf7fd6cd 0x7f58cf7ef000
/usr/lib/libecore_input_evas.so.1 0x7f58cebd6383 0x7f58cebd4000
/usr/lib/ecore_evas/engines/x/v-1.21/module.so 0x7f58c81ae85b 0x7f58c81a1000
/usr/lib/libecore.so.1 0x7f58cf898579 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89f6e0 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89b64a 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a248 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89527e 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a328 0x7f58cf878000
/home/u/goget/bin/examples 0x4596c0 0x400000
EOF
checked true
ERR<28049>:evas_main lib/evas/canvas/efl_input_pointer.c:123 _efl_input_pointer_efl_duplicate_duplicate() Object Efl.Input.Pointer@0x4000001811ba[2] has not parent during duplicate.
## Copy & Paste the below (until EOF) into a terminal, then hit Enter
eina_btlog << EOF
/usr/lib/libeina.so.1 0x7f58cf92d4de 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92e221 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92f663 0x7f58cf904000
/usr/lib/libevas.so.1 0x7f58cf646cce 0x7f58cf547000
/usr/lib/libefl.so.1 0x7f58cf82e6b8 0x7f58cf81a000
/usr/lib/libevas.so.1 0x7f58cf5a1176 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a19ee 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2395 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2d10 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a3413 0x7f58cf547000
/usr/lib/libeo.so.1 0x7f58cebf36c6 0x7f58cebdd000
/usr/lib/libeo.so.1 0x7f58cebee568 0x7f58cebdd000
/usr/lib/libecore_evas.so.1 0x7f58cf7fcc00 0x7f58cf7ef000
/usr/lib/libecore_evas.so.1 0x7f58cf7fd6cd 0x7f58cf7ef000
/usr/lib/libecore_input_evas.so.1 0x7f58cebd6383 0x7f58cebd4000
/usr/lib/ecore_evas/engines/x/v-1.21/module.so 0x7f58c81ae85b 0x7f58c81a1000
/usr/lib/libecore.so.1 0x7f58cf898579 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89f6e0 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89b64a 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a248 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89527e 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a328 0x7f58cf878000
/home/u/goget/bin/examples 0x4596c0 0x400000
EOF
ERR<28049>:evas_main lib/evas/canvas/efl_input_pointer.c:123 _efl_input_pointer_efl_duplicate_duplicate() Object Efl.Input.Pointer@0x4000000374c2[2] has not parent during duplicate.
## Copy & Paste the below (until EOF) into a terminal, then hit Enter
eina_btlog << EOF
/usr/lib/libeina.so.1 0x7f58cf92d4de 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92e221 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92f663 0x7f58cf904000
/usr/lib/libevas.so.1 0x7f58cf646cce 0x7f58cf547000
/usr/lib/libefl.so.1 0x7f58cf82e6b8 0x7f58cf81a000
/usr/lib/libevas.so.1 0x7f58cf5a1176 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a19ee 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2395 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2d10 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a3413 0x7f58cf547000
/usr/lib/libeo.so.1 0x7f58cebf36c6 0x7f58cebdd000
/usr/lib/libeo.so.1 0x7f58cebee568 0x7f58cebdd000
/usr/lib/libecore_evas.so.1 0x7f58cf7fcc00 0x7f58cf7ef000
/usr/lib/libecore_evas.so.1 0x7f58cf7fd6cd 0x7f58cf7ef000
/usr/lib/libecore_input_evas.so.1 0x7f58cebd6383 0x7f58cebd4000
/usr/lib/ecore_evas/engines/x/v-1.21/module.so 0x7f58c81ae85b 0x7f58c81a1000
/usr/lib/libecore.so.1 0x7f58cf898579 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89f6e0 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89b64a 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a248 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89527e 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a328 0x7f58cf878000
/home/u/goget/bin/examples 0x4596c0 0x400000
EOF
Responded with false
ERR<28049>:evas_main lib/evas/canvas/efl_input_pointer.c:123 _efl_input_pointer_efl_duplicate_duplicate() Object Efl.Input.Pointer@0x40000017c844[2] has not parent during duplicate.
## Copy & Paste the below (until EOF) into a terminal, then hit Enter
eina_btlog << EOF
/usr/lib/libeina.so.1 0x7f58cf92d4de 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92e221 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92f663 0x7f58cf904000
/usr/lib/libevas.so.1 0x7f58cf646cce 0x7f58cf547000
/usr/lib/libefl.so.1 0x7f58cf82e6b8 0x7f58cf81a000
/usr/lib/libevas.so.1 0x7f58cf5a1176 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a19ee 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2395 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2d10 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a3413 0x7f58cf547000
/usr/lib/libeo.so.1 0x7f58cebf36c6 0x7f58cebdd000
/usr/lib/libeo.so.1 0x7f58cebee568 0x7f58cebdd000
/usr/lib/libecore_evas.so.1 0x7f58cf7fcc00 0x7f58cf7ef000
/usr/lib/libecore_evas.so.1 0x7f58cf7fd6cd 0x7f58cf7ef000
/usr/lib/libecore_input_evas.so.1 0x7f58cebd6383 0x7f58cebd4000
/usr/lib/ecore_evas/engines/x/v-1.21/module.so 0x7f58c81ae85b 0x7f58c81a1000
/usr/lib/libecore.so.1 0x7f58cf898579 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89f6e0 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89b64a 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a248 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89527e 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a328 0x7f58cf878000
/home/u/goget/bin/examples 0x4596c0 0x400000
EOF
Responded with true
ERR<28049>:evas_main lib/evas/canvas/efl_input_pointer.c:123 _efl_input_pointer_efl_duplicate_duplicate() Object Efl.Input.Pointer@0x400000039b3b[2] has not parent during duplicate.
## Copy & Paste the below (until EOF) into a terminal, then hit Enter
eina_btlog << EOF
/usr/lib/libeina.so.1 0x7f58cf92d4de 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92e221 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92f663 0x7f58cf904000
/usr/lib/libevas.so.1 0x7f58cf646cce 0x7f58cf547000
/usr/lib/libefl.so.1 0x7f58cf82e6b8 0x7f58cf81a000
/usr/lib/libevas.so.1 0x7f58cf5a1176 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a19ee 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2395 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2d10 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a3413 0x7f58cf547000
/usr/lib/libeo.so.1 0x7f58cebf36c6 0x7f58cebdd000
/usr/lib/libeo.so.1 0x7f58cebee568 0x7f58cebdd000
/usr/lib/libecore_evas.so.1 0x7f58cf7fcc00 0x7f58cf7ef000
/usr/lib/libecore_evas.so.1 0x7f58cf7fd6cd 0x7f58cf7ef000
/usr/lib/libecore_input_evas.so.1 0x7f58cebd6383 0x7f58cebd4000
/usr/lib/ecore_evas/engines/x/v-1.21/module.so 0x7f58c81ae85b 0x7f58c81a1000
/usr/lib/libecore.so.1 0x7f58cf898579 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89f6e0 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89b64a 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a248 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89527e 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a328 0x7f58cf878000
/home/u/goget/bin/examples 0x4596c0 0x400000
EOF
ERR<28049>:evas_main lib/evas/canvas/efl_input_pointer.c:123 _efl_input_pointer_efl_duplicate_duplicate() Object Efl.Input.Pointer@0x4000000af3c1[2] has not parent during duplicate.
## Copy & Paste the below (until EOF) into a terminal, then hit Enter
eina_btlog << EOF
/usr/lib/libeina.so.1 0x7f58cf92d4de 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92e221 0x7f58cf904000
/usr/lib/libeina.so.1 0x7f58cf92f663 0x7f58cf904000
/usr/lib/libevas.so.1 0x7f58cf646cce 0x7f58cf547000
/usr/lib/libefl.so.1 0x7f58cf82e6b8 0x7f58cf81a000
/usr/lib/libevas.so.1 0x7f58cf5a1176 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a19ee 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2395 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a2d10 0x7f58cf547000
/usr/lib/libevas.so.1 0x7f58cf5a3413 0x7f58cf547000
/usr/lib/libeo.so.1 0x7f58cebf36c6 0x7f58cebdd000
/usr/lib/libeo.so.1 0x7f58cebee568 0x7f58cebdd000
/usr/lib/libecore_evas.so.1 0x7f58cf7fcc00 0x7f58cf7ef000
/usr/lib/libecore_evas.so.1 0x7f58cf7fd6cd 0x7f58cf7ef000
/usr/lib/libecore_input_evas.so.1 0x7f58cebd6383 0x7f58cebd4000
/usr/lib/ecore_evas/engines/x/v-1.21/module.so 0x7f58c81ae85b 0x7f58c81a1000
/usr/lib/libecore.so.1 0x7f58cf898579 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89f6e0 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89b64a 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a248 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89527e 0x7f58cf878000
/usr/lib/libecore.so.1 0x7f58cf89a328 0x7f58cf878000
/home/u/goget/bin/examples 0x4596c0 0x400000
EOF
Cut
Copy
Paste
Cut
Cut
Cut
New
a decent API to add standard toolbar buttons but allow for other items in the future
This is a restriction it would be great to lift.
I looked into static linking but there is likely a licensing issue as part of EFL is LGPL.
Looking for brainstorming & solutions :).
Start with solitaire. A great example of rendering some nice vector graphics and a custom layout and click handler
The fonts do not seem to be packaged or found when running the "go build" output from a different directory.
Json looks like a good match for our structure. For those items where we are allowing multiple types in one generic store (like canvas.Objects) we may need custom code like demonstrated here: http://gregtrowbridge.com/golang-json-serialization-with-interfaces/
Hi,
I'm trying the demo and it's panicking on click on the Demos menu, in the Icons items, with the following stacktrace:
panic: runtime error: index out of range
goroutine 1 [running, locked to thread]:
fyne.io/fyne/vendor/golang.org/x/image/vector.(*Rasterizer).rasterizeDstRGBASrcUniformOpOver(0xc00011c0d0, 0xc000480500, 0x0, 0xffffffffffffffdb, 0x2, 0x0, 0xffff0000ffff, 0xffff0000ffff)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/vendor/golang.org/x/image/vector/vector.go:398 +0x289
fyne.io/fyne/vendor/golang.org/x/image/vector.(*Rasterizer).Draw(0xc00011c0d0, 0x426e820, 0xc000480500, 0x0, 0xffffffffffffffdb, 0x2, 0x0, 0x426e4e0, 0xc000480540, 0x0, ...)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/vendor/golang.org/x/image/vector/vector.go:287 +0x2e3
fyne.io/fyne/vendor/github.com/srwiley/rasterx.(*ScannerGV).Draw(0xc00011c0d0)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/vendor/github.com/srwiley/rasterx/scan.go:141 +0xb0
fyne.io/fyne/vendor/github.com/srwiley/oksvg.(*SvgPath).DrawTransformed(0xc0004520e0, 0xc000124120, 0x3ff0000000000000, 0x3fb5555555555555, 0x0, 0x0, 0xbff8aaaaaaaaaaab, 0x0, 0x0)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/vendor/github.com/srwiley/oksvg/svgd.go:125 +0x66b
fyne.io/fyne/vendor/github.com/srwiley/oksvg.(*SvgIcon).Draw(0xc000118000, 0xc000124120, 0x3ff0000000000000)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/vendor/github.com/srwiley/oksvg/svgd.go:83 +0x122
fyne.io/fyne/driver/gl.(*glCanvas).newGlImageTexture(0xc0004801c0, 0x426f4a0, 0xc000482f50, 0xc0004ea420)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/gl.go:170 +0xe89
fyne.io/fyne/driver/gl.(*glCanvas).newGlImageTexture-fm(0x426f4a0, 0xc000482f50, 0xc00009f968)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/draw.go:135 +0x3e
fyne.io/fyne/driver/gl.getTexture(0x426f4a0, 0xc000482f50, 0xc00009fa10, 0xc00009f9d8)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/gl.go:46 +0x127
fyne.io/fyne/driver/gl.(*glCanvas).drawImage(0xc0004801c0, 0xc000482f50, 0x4, 0x25, 0x8, 0x8)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/draw.go:135 +0x7b
fyne.io/fyne/driver/gl.(*glCanvas).drawObject(0xc0004801c0, 0x426f4a0, 0xc000482f50, 0x4, 0x25, 0x8, 0x8)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/draw.go:177 +0x2b5
fyne.io/fyne/driver/gl.(*glCanvas).paint.func1(0x426f4a0, 0xc000482f50, 0x4, 0x25)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/canvas.go:131 +0x64
fyne.io/fyne/driver/gl.walkObjects(0x426f4a0, 0xc000482f50, 0x4, 0x25, 0xc00009fc90)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/draw.go:29 +0x1f6
fyne.io/fyne/driver/gl.walkObjects(0x426f8c0, 0xc00005c240, 0x4, 0x4, 0xc00009fc90)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/draw.go:26 +0x197
fyne.io/fyne/driver/gl.walkObjects(0x426f380, 0xc0004fa2d0, 0x0, 0x0, 0xc00009fc90)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/draw.go:19 +0x2bb
fyne.io/fyne/driver/gl.(*glCanvas).paint(0xc0004801c0, 0x8, 0x8)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/canvas.go:133 +0x124
fyne.io/fyne/driver/gl.(*gLDriver).runGL(0xc00000c460)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/loop.go:101 +0x44d
fyne.io/fyne/driver/gl.(*gLDriver).Run(0xc00000c460)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/driver.go:82 +0x2b
fyne.io/fyne/driver/gl.(*window).ShowAndRun(0xc00008e3c0)
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/driver/gl/window.go:179 +0x57
main.main()
/Users/alexis.destrez/Work/go/src/fyne.io/fyne/cmd/fyne_demo/main.go:118 +0xdb4
exit status 2
Here is few more information:
$> go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/alexis.destrez/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/alexis.destrez/Work/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0k/3xk6gf990yq1szxx_6fx0ltm28gp8s/T/go-build859804847=/tmp/go-build -gno-record-gcc-switches -fno-common"
$> go version
go version go1.11 darwin/amd64
I hope it helps,
krostar
Needed for entry and multiline text at a minimum.
Also should provide a standalone scrolling container for other usage (list, custom etc).
Hi,
When I go run
the demo, I'm getting the following message:
$> go run .
# fyne.io/fyne/driver/gl
../../driver/gl/gl_darwinfix.go:10:5: warning: 'NSOpenGLContext' is deprecated: first deprecated in macOS 10.14 - Please use Metal or MetalKit. [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:202:12: note: 'NSOpenGLContext' has been explicitly marked deprecated here
The app is launching without any problems though.
I don't really know what information to add, let me know if you need more info.
krostar
Input widgets (check box and radio buttons) don't change their appearance when enabled
go version go1.10.1 windows/amd64
scoop install gcc
A simple input line that accepts keyboard events.
Will require some simple focus handling in the canvas.
Hello, I setup my environment according to the getting started (i am using windows as title mentions).
The rendering of some texts (at the top for example) seems to be bugged compared to the screenshots in the repo.
Additionally, none of the buttons aside from Dark/Light and Quit seem to work.
I also tried running the example from the other repo, it rendered the 4 buttons but nothing happens when pressing on them.
For now I am afraid there's nothing else I can provide as there are no errors or log messages anywhere.
Having a drop down box to use in forms would be really nice to have.
Features i would propose for this:
Essential
Nice to have
As reported by @officialgupta using "go get install github.com/fyne-io/fyne" does not install the GL and svg dependencies...
Let's solve this so that it's a single step install for people who have Go and CGo working.
Context: Fedora 28, Wayland instead of X11, go 1.10.4
I'm creating a simple app which, nominally, reads frames from a webcam and will display them. The code reading frames from the camera works fine, but as soon as I import fyne/desktop
, reads from the camera start blocking. I don't even have to create a fyne App
-- just having the import is enough.
I'm using github.com/blackjack/webcam for reading frames from the camera.
In pseudocode, I'm doing:
type Cam struct {}
func newCam() *Cam {
return &Cam{}
}
func (c *Cam) stream(frames chan []byte) {
for {
frames <- c.ReadFrame()
}
}
func main() {
cam := newCam()
frames := make(chan []byte)
go cam.stream(frames)
go displayFyne(frames)
fmt.Scanf("\n") // press enter to stop
}
func readFrames(frames chan []byte) {
for {
f := <- frames
log.Printf("Got a frame of length %d", len(f))
}
}
func neverCalledAtAllByAnythingEver() {
app := desktop.NewApp()
log.Printf("Got an app: %v", app)
}
func displayFyne(frames chan []byte) {
go readFrames(frames)
}
If I comment out the code of neverCalledAtAllByAnythingEver
and the related import
, this works perfectly; frames are read from the camera, put into the channel, read out and the length of the read frame reported.
With the import and that function un-commented, I get read timeouts from the camera; nothing gets put into the channel, so nothing can be read out.
I've tested the same code with:
[]byte{...}
into the channel in a separate goroutine, and that works fine/dev/urandom
and putting those bytes in to the channel, and that works tooIt's only when I want to read from the camera device that I have issues.
Halp?
Automate the "getting started" docs with a single entry point for any OS
This should refresh for each new content size.
go version 1.11
gcc version 7.3.0
platform: linux mint 19
# fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw
In file included from ./glfw/src/internal.h:169:0,
from ./glfw/src/context.c:28,
from src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:
./glfw/src/x11_platform.h:39:10: fatal error: X11/Xcursor/Xcursor.h: No such file or directory
#include <X11/Xcursor/Xcursor.h>
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
i am on openSuse, which is the distribution the current Enlightenment Release Manager @simotek personally provides builds for e and efl, and tried running cmd/fyne_demo.
sadly, immediately after start i get random memory corruptions like the 2 below.
Information for package efl:
----------------------------
Repository : EnlightenmentFactory
Name : efl
Version : 1.20.7-259.92
Arch : x86_64
Vendor : obs://build.opensuse.org/X11:Enlightenment
Installed Size : 3.3 MiB
Installed : Yes
Status : out-of-date (version 1.20.7-259.91 installed)
Source package : efl-1.20.7-259.92.src
double free or corruption (fasttop)
SIGABRT: abort
PC=0x7f972337508b m=0 sigcode=18446744073709551610
signal arrived during cgo execution
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x66cce0, 0xc0000f9630, 0xc000000000)
/usr/lib64/go/current/src/runtime/cgocall.go:128 +0x5e fp=0xc0000f9600 sp=0xc0000f95c8 pc=0x4085ae
github.com/fyne-io/fyne/driver/efl._Cfunc_evas_object_del(0x4000001269bb)
_cgo_gotypes.go:637 +0x41 fp=0xc0000f9630 sp=0xc0000f9600 pc=0x655ad1
github.com/fyne-io/fyne/driver/efl.(*eFLDriver).RenderedTextSize.func1.4(0x4000001269bb)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/text.go:83 +0x56 fp=0xc0000f9668 sp=0xc0000f9630 pc=0x6606a6
github.com/fyne-io/fyne/driver/efl.(*eFLDriver).RenderedTextSize.func1()
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/text.go:83 +0x133 fp=0xc0000f96d8 sp=0xc0000f9668 pc=0x6607f3
github.com/fyne-io/fyne/driver/efl.runOnMain(0xc0001d1dc0)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/loop.go:150 +0x36 fp=0xc0000f9718 sp=0xc0000f96d8 pc=0x65c1a6
github.com/fyne-io/fyne/driver/efl.(*eFLDriver).RenderedTextSize(0xbab570, 0x714520, 0x1, 0xe, 0xc000000000, 0xc0000c06a8, 0xc0000f97c0)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/text.go:74 +0x138 fp=0xc0000f9760 sp=0xc0000f9718 pc=0x65c708
github.com/fyne-io/fyne/canvas.(*Text).MinSize(0xc0000f36c0, 0x76aa40, 0xc00008a780)
/home/neo/go/src/github.com/fyne-io/fyne/canvas/text.go:24 +0x7e fp=0xc0000f97a8 sp=0xc0000f9760 pc=0x4d71fe
github.com/fyne-io/fyne/widget.(*buttonRenderer).MinSize(0xc00007d6e0, 0xc00008a780, 0x769900)
/home/neo/go/src/github.com/fyne-io/fyne/widget/button.go:26 +0x60 fp=0xc0000f97d0 sp=0xc0000f97a8 pc=0x4da610
github.com/fyne-io/fyne/widget.(*baseWidget).minSize(0xc00008a780, 0x76aa40, 0xc00008a780, 0xc00008a780, 0xc000096400)
/home/neo/go/src/github.com/fyne-io/fyne/widget/widget.go:46 +0x6d fp=0xc0000f9800 sp=0xc0000f97d0 pc=0x4e1e5d
github.com/fyne-io/fyne/widget.(*Button).MinSize(0xc00008a780, 0x76a3e0, 0xc00008a780)
/home/neo/go/src/github.com/fyne-io/fyne/widget/button.go:134 +0x3e fp=0xc0000f9838 sp=0xc0000f9800 pc=0x4dac0e
github.com/fyne-io/fyne/layout.(*boxLayout).MinSize(0xc000084a44, 0xc0000d0180, 0x6, 0x8, 0x76ad40, 0xc000096460)
/home/neo/go/src/github.com/fyne-io/fyne/layout/boxlayout.go:108 +0x145 fp=0xc0000f98a8 sp=0xc0000f9838 pc=0x4d9055
github.com/fyne-io/fyne/widget.(*boxRenderer).MinSize(0xc00007d6b0, 0xc000096460, 0x7698a0)
/home/neo/go/src/github.com/fyne-io/fyne/widget/box.go:108 +0x4e fp=0xc0000f98e8 sp=0xc0000f98a8 pc=0x4da3ee
github.com/fyne-io/fyne/widget.(*baseWidget).minSize(0xc000096460, 0x76ad40, 0xc000096460, 0xc000096460, 0xc0000f9900)
/home/neo/go/src/github.com/fyne-io/fyne/widget/widget.go:46 +0x6d fp=0xc0000f9918 sp=0xc0000f98e8 pc=0x4e1e5d
github.com/fyne-io/fyne/widget.(*Toolbar).MinSize(0xc000096460, 0x76a6e0, 0xc000096460)
/home/neo/go/src/github.com/fyne-io/fyne/widget/toolbar.go:85 +0x3e fp=0xc0000f9950 sp=0xc0000f9918 pc=0x4e173e
github.com/fyne-io/fyne/layout.(*boxLayout).Layout(0xc00016a6fc, 0xc0000d0200, 0x8, 0x8, 0xa9, 0x23b)
/home/neo/go/src/github.com/fyne-io/fyne/layout/boxlayout.go:55 +0x4b5 fp=0xc0000f9a20 sp=0xc0000f9950 pc=0x4d8ed5
github.com/fyne-io/fyne/widget.(*boxRenderer).Layout(0xc00007dad0, 0xa9, 0x23b)
/home/neo/go/src/github.com/fyne-io/fyne/widget/box.go:112 +0x62 fp=0xc0000f9a60 sp=0xc0000f9a20 pc=0x4da482
github.com/fyne-io/fyne/widget.(*baseWidget).resize(0xc00008b2c0, 0xa9, 0x23b, 0x76a9e0, 0xc00008b2c0)
/home/neo/go/src/github.com/fyne-io/fyne/widget/widget.go:26 +0x73 fp=0xc0000f9a90 sp=0xc0000f9a60 pc=0x4e1d23
github.com/fyne-io/fyne/widget.(*Box).Resize(0xc00008b2c0, 0xa9, 0x23b)
/home/neo/go/src/github.com/fyne-io/fyne/widget/box.go:25 +0x52 fp=0xc0000f9ac8 sp=0xc0000f9a90 pc=0x4d9ce2
github.com/fyne-io/fyne/driver/efl.(*eflCanvas).resizeContent(0xc0000d0100)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/canvas.go:473 +0x144 fp=0xc0000f9b28 sp=0xc0000f9ac8 pc=0x65af84
github.com/fyne-io/fyne/driver/efl.onWindowResize(0x101b5c0)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/window.go:198 +0x113 fp=0xc0000f9b78 sp=0xc0000f9b28 pc=0x65d313
github.com/fyne-io/fyne/driver/efl._cgoexpwrap_3f20d64e3c1e_onWindowResize(0x101b5c0)
_cgo_gotypes.go:1065 +0x2b fp=0xc0000f9b90 sp=0xc0000f9b78 pc=0x65707b
runtime.call32(0x0, 0x7fffc0f2ed90, 0x7fffc0f2ee28, 0x8)
/usr/lib64/go/current/src/runtime/asm_amd64.s:522 +0x3b fp=0xc0000f9bc0 sp=0xc0000f9b90 pc=0x45a02b
runtime.cgocallbackg1(0x0)
/usr/lib64/go/current/src/runtime/cgocall.go:316 +0x19b fp=0xc0000f9c38 sp=0xc0000f9bc0 pc=0x40894b
runtime.cgocallbackg(0x0)
/usr/lib64/go/current/src/runtime/cgocall.go:194 +0xd6 fp=0xc0000f9ca0 sp=0xc0000f9c38 pc=0x408716
runtime.cgocallback_gofunc(0x4085d2, 0x66cc90, 0xc0000f9d30, 0xc00007d4a0)
/usr/lib64/go/current/src/runtime/asm_amd64.s:775 +0x9b fp=0xc0000f9cc0 sp=0xc0000f9ca0 pc=0x45b5fb
runtime.asmcgocall(0x66cc90, 0xc0000f9d30)
/usr/lib64/go/current/src/runtime/asm_amd64.s:622 +0x42 fp=0xc0000f9cc8 sp=0xc0000f9cc0 pc=0x45b492
runtime.cgocall(0x66cc90, 0xc0000f9d30, 0x0)
/usr/lib64/go/current/src/runtime/cgocall.go:131 +0x82 fp=0xc0000f9d00 sp=0xc0000f9cc8 pc=0x4085d2
github.com/fyne-io/fyne/driver/efl._Cfunc_ecore_main_loop_iterate()
_cgo_gotypes.go:584 +0x41 fp=0xc0000f9d30 sp=0xc0000f9d00 pc=0x655861
github.com/fyne-io/fyne/driver/efl.runEFL()
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/loop.go:84 +0x1b2 fp=0xc0000f9e68 sp=0xc0000f9d30 pc=0x65b9e2
github.com/fyne-io/fyne/driver/efl.(*window).ShowAndRun(0xc00008c300)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/window.go:151 +0x35 fp=0xc0000f9e88 sp=0xc0000f9e68 pc=0x65cfc5
main.main()
/home/neo/go/src/github.com/fyne-io/fyne/cmd/fyne_demo/main.go:114 +0xd50 fp=0xc0000f9f98 sp=0xc0000f9e88 pc=0x669d30
runtime.main()
/usr/lib64/go/current/src/runtime/proc.go:201 +0x207 fp=0xc0000f9fe0 sp=0xc0000f9f98 pc=0x431467
runtime.goexit()
/usr/lib64/go/current/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc0000f9fe8 sp=0xc0000f9fe0 pc=0x45bd41
goroutine 19 [chan receive]:
github.com/fyne-io/fyne/app.NewAppWithDriver.func1(0xc000068180, 0xc0000947c0)
/home/neo/go/src/github.com/fyne-io/fyne/app/app.go:79 +0x3d
created by github.com/fyne-io/fyne/app.NewAppWithDriver
/home/neo/go/src/github.com/fyne-io/fyne/app/app.go:77 +0x119
rax 0x0
rbx 0x6
rcx 0x7f972337508b
rdx 0x0
rdi 0x2
rsi 0x7fffc0f2e7f0
rbp 0x7fffc0f2eb40
rsp 0x7fffc0f2e7f0
r8 0x0
r9 0x7fffc0f2e7f0
r10 0x8
r11 0x246
r12 0x1000
r13 0x7fffc0f2ea60
r14 0x10
r15 0x7f970c719000
rip 0x7f972337508b
rflags 0x246
cs 0x33
fs 0x0
gs 0x0
malloc_consolidate(): invalid chunk size
SIGABRT: abort
PC=0x7f530aafe08b m=0 sigcode=18446744073709551610
signal arrived during cgo execution
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x66cd30, 0xc0000f95f8, 0x29)
/usr/lib64/go/current/src/runtime/cgocall.go:128 +0x5e fp=0xc0000f95c0 sp=0xc0000f9588 pc=0x4085ae
github.com/fyne-io/fyne/driver/efl._Cfunc_evas_object_text_font_set(0x400000104d3e, 0x2212070, 0xe)
_cgo_gotypes.go:930 +0x45 fp=0xc0000f95f8 sp=0xc0000f95c0 pc=0x656ac5
github.com/fyne-io/fyne/driver/efl.updateFont.func1(0x400000104d3e, 0x2212070, 0xe)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/text.go:35 +0x68 fp=0xc0000f9630 sp=0xc0000f95f8 pc=0x660328
github.com/fyne-io/fyne/driver/efl.updateFont(0x400000104d3e, 0xc00015e000, 0xe, 0x0)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/text.go:35 +0xb9 fp=0xc0000f9668 sp=0xc0000f9630 pc=0x65c2e9
github.com/fyne-io/fyne/driver/efl.(*eFLDriver).RenderedTextSize.func1()
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/text.go:79 +0xf3 fp=0xc0000f96d8 sp=0xc0000f9668 pc=0x6607b3
github.com/fyne-io/fyne/driver/efl.runOnMain(0xc0001e94c0)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/loop.go:150 +0x36 fp=0xc0000f9718 sp=0xc0000f96d8 pc=0x65c1a6
github.com/fyne-io/fyne/driver/efl.(*eFLDriver).RenderedTextSize(0xbab570, 0x714520, 0x1, 0xe, 0xc000000000, 0xc00017c5d8, 0x15)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/text.go:74 +0x138 fp=0xc0000f9760 sp=0xc0000f9718 pc=0x65c708
github.com/fyne-io/fyne/canvas.(*Text).MinSize(0xc000166070, 0x76aa40, 0xc00005e2a0)
/home/neo/go/src/github.com/fyne-io/fyne/canvas/text.go:24 +0x7e fp=0xc0000f97a8 sp=0xc0000f9760 pc=0x4d71fe
github.com/fyne-io/fyne/widget.(*buttonRenderer).MinSize(0xc00015a1e0, 0xc00005e2a0, 0x769900)
/home/neo/go/src/github.com/fyne-io/fyne/widget/button.go:26 +0x60 fp=0xc0000f97d0 sp=0xc0000f97a8 pc=0x4da610
github.com/fyne-io/fyne/widget.(*baseWidget).minSize(0xc00005e2a0, 0x76aa40, 0xc00005e2a0, 0x26, 0x1d)
/home/neo/go/src/github.com/fyne-io/fyne/widget/widget.go:46 +0x6d fp=0xc0000f9800 sp=0xc0000f97d0 pc=0x4e1e5d
github.com/fyne-io/fyne/widget.(*Button).MinSize(0xc00005e2a0, 0x26, 0x1d)
/home/neo/go/src/github.com/fyne-io/fyne/widget/button.go:134 +0x3e fp=0xc0000f9838 sp=0xc0000f9800 pc=0x4dac0e
github.com/fyne-io/fyne/layout.(*boxLayout).MinSize(0xc000018414, 0xc00015e080, 0x6, 0x8, 0x76ad40, 0xc000160140)
/home/neo/go/src/github.com/fyne-io/fyne/layout/boxlayout.go:109 +0x163 fp=0xc0000f98a8 sp=0xc0000f9838 pc=0x4d9073
github.com/fyne-io/fyne/widget.(*boxRenderer).MinSize(0xc00015a1b0, 0xc000160140, 0x7698a0)
/home/neo/go/src/github.com/fyne-io/fyne/widget/box.go:108 +0x4e fp=0xc0000f98e8 sp=0xc0000f98a8 pc=0x4da3ee
github.com/fyne-io/fyne/widget.(*baseWidget).minSize(0xc000160140, 0x76ad40, 0xc000160140, 0xc000160140, 0xc0000f9900)
/home/neo/go/src/github.com/fyne-io/fyne/widget/widget.go:46 +0x6d fp=0xc0000f9918 sp=0xc0000f98e8 pc=0x4e1e5d
github.com/fyne-io/fyne/widget.(*Toolbar).MinSize(0xc000160140, 0x76a6e0, 0xc000160140)
/home/neo/go/src/github.com/fyne-io/fyne/widget/toolbar.go:85 +0x3e fp=0xc0000f9950 sp=0xc0000f9918 pc=0x4e173e
github.com/fyne-io/fyne/layout.(*boxLayout).Layout(0xc0001800cc, 0xc00015e100, 0x8, 0x8, 0xa9, 0x23b)
/home/neo/go/src/github.com/fyne-io/fyne/layout/boxlayout.go:55 +0x4b5 fp=0xc0000f9a20 sp=0xc0000f9950 pc=0x4d8ed5
github.com/fyne-io/fyne/widget.(*boxRenderer).Layout(0xc00015a5d0, 0xa9, 0x23b)
/home/neo/go/src/github.com/fyne-io/fyne/widget/box.go:112 +0x62 fp=0xc0000f9a60 sp=0xc0000f9a20 pc=0x4da482
github.com/fyne-io/fyne/widget.(*baseWidget).resize(0xc00005ede0, 0xa9, 0x23b, 0x76a9e0, 0xc00005ede0)
/home/neo/go/src/github.com/fyne-io/fyne/widget/widget.go:26 +0x73 fp=0xc0000f9a90 sp=0xc0000f9a60 pc=0x4e1d23
github.com/fyne-io/fyne/widget.(*Box).Resize(0xc00005ede0, 0xa9, 0x23b)
/home/neo/go/src/github.com/fyne-io/fyne/widget/box.go:25 +0x52 fp=0xc0000f9ac8 sp=0xc0000f9a90 pc=0x4d9ce2
github.com/fyne-io/fyne/driver/efl.(*eflCanvas).resizeContent(0xc00015e000)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/canvas.go:473 +0x144 fp=0xc0000f9b28 sp=0xc0000f9ac8 pc=0x65af84
github.com/fyne-io/fyne/driver/efl.onWindowResize(0x201dc40)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/window.go:198 +0x113 fp=0xc0000f9b78 sp=0xc0000f9b28 pc=0x65d313
github.com/fyne-io/fyne/driver/efl._cgoexpwrap_3f20d64e3c1e_onWindowResize(0x201dc40)
_cgo_gotypes.go:1065 +0x2b fp=0xc0000f9b90 sp=0xc0000f9b78 pc=0x65707b
runtime.call32(0x0, 0x7ffcb9668360, 0x7ffcb96683f8, 0x8)
/usr/lib64/go/current/src/runtime/asm_amd64.s:522 +0x3b fp=0xc0000f9bc0 sp=0xc0000f9b90 pc=0x45a02b
runtime.cgocallbackg1(0x0)
/usr/lib64/go/current/src/runtime/cgocall.go:316 +0x19b fp=0xc0000f9c38 sp=0xc0000f9bc0 pc=0x40894b
runtime.cgocallbackg(0x0)
/usr/lib64/go/current/src/runtime/cgocall.go:194 +0xd6 fp=0xc0000f9ca0 sp=0xc0000f9c38 pc=0x408716
runtime.cgocallback_gofunc(0x4085d2, 0x66cc90, 0xc0000f9d30, 0xc00007d4a0)
/usr/lib64/go/current/src/runtime/asm_amd64.s:775 +0x9b fp=0xc0000f9cc0 sp=0xc0000f9ca0 pc=0x45b5fb
runtime.asmcgocall(0x66cc90, 0xc0000f9d30)
/usr/lib64/go/current/src/runtime/asm_amd64.s:622 +0x42 fp=0xc0000f9cc8 sp=0xc0000f9cc0 pc=0x45b492
runtime.cgocall(0x66cc90, 0xc0000f9d30, 0x0)
/usr/lib64/go/current/src/runtime/cgocall.go:131 +0x82 fp=0xc0000f9d00 sp=0xc0000f9cc8 pc=0x4085d2
github.com/fyne-io/fyne/driver/efl._Cfunc_ecore_main_loop_iterate()
_cgo_gotypes.go:584 +0x41 fp=0xc0000f9d30 sp=0xc0000f9d00 pc=0x655861
github.com/fyne-io/fyne/driver/efl.runEFL()
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/loop.go:84 +0x1b2 fp=0xc0000f9e68 sp=0xc0000f9d30 pc=0x65b9e2
github.com/fyne-io/fyne/driver/efl.(*window).ShowAndRun(0xc00005a080)
/home/neo/go/src/github.com/fyne-io/fyne/driver/efl/window.go:151 +0x35 fp=0xc0000f9e88 sp=0xc0000f9e68 pc=0x65cfc5
main.main()
/home/neo/go/src/github.com/fyne-io/fyne/cmd/fyne_demo/main.go:114 +0xd50 fp=0xc0000f9f98 sp=0xc0000f9e88 pc=0x669d30
runtime.main()
/usr/lib64/go/current/src/runtime/proc.go:201 +0x207 fp=0xc0000f9fe0 sp=0xc0000f9f98 pc=0x431467
runtime.goexit()
/usr/lib64/go/current/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc0000f9fe8 sp=0xc0000f9fe0 pc=0x45bd41
goroutine 4 [chan receive]:
github.com/fyne-io/fyne/app.NewAppWithDriver.func1(0xc000158000, 0xc00000c040)
/home/neo/go/src/github.com/fyne-io/fyne/app/app.go:79 +0x3d
created by github.com/fyne-io/fyne/app.NewAppWithDriver
/home/neo/go/src/github.com/fyne-io/fyne/app/app.go:77 +0x119
rax 0x0
rbx 0x6
rcx 0x7f530aafe08b
rdx 0x0
rdi 0x2
rsi 0x7ffcb9667bc0
rbp 0x7ffcb9667f10
rsp 0x7ffcb9667bc0
r8 0x0
r9 0x7ffcb9667bc0
r10 0x8
r11 0x246
r12 0x1000
r13 0x7ffcb9667e30
r14 0x10
r15 0x7f52f1c32000
rip 0x7f530aafe08b
rflags 0x246
cs 0x33
fs 0x0
gs 0x0
Hi,
On the demo app, in the demos menu, on the Widgets items there is three tabs: buttons, input and group. When I click on the second tab (Input) and play with widgets, there is few callbacks print (checked true/false
, selected Item 1/2
, ...).
The problem is that if I click on the third tab (group) and click on the same location the widgets of the input tab were, I'm getting the same callbacks print. For example if I click on the background right below "Grouped content", I get the message checked true/false
; if I click even lower I'm getting the selected Item 1/2
message`.
I'm not sure I'm explicit enough, I can take screenshot if needed.
krostar
Actually more of a question than an issue:
As my trial of this gui I'm doing a quick file manager. Slight issue, I build a long list in the window and while it does render there is no way to scroll through it. I can work around this, but I wondered if there was a plan to support scroll bars in the future before I spend too long on it. Is that sort of gui toolkit functionality even within scope?
Input text is not selectable on Windows
go version go1.10.1 windows/amd64
scoop install gcc
When I run, it say:
# pkg-config --cflags -- eina evas ecore-evas ecore-evas ecore-input ecore eina evas ecore-evas ecore-input ecore evas ecore ecore-evas ecore-input evas
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openssl', required by 'emile', not found
pkg-config: exit status 1
I has been installed EFL.
Thanks.
What works correctly in X11 does not display under a wayland session
Drop down menu from a menu bar to start with.
The toolbar layout could be re-used - then we can use layout.NewSpacer() to right align items like a "Help" menu.
The drop-downs should have separator support which would be horizontal lines, similar to the toolbar vertical ones.
Let's not worry about cascading menus yet :)
I know it's a very complex control but I'd still suggest, for the future, a multiline text entry field with the following rich text features:
The last one requires explanation. An entry field should allow some way to add custom data to ranges of glyphs and some way of retrieving it by cursor position or mouse position. This is hard to implement later by a user of the library without access to the underlying implementation, because that would require one to maintain some parallel data structure and capture all edit events. If you miss one way the text might be changed, then the data structures get our of sync, so it's much better to have a way to add more functionality directly with the styled text. I'm thinking about hyperlinks, tooltips, etc.
Background: The reason I add this very general feature request is that I've seen dozens of handmade GUI libraries for various languages, and they all lack in the above functionality. So people turn to Qt or browser-based overblown solutions instead.
Probably underpins lots of image work but it's where we break from the vector methods everywhere else
Like checkbox but exclusive within a group.
This should make the select box (#28) less critical - could be moved until we have popover support later
On GL build of examples - click on solitaire - boom, instant panic.
could be related to the color issue you mentioned before.
Im getting these when building & running these over an ssh connection to a fresh linux box (Ubuntu 18.10), so that can play havoc with the available palette IIRC.
Will try and sort it out - but its deep inside srwiley's code by the time it dies.
~/go/src/github.com/fyne-io/examples$ go run --tags=gl .
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x789ae7]
goroutine 1 [running, locked to thread]:
github.com/srwiley/rasterx.(*Gradient).blendStops(0xc0001580a0, 0x3f6555c71ed0a459, 0x3ff0000000000000, 0x0, 0x0, 0x0, 0x3ff0000000000000, 0x0, 0x0, 0x3ff0000000000000, ...)
/home/steve/go/src/github.com/srwiley/rasterx/gradient.go:147 +0x87
github.com/srwiley/rasterx.(*Gradient).tColor(0xc0001580a0, 0x3f6555c71ed0a459, 0x3ff0000000000000, 0x11039e0, 0xc0000e1190)
/home/steve/go/src/github.com/srwiley/rasterx/gradient.go:127 +0x843
github.com/srwiley/rasterx.(*Gradient).GetColorFunctionUS.func6(0x0, 0x0, 0x1, 0xc0004607b0)
/home/steve/go/src/github.com/srwiley/rasterx/gradient.go:287 +0xf7
github.com/srwiley/rasterx.(*ColorFuncImage).At(0xc00027ae40, 0x0, 0x0, 0x0, 0x1)
/home/steve/go/src/github.com/srwiley/rasterx/scan.go:23 +0x3e
golang.org/x/image/vector.(*Rasterizer).rasterizeOpOver(0xc000510600, 0x958920, 0xc00027ae00, 0x0, 0x0, 0x80, 0xc0, 0x957da0, 0xc00027ae40, 0x0, ...)
/home/steve/go/src/golang.org/x/image/vector/vector.go:436 +0x283
golang.org/x/image/vector.(*Rasterizer).Draw(0xc000510600, 0x958920, 0xc00027ae00, 0x0, 0x0, 0x80, 0xc0, 0x957da0, 0xc00027ae40, 0x0, ...)
/home/steve/go/src/golang.org/x/image/vector/vector.go:296 +0xd4
github.com/srwiley/rasterx.(*ScannerGV).Draw(0xc000510600)
/home/steve/go/src/github.com/srwiley/rasterx/scan.go:140 +0x98
github.com/srwiley/oksvg.(*SvgPath).DrawTransformed(0xc0001880e0, 0xc0000b87e0, 0x3ff0000000000000, 0x3ff5805601580560, 0x0, 0x0, 0x3ff5805601580560, 0x0, 0x0)
/home/steve/go/src/github.com/srwiley/oksvg/svgd.go:125 +0x66b
github.com/srwiley/oksvg.(*SvgIcon).Draw(0xc000158000, 0xc0000b87e0, 0x3ff0000000000000)
/home/steve/go/src/github.com/srwiley/oksvg/svgd.go:83 +0x122
github.com/fyne-io/fyne/driver/gl.(*glCanvas).newGlImageTexture(0xc00027a080, 0x959fe0, 0xc0001961e0, 0xc00056a730)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/gl.go:134 +0x9c5
github.com/fyne-io/fyne/driver/gl.(*glCanvas).newGlImageTexture-fm(0x959fe0, 0xc0001961e0, 0xc0000e17d8)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/draw.go:116 +0x3e
github.com/fyne-io/fyne/driver/gl.getTexture(0x959fe0, 0xc0001961e0, 0xc0000e1860, 0x8)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/gl.go:34 +0x91
github.com/fyne-io/fyne/driver/gl.(*glCanvas).drawImage(0xc00027a080, 0xc0001961e0, 0x8, 0x8, 0x4a, 0x4a)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/draw.go:116 +0xf7
github.com/fyne-io/fyne/driver/gl.(*glCanvas).drawObject(0xc00027a080, 0x959fe0, 0xc0001961e0, 0x4, 0x4, 0x4a, 0x4a)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/draw.go:157 +0x2b5
github.com/fyne-io/fyne/driver/gl.(*glCanvas).paint.func1(0x959fe0, 0xc0001961e0, 0x4, 0x4)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/canvas.go:123 +0x64
github.com/fyne-io/fyne/driver/gl.walkObjects(0x959fe0, 0xc0001961e0, 0x4, 0x4, 0xc0000e1a58)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/draw.go:33 +0x1f6
github.com/fyne-io/fyne/driver/gl.walkObjects(0x959f20, 0xc00009b9e0, 0x0, 0x0, 0xc0000e1a58)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/draw.go:30 +0x197
github.com/fyne-io/fyne/driver/gl.(*glCanvas).paint(0xc00027a080, 0x4a, 0x4a)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/canvas.go:125 +0x124
github.com/fyne-io/fyne/driver/gl.(*gLDriver).runGL(0xc00000c800)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/loop.go:109 +0x617
github.com/fyne-io/fyne/driver/gl.(*gLDriver).Run(0xc00000c800)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/driver.go:82 +0x2b
github.com/fyne-io/fyne/driver/gl.(*window).ShowAndRun(0xc0000a81e0)
/home/steve/go/src/github.com/fyne-io/fyne/driver/gl/window.go:161 +0x57
main.welcome(0x959a40, 0xc00000c820)
/home/steve/go/src/github.com/fyne-io/examples/main.go:33 +0x270
main.main()
/home/steve/go/src/github.com/fyne-io/examples/main.go:60 +0x4c9
exit status 2
For text entry we need to be able to insert into different places (and see where the insert will happen)
So we can create apps that better meet the expectations of a GUI user.
macOS: create an app bundle
windows: insert required metadata
Can we extract the icon set on the app object to avoid re-stating what is already coded in?
Demo group widget is click-through to input tab
go version go1.10.1 windows/amd64
scoop install gcc
Use the Resource API to get the icon from known scalable graphics.
It should also update to the theme changes!
The base framework can probably be compiled to ndk and iOS as a shared lib.
Then go can be be compiled against it.
Or the traditional root of using gomonile but I think it will be too limiting.
Either way it is worth trying out.
This API should allow simple method calls to be translated to animated changes (such as making a widget taller expand over a period)
Whilst running main.go in github.com/fyne-io/fyne/examples
Clicking on a few things, bring up the canvas .. boom.
2018/09/16 19:37:53 DPI 157
fatal error: concurrent map writes
goroutine 1 [running, locked to thread]:
runtime.throw(0x844a60, 0x15)
/usr/local/go/src/runtime/panic.go:608 +0x72 fp=0xc000107aa8 sp=0xc000107a78 pc=0x42e7a2
runtime.mapassign(0x7c4920, 0xc0001c85d0, 0xc000107b80, 0x8)
/usr/local/go/src/runtime/map.go:563 +0x560 fp=0xc000107b30 sp=0xc000107aa8 pc=0x411f60
github.com/fyne-io/fyne/desktop.queueRender(...)
/home/steve/go/src/github.com/fyne-io/fyne/desktop/loop.go:77
github.com/fyne-io/fyne/desktop.(*eflCanvas).resizeContent(0xc0001ca100)
/home/steve/go/src/github.com/fyne-io/fyne/desktop/canvas.go:429 +0x1a4 fp=0xc000107ba0 sp=0xc000107b30 pc=0x7583e4
.......
Not easily reproducable, because its just a matter of bad luck that something adds to the map whilst loop.go is deleting something from the map.
Wrapping the eflcanvas.dirty map in a mutex makes the problem go away, so thats one solution, as ugly as it is. Does not affect performance to any noticeable degree.
There are 4 maps all up in the eflcanvas struct including the dirty map .. not sure if some of these will have similar issues. Will have a closer look.
From 61680d2744aa3a5fa22d68bc9c19d6430454bb8f Mon Sep 17 00:00:00 2001
From: SteveOC <[email protected]>
Date: Sun, 16 Sep 2018 19:47:31 +1000
Subject: [PATCH] add mutex around canvas/dirty or concurrent map writes
---
desktop/canvas.go | 9 +++++----
desktop/loop.go | 4 ++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/desktop/canvas.go b/desktop/canvas.go
index a97e8c1..eaaecd6 100644
--- a/desktop/canvas.go
+++ b/desktop/canvas.go
@@ -59,10 +59,11 @@ type eflCanvas struct {
onKeyDown func(*fyne.KeyEvent)
- objects map[*C.Evas_Object]fyne.CanvasObject
- native map[fyne.CanvasObject]*C.Evas_Object
- offsets map[fyne.CanvasObject]fyne.Position
- dirty map[fyne.CanvasObject]bool
+ objects map[*C.Evas_Object]fyne.CanvasObject
+ native map[fyne.CanvasObject]*C.Evas_Object
+ offsets map[fyne.CanvasObject]fyne.Position
+ dirty map[fyne.CanvasObject]bool
+ dirtyMutex sync.Mutex
}
func ignoreObject(o fyne.CanvasObject) bool {
diff --git a/desktop/loop.go b/desktop/loop.go
index b3412ff..fcd7167 100644
--- a/desktop/loop.go
+++ b/desktop/loop.go
@@ -64,15 +64,19 @@ func drawDirty() {
continue
}
canvas.fitContent()
+ canvas.dirtyMutex.Lock()
for obj := range canvas.dirty {
delete(canvas.dirty, obj)
canvas.doRefresh(obj)
}
+ canvas.dirtyMutex.Unlock()
}
}
// do runs f on the main thread.
func queueRender(c *eflCanvas, co fyne.CanvasObject) {
+ c.dirtyMutex.Lock()
c.dirty[co] = true
+ c.dirtyMutex.Unlock()
}
--
2.18.0
Would need a new color in the theme as well ("greyed out")
The layouts should re-apply if window/canvas size changes
HIHo,
fist, thank for this awesome library !
is there any possibility or planings that we are able to build for Windows?
Currently i receive following error:
[fkrick@mucwsn2017-2 guiTest]$ env GOOS=windows GOARCH=amd64 go build src/guiTest/main.go
#github.com/fyne-io/fyne/desktop
src/github.com/fyne-io/fyne/desktop/app.go:12:31: undefined: NewEFLDriver
src/github.com/fyne-io/fyne/desktop/efl_windows.go:9:22: undefined: window
Best, Flo
When updating a widget or canvas element the backend should detect the change and schedule the render change.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.