Open
Description
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:
- a label doesn't appear
- 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
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