Comments (11)
I hope the video will be enough.
No. Please always add example code so we can replicate the issue.
from fyne.
It is possible that there is a delay in painting so when you ask for the image to display it does not happen immediately.
Are you by any chance writing the image to be white and reusing it?
Important note is that when you call Refresh it is not actually painting to canvas, it is queueing the change to be reflected in next redraw - which will happen asynchronously.
from fyne.
andydotxyz:
I read a file and then write the content to the image. I do not explictly Refresh although I have done so as a test, but the flashes remained.
Jaclz:
I'll put together a demo package - all the code, plus a file to 'play'. Do I just drop that in this box?
from fyne.
from fyne.
I changed the theme to dark and now it flashes black. With white theme it flashes white.
from fyne.
I went to go.mod and updated all available modules as image was mentioned in two of them. Sadly, now I get:
fyne.io/fyne/v2/internal/painter
..\pkg\mod\fyne.io\fyne\[email protected]\internal\painter\font.go:209:65: out.LineBounds.LineHeight undefined (type shaping.Bounds has no field or method LineHeight)
Where do I go from here?
from fyne.
I was trying to build a simple demo of the flashing. Now I can't use Fyne at all because of the above error. I do not know enough to be able to rollback to something that does work.
from fyne.
I have built a simple demo that repeatedly shows the same image using the same mechanisms that are in my "video player".
It does not "flash", so I'm closing this thread.
I got Fyne to work again in my demo program by NOT accepting any of the updates shown to be available in go.mod
I'm new to Golang and probably haven't learned that updates come with risks. Plus, there's the old maxim: If it's not broken, don't fix it. I should have followed it, but the presence of references to image in two of the updates seduced me.
from fyne.
I went to go.mod and updated all available modules as image was mentioned in two of them. Sadly, now I get:
fyne.io/fyne/v2/internal/painter
..\pkg\mod\fyne.io\fyne\[email protected]\internal\painter\font.go:209:65: out.LineBounds.LineHeight undefined (type shaping.Bounds has no field or method LineHeight)
Where do I go from here?
You can always upgrade Fyne safely but it looks like you upgraded all dependencies and sadly one library we use pushed a breaking change.
In the future you can do just a single library upgrade like "go get fyne.io/fyne/v2@latest" to avoid this.
We are preparing an update to fyne that hides the go-text breakage but I've been too busy to release it the last week sorry.
from fyne.
from fyne.
Ah. File operations are slow and expensive compared to the graphical operations, so perhaps it was blanking the image when load started and what you were seeing was the delay in load time.
You workaround seems sensible, though you may need to move that to a worker goroutine for larger directories.
from fyne.
Related Issues (20)
- FormLayout calls MinSize twice
- Possible deadlocks around BaseWidget.Theme access HOT 6
- Memory leak in widget.Table due to constantly creating cells to cache.Renderer(impl) while table.Refresh() HOT 13
- [develop - android build] error while building to android HOT 1
- Custom fonts use memory that is never freed HOT 1
- Sometimes the last list row that should be visible doesn't show HOT 1
- UpdateHeader func of a table with header is being called multiple times whenever a cell in the table's body is refreshed HOT 2
- Don't show title when mouse hover on Systray menu HOT 1
- Table passes negative index to onSelected function HOT 5
- Tidy the fyne CLI (in tools repo) HOT 1
- When scroll bar is expanded, clicking above or below the bar should scroll up or down HOT 1
- Widget Entry with a custom icon HOT 3
- Fyne Demo not runnable on macOS Ventura VM (OpenGL related) HOT 3
- Unable to run some apps on M1 Macbook Pro HOT 2
- Build fails with transparent image for iOS icon HOT 3
- Disabled app tabs can still be selected in popup menu HOT 1
- Labels clipping some text below baseline HOT 6
- Wrong font rendering when overriding theme HOT 8
- Font can't be displayed correctly after fyne package HOT 2
- The text is not Alignment in button with custom font. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fyne.