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

Issues with BorderLayout on mobile web #5410

Open
2 tasks done
hkparker opened this issue Jan 14, 2025 · 0 comments
Open
2 tasks done

Issues with BorderLayout on mobile web #5410

hkparker opened this issue Jan 14, 2025 · 0 comments
Labels
unverified A bug that has been reported but not verified

Comments

@hkparker
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

I'm not actually sure if this is one bug or two, so apologies if I'm wrong on that, but top part of a border layout has multiple issues on mobile web as far as I can tell. So far I've noticed:

  1. a label doesn't appear
  2. buttons aren't clickable

Let me know if I should split these out into two tickets!

How to reproduce

fyne serve

view on desktop web, notice you can see "Header" and click on the buttons to change to content

view on mobile web, notice that you cannot see "Header" nor click any buttons

Screenshots

Screenshot from 2025-01-14 11-57-49

Screenshot_20250114-115902

Example code

package main

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

func main() {
	myApp := app.New()
	window := myApp.NewWindow("Title")
	window.Resize(fyne.NewSize(1024, 1024))

	title := widget.NewLabel("Header")
	title.Alignment = fyne.TextAlignCenter

	welcomeContent := container.NewStack(widget.NewLabel("welcome page"))
	secondContent := container.NewStack(widget.NewLabel("second page"))
	secondContent.Hide()

	var welcomeButton *widget.Button
	var secondButton *widget.Button
	welcomeButton = widget.NewButton("Welcome", func() {
		secondContent.Hide()
		welcomeContent.Show()

		secondButton.Importance = widget.LowImportance
		secondButton.Refresh()
		welcomeButton.Importance = widget.MediumImportance
		welcomeButton.Refresh()
	})
	secondButton = widget.NewButton("Second Page", func() {
		welcomeContent.Hide()
		secondContent.Show()

		welcomeButton.Importance = widget.LowImportance
		welcomeButton.Refresh()
		secondButton.Importance = widget.MediumImportance
		secondButton.Refresh()
	})
	secondButton.Importance = widget.LowImportance

	buttons := container.NewCenter(container.NewHBox(
		welcomeButton,
		secondButton,
	))

	header := container.NewVBox(
		title,
		buttons,
	)

	main := container.NewVScroll(container.NewStack(
		welcomeContent,
		secondContent,
	))

	window.SetContent(container.New(
		layout.NewBorderLayout(header, nil, nil, nil),
		header,
		main,
	))

	window.Show()
	myApp.Run()
}

Fyne version

2.5.3

Go compiler version

go1.23.4 linux/amd64

Operating system and version

Arch Linux / Android 15 / Chrome

Additional Information

No response

@hkparker hkparker added the unverified A bug that has been reported but not verified label Jan 14, 2025
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

1 participant