Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog with max canvas size writes into status bar on Android #5539

Open
2 tasks done
ErikKalkoken opened this issue Feb 19, 2025 · 2 comments
Open
2 tasks done

Dialog with max canvas size writes into status bar on Android #5539

ErikKalkoken opened this issue Feb 19, 2025 · 2 comments
Labels
unverified A bug that has been reported but not verified

Comments

@ErikKalkoken
Copy link
Contributor

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

When creating a dialog with size of the canvas of the current window it will write into the status bar on Android. Other parts of the Fyne toolkit (e.g. window.SetContent()) appear to respect the status bar, so this looks like a bug to me.

Context: I want to display a dialog that uses the complete canvas of the current window. On desktop (i.e. Ubuntu) this works as expected.

How to reproduce

Open a dialog in a Fyne app on Android, which uses the max canvas size.

This can also be reproduces on Waydroid.

Screenshots

Image

Note that this bug was not visible on an Android screenshot I took, because they seam to be missing the status bar.

Example code

package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/dialog"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("Mobile Test")
	b := widget.NewButton("Click me", func() {
		d := dialog.NewInformation("Information", "What is going on here?", w)
		d.Show()
		d.Resize(w.Canvas().Size())
	})
	w.SetContent(container.NewCenter(b))
	w.Resize(fyne.NewSize(400, 200))
	w.ShowAndRun()
}

Fyne version

2.5.4

Go compiler version

1.23.4

Operating system and version

Android 14, Pixel 6a

Additional Information

No response

@ErikKalkoken ErikKalkoken added the unverified A bug that has been reported but not verified label Feb 19, 2025
@andydotxyz
Copy link
Member

Hmm, yes it should probably avoid the status.

You can currently "work around this" by using the Canvas.InteractiveArea to get a better size request.

@andydotxyz andydotxyz added this to the "F" release, Early 2025 milestone Feb 19, 2025
@ErikKalkoken
Copy link
Contributor Author

It works perfectly with Canvas.InteractiveArea. tyvm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

2 participants